18

Oct 10

Limiting Pause Time with G1 Collector

G1 collector is concurrent and parallel with more predictability and better useability. It splits the heap into regions and young and old generational spaces are organized in sets of regions. This eliminates the need to fine tune “NewSize/MaxNewSize”. G1 also provides incremental compaction in those regions by “evacuating” the regions that are full and fragmented. To try this G1 collector, you’ll need the aforementioned Fix Pack/Update and the following JVM options:

-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

In addition, the following options can be used to adjust G1’s characteristics:

To set the max GC pause time goal in milliseconds that G1 will attempt to meet:

-XX:MaxGCPauseMillis

To set the time interval over which GC pauses totaling up to MaxGCPauseMillis may take place:

-XX:GCPauseIntervalMillis

For more information about G1 (how it operates, more options, etc.) see Java HotSpot Garbage Collection.

No comments yet, be the first.

Leave a Reply