GC Settings for Elasticsearch

(Michael Rennecke) #1


my chief architect means G1GC is awesome and works better then default GC. He mentioned, https://www.elastic.co/guide/en/elasticsearch/guide/current/_don_8217_t_touch_these_settings.html is outdated. We run Elasticsearch with oracle java 8 with "-Xms28g -Xmx28g -XX:+UseG1GC -XX:+UseCompressedOops -XX:+AlwaysPreTouch ....". I feel, that the original settings works better

Does anyone know of reasons why default GC is better? Sorry for stupid question, but I'm not professional with GC tuning. I need a few reasons to convince my chief architect....


(Mark Walkom) #2

Take a look at http://wiki.apache.org/lucene-java/JavaBugs and you will see why we don't support G1GC.

(Jörg Prante) #3

Your chief architect is right and does not need to be convinced. G1GC is awesome and solves many of my challenges with heap scalability and low latency.

Quoting Uwe Schindler, Lucene committer:

On the other hand Oracle works very much on G1 to guarantee speed and accuracy. When observing the Lucene builds during recent months, the Lucene team noticed that the errors initially seen no longer occurred. This is also consistent with the statement by Oracle that G1GC is “ready for production” in Java 8 Update 40.

(Mark Walkom) #4


I guess that applies to java 9, which I don't think we are saying is yet compatible with ES.

(Nik Everett) #5

Maybe I'm just paranoid, but I'm not going to use g1 until people say its safe in https://issues.apache.org/jira/browse/LUCENE-5168 - there is just too much history of it not working.

I'd love to use. Really really really would.

(Jörg Prante) #6

I tried to reproduce the issues in my specific setup extensively, but I could not reproduce G1 related failures, since Java 8u5. The setup is Red Hat Linux 6.6/7, physical machines (no virtual machines), 64 bit, Java 8.

Since I studied the ongoing OpenJDK and G1 developments, and also Linux kernel related issues with JVM on low level, I am familiar with that problem space. I am confident I can fix any issues thanks to the open source stack.

(Jörg Prante) #7

It applies to Java 8u40+

(Nik Everett) #8

If you can debug GC issues then you are the perfect person to use it. I think its worth putting your notes in that issue though.

(Mark Walkom) #9

Interestingly there is this article on the same site as the OP, 3 days earlier - http://jaxenter.com/kirk-pepperdine-on-the-g1-for-java-9-118190.html

Kirk Pepperdine on the G1 for Java 9: “I’d like to see more time before making it the default”

(Michael Rennecke) #10


(system) #11