ZGC garbage collector
Hacker ApprovedThe most recommended of 4 garbage collectors
People recommend ZGC for Java applications that need very low pause times, often under 1ms. The usual caveat is that it gives up some throughput for that latency.
People recommend ZGC for Java applications that need very low pause times, often under 1ms. The usual caveat is that it gives up some throughput for that latency.
24 people gave an opinion
- recommend it
- 17
- criticize it
- 7
- approval share
- 71%
Recommended in 10 of 13 months
- November 2025: recommended
- December 2025: not recommended
- January 2026: not recommended
- February 2026: recommended
- March 2026: recommended
- April 2026: recommended
- May 2026: recommended
- June 2026: recommended
- July 2026: recommended
- August 2026: recommended
- September 2026: recommended
- October 2026: recommended
- November 2026: not recommended (month in progress)
Why it carries the badge
- 17 people recommend itNeeds 10 or more, met.
- 2.4 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 10 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
Very low or no GC pauses
“Well under 1ms for ZGC (to the point that OS-caused hiccups are of similar magnitudes).”
Comment from 14 Aug 2026 in “JDK 27 G1/Parallel/Serial GC Changes” “ZGC doesn't have GC pauses.”
Comment from 18 Oct 2026 in “JDK 28” “It has no real GC pauses.”
Comment from 18 Oct 2026 in “JDK 28” - Comment from 4 Sep 2026 in “Why is Arrays.fill 265 times slower on G1GC?”
- Comment from 18 Oct 2026 in “JDK 28”
- Comment from 14 Aug 2026 in “JDK 27 G1/Parallel/Serial GC Changes”
- Comment from 13 Sep 2026 in “Rust is tier-1 language at Microsoft”
- Comment from 26 Feb 2026 in “Dissecting the CPU-Memory Relationship in Garbage Collection (OpenJDK 26)”
- Comment from 23 Sep 2026 on Hacker News
- Comment from 20 Mar 2026 in “Java Is Fast. Your Code Might Not Be”
- Comment from 26 Jun 2026 in “The Garbage Collection Handbook: The Art of Automatic Memory Management (2nd Ed)”
Responsive for interactive applications
“Do you need extra-low latency, even at very high percentile and are willing to give away a bit of throughput for it? ZGC”
Comment from 19 Mar 2026 in “Java 26 is here, and with it a solid foundation for the future” “If you've made that tradeoff for G1 because you wanted lower latency, you probably are going to be happier with ZGC.”
Comment from 25 Feb 2026 in “Dissecting the CPU-Memory Relationship in Garbage Collection (OpenJDK 26)” “ZGC and G1 are fantastic engineering achievements for applications that require low latency”
Comment from 25 Feb 2026 in “Dissecting the CPU-Memory Relationship in Garbage Collection (OpenJDK 26)” - Comment from 19 Jul 2026 in “Minecraft: Java Edition now uses SDL3”
- Comment from 26 Feb 2026 in “Dissecting the CPU-Memory Relationship in Garbage Collection (OpenJDK 26)”
- Comment from 13 Aug 2026 in “JDK 27 G1/Parallel/Serial GC Changes”
- Comment from 19 Jul 2026 in “Minecraft: Java Edition now uses SDL3”
- Comment from 17 Mar 2026 in “Java 26 is here, and with it a solid foundation for the future”
- Comment from 16 Mar 2026 in “Jemalloc un-abandoned by Meta”
Stays low-latency on large heaps
“ZGC has very low latency and the larger the heap you give it the less it'll slow things down”
Comment from 19 Jul 2026 in “Minecraft: Java Edition now uses SDL3” “the best Java GCs have sub-millisecond pause times for huge heap sizes”
Comment from 30 Oct 2026 on Hacker News “guarantees < 1ms pause times even for TB heaps”
Comment from 23 Sep 2026 on Hacker News Memory safety without manual management
“low latency GCs like the JVM's ZGC trading manual memory management for no memory related security vulnerabilities is pretty appealing”
Comment from 6 Apr 2026 in “LÖVE: 2D Game Framework for Lua” “now with ZGC, memory management in Java is more predictable than with malloc/free”
Comment from 20 Aug 2026 in “JDK 27 G1/Parallel/Serial GC Changes”
What people warn about
Each mark is one comment
Multi-second pauses or background overhead
“ZGC performance is _catastrophically_ bad with 1s, because more time was being spent on "background" GC than actually servicing requests.”
Comment from 4 Sep 2026 in “Why is Arrays.fill 265 times slower on G1GC?” “I have gotten multi second pause times with ZGC.”
Comment from 13 May 2026 in “Reverting the incremental GC in Python 3.14 and 3.15”
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 collectorThis page | 17 | 7 | 71% | 10 | — | Approved |
| G1 garbage collector | 6 | 1 | 86% | 5 | — | — |
| Boehm GC | 5 | 5 | 50% | 4 | — | — |
| Parallel GC (OpenJDK) | 5 | 2 | 71% | 4 | — | — |
What people said
40 of the 47 comments that mention it, newest first. Each links to the original comment.
“the best Java GCs have sub-millisecond pause times for huge heap sizes”
“ZGC is effectively pause-free.”
“It has no real GC pauses.”
“it encourages you to allocate a fair amount of memory to your heap, which isn't ideal in this world of kubernetes and microservices”
“ZGC doesn't have GC pauses.”
“guarantees < 1ms pause times even for TB heaps”
“ZGC is able to achieve sub-ms pauses.”
“That throughput penalty is not very high with generational ZGC.”
“ZGC performance is _catastrophically_ bad with 1s, because more time was being spent on "background" GC than actually servicing requests.”
“The low latency that it offers at near G1 speeds is a very good trade off”
“ZGC is unparalleled for low-latency (GC pauses are just gone).”
“now with ZGC, memory management in Java is more predictable than with malloc/free”
“The main practical impact of that has been saying goodbye to GC pauses, and getting low latency”
“in practice it makes it a non-issue for a large class of interesting and very common programs”
“Those pauses are gone today.”
“Well under 1ms for ZGC (to the point that OS-caused hiccups are of similar magnitudes).”
“suggests they’re still off by an order of magnitude”
“ZGC for interactive applications where latency matters a lot”
“ZGC, probably the world's most sophisticated moving collector”
“I just think ZGC is better for the job of a game server.”
“What matters is that the server remains responsive in a timely fashion, which ZGC enables.”
“ZGC has very low latency and the larger the heap you give it the less it'll slow things down”
“ZGC does no work in stop-the-world pauses”
“ZGC is extremely good work.”
“If you want pause freedom, go use ZGC or another modern GC on a modern VM.”
“are no larger than latency hiccups introduced by the OS”
“I have gotten multi second pause times with ZGC.”
“you just rely on ZGC to do its thing, and it works”
“low latency GCs like the JVM's ZGC trading manual memory management for no memory related security vulnerabilities is pretty appealing”
“Modern ZGC guarantees under 1ms pause times”
“Do you need extra-low latency, even at very high percentile and are willing to give away a bit of throughput for it? ZGC”
“I'm not sure it's even better than Java's, especially for modern ZGC”
“especially with the low-latency ZGC garbage collector”
“Games today should be using ZGC.”
“you probably want ZGC (or Shenandoah) because latency is more important than throughput.”
“which have very low pause times (in the order of 1 ms)”
“If you've made that tradeoff for G1 because you wanted lower latency, you probably are going to be happier with ZGC.”
“ZGC and G1 are fantastic engineering achievements for applications that require low latency”
“read instructions translate to way more cpu instructions in the former”
“It's also been a mixed bag, performance-wise.”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.