Tales from a Trading Desk

Noise from an Investment Bank

GC Performance

With another three .NET server applications going live as of late last week, we seem to be doing quite well from a performance viewpoint.  The % Time in GC appears to be around 10%, which means we are not in a Mid Life Crisis.  Although we are not down in low to mid single digits, I think overall our performance is pretty impressive, given that we are running on 3G 8-CPU (hyperthreaded) Windows DataCenter, with the server processes processing anything from 1-1K msgs per sec from a message bus.

On another note, if you want to see the page fault count of a process go through the roof, add these lines to the start of your application:

public static extern bool SetProcessWorkingSetSize( IntPtr proc, int min, int max );
Process p = Process.GetCurrentProcess();
SetProcessWorkingSetSize( p.Handle, -1, -1 );

Finally, if you are interested, information on the CLR generation sizes can be found here and here

Update Thanks to Robin (CLR Performance team) at Microsoft, Gen 0 is actually based on L2 size, and not L1 cache size as per Borlands article.

Update Thanks again to Robin (CLR Performance team) at Microsoft; The initial (min) size of Gen 1 is about 300k, and max size can be equal to ½ the segment size (wks GC segments are 16MB, svr for 4P and less are 64MB, so 8MB and 32MB max respectively).  Live size during a running app is based on survival rate.

Posted: Feb 25 2004, 12:10 AM by mdavey | with 1 comment(s)
Filed under:


Brian Long said:

Thanks for finding the correct values. The text of the article has now been updated
# June 18, 2004 1:28 PM