Why aren't there more pauseless GC's

Based on the Azul whitepaper on C4, it looks like C4 is a very new technology, an implementation of an algorithm published in 2005, first on custom hardware and then ported specifically to Linux on x86, and the JVM implementation sits very close to the kernel VM system.

Since OpenJDK/HotSpot is widely used on a number of platforms and in major production workloads, it tends to move more slowly when adopting major innovations in algorithms (the switch to TimSort is a good example). The Java 8 versions introduced the first major overhaul of the GC system in years (with the elimination of the PermGen), and improvements such as C4, if practical to be ported cross-platform or abstracted without significant downside to JVM bookkeeping internals, are likely to be tried out and then adopted into OpenJDK/HotSpot in upcoming versions.


Implementing garbage collectors is quite tricky and there are not many applications that truly justify a pauseless collector. As you mentioned, read/write barriers to impose a pretty high overhead that you only want to pay if you absolutely need low latency and are willing to take a hit on throughput.

That said, a low-pause GC called Shenandoah is being implemented in this JEP: http://openjdk.java.net/jeps/189 . As a Java programmer, I'm hopeful that it will be available in a few years.


ZGC

Starting from Java 11, there is a new Z Garbage Collector (ZGC) available for Linux/x64 JDK:

The Z Garbage Collector, also known as ZGC, is a scalable low latency garbage collector designed to meet the following goals:

  • Pause times do not exceed 10ms
  • Pause times do not increase with the heap or live-set size
  • Handle heaps ranging from a few hundred megabytes to multi terabytes in size

You can enable ZGC by specifying the following JVM arguments:

-XX:+UnlockExperimentalVMOptions -XX:+UseZGC

Shenandoah GC

Also, since Java 12, there is Shenandoah GC available for all platforms. ShenandoahGC has similar characteristics as ZGC but its implementation is different.