Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy-to-use performance and memory .NET profiler for Windows, Linux and macOS.
Secure and easy profiling in cloud, containers and clustered environments.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

Group objects by generation

In .NET applications, the garbage collector (GC) plays a significant role in memory management. Understanding how objects are grouped into generations can offer insights into the application's performance and help in optimization.

YourKit .NET Profiler allows you to group objects by their GC generations, and evaluate how much memory they use:

Group objects by generation

Understanding generations

The .NET garbage collector organizes objects into three primary generations:

1. Generation 0: This generation is the youngest and contains short-lived objects. New objects are created in generation 0. Since the majority of objects are short-lived, only a small percentage of young objects will likely survive their first garbage collection.

2. Generation 1: Medium-lived objects. Once an object survives the first garbage collection, it gets promoted to generation 1. This generation serves as a buffer between short-lived objects and long-lived objects.

3. Generation 2: Long-lived objects. All objects in generation 1 that survive garbage collection are promoted to generation 2. Surviving objects in generation 2 stay in generation 2.

To learn more about the generational garbage collector, please refer to MSDN.

Large object heap allocations

Objects that are 85,000 bytes or larger go straight to the Large Object Heap (LOH), which is a part of generation 2. Limiting such large object allocations can significantly improve performance, because by default this generation is not compacted.

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.