Does setting the physical memory limit in iis 7.5 cause the garbage collector to operate more aggressively?
I am currently undertaking load testing of a asp.net 4.0 web application hosted on a 64bit 2008 server (iis 7.5).
The purpose of the load testing it to determine the maximum memory usage by the web application if every page is cached simultaneously.
To evaluate this I set the output cache duration of the pages to 900 seconds then I request each publicly accessible url via xenu link sluth. This effectively request 20,000 or so pages.
To monitor memory usage I am using both Windows performance monitor and Redgate memory profiler 7.0.
I have run the test twice, test 1 with the physical memory limit set to the default 0, and test 2 with the physical memory limit set to 921600 (900mb).
Here is what I have observed,
- In both tests the application pool is never recycled.
- In test 1,开发者_开发百科 the worker process memory usage grows to 1,300mb. (Above the memory limit of test 2)
- In test 2, memory usage grows to 720mb.
- In test 2, memory usage grows to 720mb.
- In test 1, the unused memory allocated to .Net grows to 700mb
- In test 2 it grows to 150mb.
This leads me to my question, does setting the physical memory limit in iis 7.5 cause the garbage collector to operate more aggressively?
If this is not the case what am I witnessing?
To truly find if garbage collection is being triggered, you could watch the perf counters on it.
At a minimum I'd watch the Gen 0 counter and compare the two scenarios.
http://msdn.microsoft.com/en-us/library/x2tyfybc.aspx
精彩评论