Hacker ApprovedDepartments

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%
Each figure is one person. RecommendsCriticizes

Recommended in 5 of 13 months

  1. November 2025: not recommended
  2. December 2025: not recommended
  3. January 2026: not recommended
  4. February 2026: recommended
  5. March 2026: recommended
  6. April 2026: not recommended
  7. May 2026: recommended
  8. June 2026: not recommended
  9. July 2026: recommended
  10. August 2026: not recommended
  11. September 2026: recommended
  12. October 2026: not recommended
  13. 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.

G1 garbage collector compared with 3 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
ZGC garbage collector17771%10—Approved
G1 garbage collectorThis page6186%5——
Boehm GC5550%4——
Parallel GC (OpenJDK)5271%4——
See all 4 garbage collectors, ranked

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.”

MixedComment from 15 Sep 2026 in “Java 27”

“it is indeed quite fast with G1”

RecommendsComment from 15 Sep 2026 in “Java 27”

“the best place for it is fairly large heaps”

CriticizesComment from 4 Sep 2026 in “Why is Arrays.fill 265 times slower on G1GC?”

“I've been able to tune them out for nearly all workloads”

RecommendsComment from 19 Jul 2026 in “Minecraft: Java Edition now uses SDL3”

“is already faster and better than Python's”

RecommendsComment from 14 May 2026 in “Reverting the incremental GC in Python 3.14 and 3.15”

“G1 (the default, just don't add any flags).”

RecommendsComment from 19 Mar 2026 in “Java 26 is here, and with it a solid foundation for the future”

“It was a nasty surprise to us with G1 how much off heap memory was required”

CriticizesComment from 25 Feb 2026 in “Dissecting the CPU-Memory Relationship in Garbage Collection (OpenJDK 26)”

“G1GC when it was first introduced would create these massive bookkeeping structures in order to run collections”

MixedComment from 19 Feb 2026 in “Minecraft Java is switching from OpenGL to Vulkan”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.