Tuning GC algorithms

Introduction

There are several Garbage Collection algorithms available in Java. You can find the supported JDKs in our product requirements section.

We will review some of the available GCs and their main features.

G1

This is the default GC algorithm since Java 9. This is the one used for internal testing and used by default in neo4j. It is available in every implementation.

Shenandoah

It is officially available in some releases of OpenJDK since Java 8.

It is currently not available in Oracle JDK.

It allows you to have pauseless GCs (<10 ms) but at the expense of an higher CPU usage (20% additional CPU runtime usage).

Warning
Please note that we do NOT test those algorithms therefore we will NOT be able to emit a recommendation. Customers are free to test it on a lower environment and choose the one that suits them the best.

You can enable it by commenting the default dbms.jvm.additional=-XX:+UseG1GC and adding dbms.jvm.additional=-XX:+UseShenandoahGC in neo4j.conf

#dbms.jvm.additional=-XX:+UseG1GC
dbms.jvm.additional=-XX:+UseShenandoahGC

You can find more information here

C4 Azul

This version had its own proprietary pauseless algorithm which is supported. This is a paid algorithm so you might need to get a licence first.

You can find more information here

Warning
Please note that we do NOT test those algorithms therefore we will NOT be able to emit a recommendation. Customers are free to test it on a lower environment and choose the one that suits them the best. ”’
  • Last Modified: 2020-10-22 22:13:22 UTC by Jeremie Phoulchand.
  • Relevant for Neo4j Versions: 3.5, 4.0.
  • Relevant keywords configuration.