Thread: Memory usage
-
28-10-2008, 08:44 #1
new member
- Join Date
- Oct 2008
- Posts
- 2
Memory usage
I am currently have a windows dedicated server with 1GB of memory.
I have one website running on this server which received around 1,500 visitors per day (7500 page views per day).
This website is a asp.NET website with a MS SQL database.
I have notices that the memory usage displayed on the dashboard, keeps increasing until it reaches around 98%, which in turn slows the website right down.
When the momery usage gets this high, if I restart IIS, the memory usage will drop down to around 40-50%.
What is the best way to actually determine what is actually using this memory?
Any help would be much appreciated.
-
28-10-2008, 17:16 #2
Hello,
The Application Pool of the website must be adding memory with the increasing number of hits. You can limit the memory of a pool from its properties in IIS. However if the limit is not set correctly it will cause the Pool to get crashed.
This normally happens if you have long ASP .NET or SQL queries running on your site.Martin
Chief R & D Officer.
Windows 100% Uptime Hosting - Windows Dedicated Server - Web Hosting Tutorials
-
28-10-2008, 19:08 #3
new member
- Join Date
- Oct 2008
- Posts
- 2
I have have a long SQL query being executed.
I can see in the task manager, its the following two processes that is taking up the majority of the memoery (1GB):
sqlservr.exe - 280KB (MS SQL Server)
w3wp.exe - 182KB (Application Pool)
If I create a seperate Application Pool for this website, the task manager will create seperate rows of sqlservr.exe and w3wp.exe just for this website. Would you recommend doing this? if so what would you recommend setting the memory usage of the application pool to be?
I read this post today, that explains why exactly the MS Sql server is using up so much memory:
"So what is the average row size of this table? Say that is 300 bytes,
then that is 300 MB of data to read. That is not very likely to be done
instantly.
SQL Server's memory consumption will increase, as it will read the entire
table into cache, and the table will stay in the cache as long as no
other data competes about the space. This means that if you resubmit the
query, the response time will be significantly shorter.
SQL Server is designed to grab as much memory it can, as the more data
in can have in cache, the better the response times. If there are other
applications competing for memory on the machine, SQL Server will yield,
but in this case it may be better to configure how much memory you want
SQL Server to use."
Would it be best to set the application pool to be a large percentage of the memory so that it can cache a large percentage of the datbase and therefore speed up the website significantly.
Please let me know if I have the wrong end of the stick here.
-
14-10-2009, 19:35 #4
new member
- Join Date
- Oct 2009
- Posts
- 9
Hi !
The problem you are facing can really give one a headache.
It is obvious if you reset the IIS.
You can set the flags by using Adsutil.vbs.
To set the AppPoolRecycleMemory flag to false for the default Application Pool.
Try if it helps and keep sharing here.
Regards
Walter
-
16-10-2009, 05:14 #5
System Administrator (eUKhost.com)
- Join Date
- Nov 2007
- Posts
- 308
Hello,
memory/cpu usage depends on the need of your application, which includes background processes executed by your application, database used and queries it execute, number of hits to web site etc.
Increase in memory/cpu with application access shows that application is resource hungry
There are several factors responsible for this like -
code/script of web site may have many loops that may result into long execution time and in turn session time.
Loops are nothing but the condition checks depending on which it perform a specific action. For. e.g.-
1]
For i = 1 to 100
{
do this code
}
this loop will execute the mentioned code for 100 times.
2]
if (condition)
{
code to be executed if condition is true
}
else
{
code to be executed if condition is not true
}
etc.
The database may be very large in size hence it may take long time to search the records from database, process them, show it on your web page etc.
In case of database driven web sites, whenever a user browse it/give a hit to it, first the request would be sent to server, server will locate the web site with the help of host header, once the site is located it will start processing its code which may contain a database connection string, on establishing a successful connection with the help of DB details mentioned in connection string, it will fetch the records in memory(called as Record Sets) depending on SQL queries it process/sort them and then displays on the web site. Obviously if the database contain several tables and thousands of records in each table then it will take longer time to process them. This overall process involves memory and cpu as Record Sets are virtually created in memory itself.
Database and code optimization is the technique widely used by web developers for performance tuning for such heavy sites.
Indexing and Normalization are some other techniques used by Database Administrators to improve performance of a large database.
Gabriel S
Windows Hosting || Windows Reseller Hosting
Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
MSN: gabriel @ eukhost.com || SKYPE: Gabriel.Sandler
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)


LinkBack URL
About LinkBacks



Reply With Quote

Ah, I see. What companeis would they team up with for this revolutionary marketing technology? For...
What is Google caffeine?