liveBook · Manning

Old generation

As explained in Troubleshooting Java, Second Edition

The old generation is the heap region that contains objects that have survived enough collection cycles to be promoted from younger regions.

The old generation is the heap region for objects that survive long enough in Survivor regions to be promoted for long-term use. Because it holds longer-lived objects, garbage collection cleans it less often than Eden. section 11.1

Use old-generation behavior as a diagnostic signal when reading GC logs:

  • Track whether objects move from Eden through Survivor regions into the old generation. section 11.1
  • Compare old-generation occupancy before and after collections; frequent full collections may indicate memory pressure or a leak. section 11.5
  • Interpret old-generation patterns alongside pause times and heap utilization rather than treating one GC event as a complete diagnosis. section 11.5

Reading an old-generation entry

A log line such as “Old regions: 0->0” shows that a collection left the old-generation region count unchanged. The same event moved Eden regions from 4 to 0 and Survivor regions from 0 to 1, indicating a young-collection transition without promotion into the old generation. section 11.1

Use the heap-lifecycle illustration to follow how object age and repeated GC survival determine movement between Eden, Survivor, and old-generation regions. section 11.1

How Troubleshooting Java, Second Edition covers it

How deep it goes
Explains promotion through Survivor regions and differing collection frequency, without descending into collector-specific promotion internals.
Examples
Uses a heap-lifecycle illustration and GC output showing Eden, Survivor, and old-region counts before and after collection.
What you can do after
Diagnose/debug with it by relating object promotion, old-generation occupancy, full collections, and GC-log symptoms.
How it connects
Connects the old generation with the heap, Eden, Survivor regions, garbage collection, full GC, and GC logs.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.