Pivotal Knowledge Base

Follow

Error when setting G1 GC for locator process

Applies to

GemFire 6 - 8

Issue

You want to change the garbage collection for the locator process to make it use a different garbage collector. By default, even if you do not specify any garbage collection in the startup scripts, the followoing value for GC is set:

-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=60

If you try and use any other garbage collector, by specifying as JVM arguments in the startup script then it throws the following error:
Conflicting collector combinations in option list; please refer to the release notes for the combinations allowed

Solution

Using parameters '--initial-heap' and '--max-heap' enforces GemFire to use default JVM resource management properties. As a result default collector 'XX:+UseConcMarkSweepGC' and 'XX:CMSInitiatingOccupancyFraction=60' come into effect. Please refer to page 714 of the GemFire 7.0.2 User's Guide under section 'start locator' for more details.

In order to use G1 GC you need to use -Xms and -Xmx instead of '--initial-heap' and '--max-heap' respectively.

Example:

start locator --name=locator2 --port=41112 --dir=locator2 --properties-file=gemfire.properties --J=-XX:+UseG1GC --J=-Xms256m --J=-Xmx512m

Comments

Powered by Zendesk