I know that the logic for GC to trigger is not simple but it has certain thresholds to monitor.
Anyone knows what are these thresholds could be for .NET 4 workstation and server GC ?
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are no set thresholds, they dynamically change as the garbage collector learns more about the program’s allocation pattern. There is no way for you to discover the current threshold, nor to change it. From casual observation, it appears workstation GC starts out with a 2 megabyte gen 0 heap. Which can grow to over 8 megabytes.
Server GC is quite different from workstation, it normally uses larger thresholds and multiple threads to collect garbage. Again, nothing you could discover, other than by observing the performance counters in Perfmon.exe