Elasticsearch: Conflict using G1GC

Created on 15 Apr 2014  路  9Comments  路  Source: elastic/elasticsearch

I wanted to try the G1GC collector.
However when i start the server it gives me an error
bin/elasticsearch -XX:+UseG1GC
Conflicting collector combinations in option list; please refer to the release notes for the combinations allowed
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I can't understand what may be the issue. This is a fresh download of 1.1.0. Also tried on earlier versions, same problem. Do i have to set something special?

Thanks

Most helpful comment

Here's a convenient way to turn on G1GC using standard ES install:

ES_JAVA_OPTS="-XX:-UseParNewGC -XX:-UseConcMarkSweepGC -XX:+UseG1GC"

I tried this on a heavily loaded node that was unresponsive and it behaved much better. But then I turned it off based on the advice of the ES team.

We're on: Java(TM) SE Runtime Environment (build 1.7.0_72-b14). When the G1GC is ready for production please let us know. Thanks.

All 9 comments

in elasticsearch.bin.sh, there is the following lines:

JAVA_OPTS="$JAVA_OPTS -XX:+UseParNewGC"
JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC"

I wonder if you replace them with setting the G1GC it will fix it. In that case, it might make sense for us to have a simpler env var to set the GC to use.

Ok i replaced that it it works. Thanks!

Btw, we are still seeing, mainly in Apache Lucene tests, that G1 still causes unexpected failures. So we do still recommend using the default configuration in Elasticsearch until we are sure all bugs are properly ironed out.

Ok,
I wanted to try the G1GC because I am having a few problems i am unable to solve.
I start my server using
-Xms15G -Xmx15G mlockall:true ulimit:unlimited
I have only one index about 1 million documents about 3GB in size.
My query uses a filter in it.
What happens is that when i start my queries the heap size goes on increasing to about 97% and the entire system hangs for about 40 seconds till it frees a little heap bringing down the usage to 85% and continues.

I cannot understand what is filling up the heap . My filter cache size shows to be 3GB.
The field size shows 0.0
Id Cache size: 0.0

Is this behavior normal? Can i do something to improve this.?

Here's a convenient way to turn on G1GC using standard ES install:

ES_JAVA_OPTS="-XX:-UseParNewGC -XX:-UseConcMarkSweepGC -XX:+UseG1GC"

I tried this on a heavily loaded node that was unresponsive and it behaved much better. But then I turned it off based on the advice of the ES team.

We're on: Java(TM) SE Runtime Environment (build 1.7.0_72-b14). When the G1GC is ready for production please let us know. Thanks.

I'm also interested in running ES with G1GC. The mailing list does discuss some historical issues with trove4j and G1GC: http://elasticsearch-users.115913.n3.nabble.com/Anyone-have-G1-GC-working-What-environment-configs-td4039878.html but later discussion: http://elasticsearch-users.115913.n3.nabble.com/G1-Garbage-Collector-with-Elasticsearch-gt-1-1-td4058398.html doesn't mention any known issues in recent ES versions.

Some users are now using ES with G1GC: https://groups.google.com/forum/#!topic/elasticsearch/VQ4JhWvh1ow

FWIW: we are using G1GC with ElasticSearch 1.4.1 on our 4 socket, 256 GB setup.

There's nothing to do here at this time as we still do not advise using G1GC.

This this been resolved? or is there any news on use of G1GC?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthughes picture matthughes  路  3Comments

clintongormley picture clintongormley  路  3Comments

dadoonet picture dadoonet  路  3Comments

rpalsaxena picture rpalsaxena  路  3Comments

jasontedor picture jasontedor  路  3Comments