THX-1138
THX-1138

Reputation: 21750

.NET CLR Memory "Bytes in all heaps" is much lower than "Gen 0 heap size"

I am looking at performance counters for may ASP.NET 4 Application (Workflow Service)

.NET CLR Memory -- # Bytes in all Heaps :    44,420,488
.NET CLR Memory -- Gen 0 heap size :        311,665,568
.NET CLR Memory -- Gen 1 heap size :         17,723,080
.NET CLR Memory -- Gen 2 heap size :         25,956,920
.NET CLR Memory -- Large Object Heap size :     740,488

Description on "# Bytes in all Heaps" counter

This counter is the sum of four other counters; Gen 0 Heap Size; Gen 1 Heap Size; Gen 2 Heap Size and the Large Object Heap Size. This counter indicates the current memory allocated in bytes on the GC Heaps.

Notice that it says "sum of four other counters" not just "sum of bytes allocated on four other heaps", which would make sense, since there are 0 bytes in Gen 0 heap after a Gen 0 garbage collection.

I noticed that in my case #Bytes in all Heaps is precisely Gen 1 + Gen 2 + Large Object Heap. Is this a bug? Or am I miss reading the numbers?

Windows 7 Enterprise, Performance Monitor 6.1.7601

Upvotes: 4

Views: 2625

Answers (1)

Nestor
Nestor

Reputation: 13990

According to this, all Heaps = Gen 1 + Gen 2 + Large Object Heap (no Gen 0)

Upvotes: 4

Related Questions