A
AN
Greetings,
We make an ASP.NET web application and we host it for our customers. We
have provisioned hardware and hope to be able to service around 200
customers on this hardware. The web servers are in a stateless farm and
have 2 GB of RAM. We are using ASP.NET 1.1 when using a dedicated
application pool for each virtual directory. Each customer gets their own
virtual directory and copy of the ASP.NET dll in their bin folder, which
creates a w3wp.exe process for each customer. The problem is that each
w3wp.exe takes from 40 MB to 180 MB of RAM. If the average is 128 MB, that
means we'll only be able to service something like 15 customers on this
hardware before we run out of RAM. Adding more RAM to the tune of a
gigabyte per every 7 customers is not a viable solution. We have used the
CLRProfiler.exe tool and we can see that string variables are being used a
good deal, but it does not appear that we are doing anything excessive in
this regard. We are using the StringBuilder class whenever lots of string
concatenation is required.
My questions are as follows:
1) Will the CLR release memory as we approach the limits and the OS begins
to ask for more memory for new w3wp.exe processes? Could it be that these
larger w3wp.exe processes are large simply because the CLR is being a bit
lazy and not releasing memory from the heap? If there were need for more
w3wp.exe processes, would the CLR trim these processes back and make room?
2) The application caches ADO.NET datatables in the HttpContext Cache
object. Some of these datatables are somewhat large (the largest is about 6
MB if the data were persisted as an XML stream). In the case of one
customer the total size of these cached datatables is 9.5 MB and their
w3wp.exe is up at 186 MB, so if this is the culprit, why would 9.5 MB of
cached data puff up to 186 MB?
3) We have configured our Application Pools as the default settings, which
is just to Recycle worker processes every 1740 minutes, Shutdown worker
processes after being idle for 20 minutes, and Request queue limit of 4000.
It seems that using the Memory recycling features is not what we want
because it winds up dumping the entire w3wp.exe process which then causes
that dreaded 10-second .NET grind at the next page request, and if we tried
to do it this way it seems to me that we'd wind up dumping w3wp.exe
processes before they can even get fully loaded. Does anyone have any tips
for hosting large numbers of Application Pools?
I look forward to any informed replies!
Thanks in advance, AN
We make an ASP.NET web application and we host it for our customers. We
have provisioned hardware and hope to be able to service around 200
customers on this hardware. The web servers are in a stateless farm and
have 2 GB of RAM. We are using ASP.NET 1.1 when using a dedicated
application pool for each virtual directory. Each customer gets their own
virtual directory and copy of the ASP.NET dll in their bin folder, which
creates a w3wp.exe process for each customer. The problem is that each
w3wp.exe takes from 40 MB to 180 MB of RAM. If the average is 128 MB, that
means we'll only be able to service something like 15 customers on this
hardware before we run out of RAM. Adding more RAM to the tune of a
gigabyte per every 7 customers is not a viable solution. We have used the
CLRProfiler.exe tool and we can see that string variables are being used a
good deal, but it does not appear that we are doing anything excessive in
this regard. We are using the StringBuilder class whenever lots of string
concatenation is required.
My questions are as follows:
1) Will the CLR release memory as we approach the limits and the OS begins
to ask for more memory for new w3wp.exe processes? Could it be that these
larger w3wp.exe processes are large simply because the CLR is being a bit
lazy and not releasing memory from the heap? If there were need for more
w3wp.exe processes, would the CLR trim these processes back and make room?
2) The application caches ADO.NET datatables in the HttpContext Cache
object. Some of these datatables are somewhat large (the largest is about 6
MB if the data were persisted as an XML stream). In the case of one
customer the total size of these cached datatables is 9.5 MB and their
w3wp.exe is up at 186 MB, so if this is the culprit, why would 9.5 MB of
cached data puff up to 186 MB?
3) We have configured our Application Pools as the default settings, which
is just to Recycle worker processes every 1740 minutes, Shutdown worker
processes after being idle for 20 minutes, and Request queue limit of 4000.
It seems that using the Memory recycling features is not what we want
because it winds up dumping the entire w3wp.exe process which then causes
that dreaded 10-second .NET grind at the next page request, and if we tried
to do it this way it seems to me that we'd wind up dumping w3wp.exe
processes before they can even get fully loaded. Does anyone have any tips
for hosting large numbers of Application Pools?
I look forward to any informed replies!
Thanks in advance, AN