The G1 Garbage Collector

(dev.java)

41 points | by ejboy 3 days ago

5 comments

  • ahmedfromtunis 6 minutes ago
    I love that they also have learn.java and inside.java.

    They should make get.java point to the download page. Oh and docs.java would be very cool!

  • Fizzadar 42 minutes ago
    I remember switching on G1GC for Elasticsearch back in 2014 and it was a total game changer for cluster stability (ES had plenty of other warts back then to counter the improvement). Cool to see it land as the default everywhere over a decade later.
  • Sid_Lmao 3 days ago
    Easy-to-miss detail: before JDK 27, the JVM only picked G1 with 2+ CPUs and ~1.8 GB of memory; otherwise, it silently used SerialGC. So a lot of 1- CPU Kubernetes pods have been on serial all along. Worth checking with -XX:+PrintCommandLineFlags before upgrading, since GC behaviour will change.
    • citrin_ru 1 hour ago
      Isn't the reason for this that on a single core SerialGC is better (lower CPU overhead at least)?
      • antonhag 3 minutes ago
        Lower overhead yes - but G1 should have shorter pauses. And shorter pauses is probably worth it unless you run only background jobs in your jvms.
      • ch4s3 10 minutes ago
        I'd imagine so. The kind of bookkeeping they're talking about here would negatively effect performance on a single core.
  • _verandaguy 1 hour ago
    Tangential, but I really dislike that the `.java` gTLD was allowed to come about given it's also a reasonably popular file extension.

    The `.zip` gTLD set a really bad precedent.