# ZGC garbage collector

17 Hacker News commenters recommended ZGC garbage collector and 7 criticized it, November 2025 to November 2026. It was recommended in 10 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** 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.

## Why people recommend it

- Very low or no GC pauses (11 comments): "Well under 1ms for ZGC (to the point that OS-caused hiccups are of similar magnitudes)." ([source](https://news.ycombinator.com/item?id=49293646)) "ZGC doesn't have GC pauses." ([source](https://news.ycombinator.com/item?id=50137633)) "It has no real GC pauses." ([source](https://news.ycombinator.com/item?id=50142346))
- Responsive for interactive applications (9 comments): "Do you need extra-low latency, even at very high percentile and are willing to give away a bit of throughput for it? ZGC" ([source](https://news.ycombinator.com/item?id=47432980)) "If you've made that tradeoff for G1 because you wanted lower latency, you probably are going to be happier with ZGC." ([source](https://news.ycombinator.com/item?id=47159260)) "ZGC and G1 are fantastic engineering achievements for applications that require low latency" ([source](https://news.ycombinator.com/item?id=47159221))
- Stays low-latency on large heaps (3 comments): "ZGC has very low latency and the larger the heap you give it the less it'll slow things down" ([source](https://news.ycombinator.com/item?id=48968830)) "the best Java GCs have sub-millisecond pause times for huge heap sizes" ([source](https://news.ycombinator.com/item?id=50303880)) "guarantees < 1ms pause times even for TB heaps" ([source](https://news.ycombinator.com/item?id=49811525))
- Memory safety without manual management (2 comments): "low latency GCs like the JVM's ZGC trading manual memory management for no memory related security vulnerabilities is pretty appealing" ([source](https://news.ycombinator.com/item?id=47658942)) "now with ZGC, memory management in Java is more predictable than with malloc/free" ([source](https://news.ycombinator.com/item?id=49381449))

## What people warn about

- Multi-second pauses or background overhead (2 comments): "ZGC performance is _catastrophically_ bad with 1s, because more time was being spent on "background" GC than actually servicing requests." ([source](https://news.ycombinator.com/item?id=49568313)) "I have gotten multi second pause times with ZGC." ([source](https://news.ycombinator.com/item?id=48128757))

## Alternatives hackers recommend

- [G1 garbage collector](https://hackerapproved.com/p/g1-garbage-collector.md): 6 recommend
- [Boehm GC](https://hackerapproved.com/p/boehm-gc.md): 5 recommend
- [Parallel GC (OpenJDK)](https://hackerapproved.com/p/parallel-gc.md): 5 recommend

## Cite as

Hacker Approved, "ZGC garbage collector", https://hackerapproved.com/p/zgc/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
