G1 garbage collector
Ranked 2 of 4 garbage collectors by recommenders
The default garbage collector in Java's HotSpot JVM, which people find fast and rarely in need of tuning. Caveat: it can use a lot of off-heap memory.
The default garbage collector in Java's HotSpot JVM, which people find fast and rarely in need of tuning. Caveat: it can use a lot of off-heap memory.
7 people gave an opinion
- recommend it
- 6
- criticize it
- 1
- approval share
- 86%
Recommended in 5 of 13 months
- November 2025: not recommended
- December 2025: not recommended
- January 2026: not recommended
- February 2026: recommended
- March 2026: recommended
- April 2026: not recommended
- May 2026: recommended
- June 2026: not recommended
- July 2026: recommended
- August 2026: not recommended
- September 2026: recommended
- October 2026: not recommended
- November 2026: not recommended (month in progress)
Why it doesn’t carry the badge
- 6 people recommend itNeeds 10 or more, not met.
- 6 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 5 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Works well with default settings
“I've been able to tune them out for nearly all workloads”
Comment from 19 Jul 2026 in “Minecraft: Java Edition now uses SDL3” “G1 (the default, just don't add any flags).”
Comment from 19 Mar 2026 in “Java 26 is here, and with it a solid foundation for the future” “it is indeed quite fast with G1”
Comment from 15 Sep 2026 in “Java 27” Fast performance overall
“is already faster and better than Python's”
Comment from 14 May 2026 in “Reverting the incremental GC in Python 3.14 and 3.15” “it is indeed quite fast with G1”
Comment from 15 Sep 2026 in “Java 27”
What people warn about
Each mark is one comment
High off-heap memory use
“G1GC when it was first introduced would create these massive bookkeeping structures in order to run collections”
Comment from 19 Feb 2026 in “Minecraft Java is switching from OpenGL to Vulkan” “It was a nasty surprise to us with G1 how much off heap memory was required”
Comment from 25 Feb 2026 in “Dissecting the CPU-Memory Relationship in Garbage Collection (OpenJDK 26)” Not specified as Java 27 default
“Like there's no Java 27 platform spec that says that G1 is the default garbage collector.”
Comment from 15 Sep 2026 in “Java 27”
Other garbage collectors people recommend
The three most recommended other garbage collectors, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| ZGC garbage collector | 17 | 7 | 71% | 10 | — | Approved |
| G1 garbage collectorThis page | 6 | 1 | 86% | 5 | — | — |
| Boehm GC | 5 | 5 | 50% | 4 | — | — |
| Parallel GC (OpenJDK) | 5 | 2 | 71% | 4 | — | — |
What people said
All 8 comments that mention it, newest first. Each links to the original comment.
“Like there's no Java 27 platform spec that says that G1 is the default garbage collector.”
“it is indeed quite fast with G1”
“the best place for it is fairly large heaps”
“I've been able to tune them out for nearly all workloads”
“is already faster and better than Python's”
“G1 (the default, just don't add any flags).”
“It was a nasty surprise to us with G1 how much off heap memory was required”
“G1GC when it was first introduced would create these massive bookkeeping structures in order to run collections”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.