We have seen two occurrences of a strange problem where the GC starts
consuming 100% of CPU for an extended period of time. One case was 5
minutes, the other was 20 minutes. In both cases it eventually finished and
the system recovered.
The total heap sizes were around 350M - not too excessive - and I believe
around 5-6 million objects were in the heaps.
Has anybody seen similar behavior?
Or, any pointers as to how to diagnose this?
We are set to try collecting dump files of the ASPNET process next time this
happens, but I would like to find something more. It's hard to believe this
has never happened to anyone else before, but I can't find anything similar
anywhere.
Thanks for the help,
Wayne
Niall - 22 Apr 2004 06:28 GMT
If the memory pressure is getting high and the GC is forced to go to gen 2
collections, running a GC with that size heap will be costly. I don't know
if I'd expect several minutes, but it will be bad.
Check that you aren't getting GCs deliberately induced in a loop somewhere.
Check out the Induced GCs counter in perfmon and check it against the number
of gen0 - 2 collections. If you find that there are a lot of induced GCs,
debug the process and put a breakpoint in System.GC.Collect and see who's
responsible...
Niall
> We have seen two occurrences of a strange problem where the GC starts
> consuming 100% of CPU for an extended period of time. One case was 5
[quoted text clipped - 16 lines]
>
> Wayne
"Chris Lyon [MSFT]" - 23 Apr 2004 22:18 GMT
Hi Wayne
Take a look at Rico Mariani's weblog (http://weblogs.asp.net/ricom/) for advice on analyzing and correcting performance issues, particularly related to long GC times.
Based on the brief description you've given, it sounds like there is a large number of (large) objects in generation 2, that when collected, will hurt performance. Consider
resource pooling and caching policies as described in Rico's blog.
Thanks
-Chris
--------------------
>Reply-To: "Wayne Malkin" <wmalkin@filenet.com>
>From: "Wayne Malkin" <wmalkin@filenet.com>
[quoted text clipped - 33 lines]
>
>Wayne

Signature
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.