The reason why we are very interrested in the number of allocations is that it directly affects the rate of garbage collections. And our system is time sensitive and thus we strive to keep the number of GC's down. In essense in part of our code we work by the rules described in this document:
http://download.microsoft.com/download/ ... ePaper.pdf
The VS2010 profiler can give number of allocations for each type. However, I really hate the VS2010 profiler (for various reasons) and would rather use your profiler.
Just to give you some background why this is important:
- Our system is very latency sensitive
- Our system continously has a working set of around 3Gb
- A gen2 GC takes about 1.5 sec
- When we started out performance tuning the system we had an allocation rate around 200Mb/s, after tuning we are down to around 1Mb/s
- The performance tuning reduced the the gen2 GC rate from one every 5 min to one every 12 hour (which is acceptable)
Now you can argue that there is something wrong with a design that creates such amounts of garbage.
1. Yes, there is something wrong ... we are fixing issues as we find them (using profilers)
2. Our task is CPU intensive. In total we have 48 cores continously running close to 100% doing the job. CPU intensive tasks in .NET will create a lot of garbage (but with careful programming you can minimize it by following the rules in the linked whitepaper).