Reputation: 971
I am testing a very simple .NET Webservice hosted in IIS. The web-service is just a single method performing a simple calculation and returning an integer. I have configured JMeter on a separate server to test this method using 500 threads, each looping 500 times. The method is therefore being called 250,000 times and I graph the throughput and response times.
My graphs therefore contains 250,000 points showing throughput and response time. However, both throughput and response time graphs show highly regular outliers in the dataset. At very regular intervals there is a very brief drop in throughput and a corresponding rise in response time. Out of the 250,000 points on each chart there between 50 and 75 such outliers.
Although this is a very small percentage, and the effect on overall performance is not an issue, I would like to understand what the cause of the outliers could be. My only theory thus far is that synchronous garbage collection in asp.net causes the application to pause for a fraction of second at regular intervals.
I would like to know whether the garbage collector could be responsible for these drops in throughput/increases in response times or not?
If not, there is likely some O/S issue, but there is no need for speculative answers here.
Upvotes: 1
Views: 259
Reputation: 4680
Yes, garbage collection will always cause pauses to the execution of all threads in the process. This thread can be shorter or longer depending on which mode of garbage collection you are using and the amount of allocated memory that is promoted to later generations.
In order to quantify the amount of time you spend in your garbage collections I would recommend using PerfView to collect and analyse garbage collection metrics.
You will have to measure the GC times vs your processing time to see if it is significant.
Upvotes: 0
Reputation: 2438
Another option is that the application pool on the IIS configured to recycle if it takes more than X MB of private memory, or has more than Y requests or even recycle every Z minutes...
in this case, maybe what you see is the recycling of your application pool.
Upvotes: 2