G1 with Solr - thread from dev at lucene.apache.org

Shawn Heisey java at elyograg.org
Tue Dec 23 21:04:57 UTC 2014


On 12/23/2014 10:55 AM, Thomas Schatzl wrote:
> Remove NewRatio. This will severely limit adaptiveness.
> 
>> -XX:+ParallelRefProcEnabled
>> -XX:maxGCPauseMillis=200
> 
> Use "MaxGCPauseMillis" with capital M.
> 
>> -XX:+UseLargePages \
>> -XX:+AggressiveOpts \
>> "
> 
> I.e.
> 
> JVM_OPTS=" \
>   -XX:+UseG1GC \
>   -XX:+ParallelRefProcEnabled \
>   -XX:MaxGCPauseMillis=200 \
>   -XX:+UseLargePages \
>   -XX:+AggressiveOpts

That's what I ultimately ended up with.  I don't have a lot of runtime
yet, but this is looking REALLY good.  It looks like parallel reference
processing and waiting for a later Java 7 release were the secrets to
using G1 effectively.

https://www.dropbox.com/s/bhq97ishhb8d94w/g1gc-with-parallel-ref.png?dl=0

Here's the GC log for that graph:

https://www.dropbox.com/s/9g687luo60bd4r0/g1gc-with-parallel-ref.log?dl=0

I got a little runtime in before removing NewRatio.  It's not quite as
good as the graph/log above, so removing it was a good thing:

https://www.dropbox.com/s/ups6r2hohrnfcud/g1gc-with-parallel-ref-and-newratio-3.png?dl=0

https://www.dropbox.com/s/ccwu7axgdebywjt/g1gc-with-parallel-ref-and-newratio-3.log?dl=0

After I've got a few hours (and ultimately a few days) of runtime on the
new settings, I will grab the log and graph it again.

Many thanks for all your help!

Shawn



More information about the hotspot-gc-use mailing list