Wednesday, June 3, 2009

Java new garbage collector

http://java.sun.com/javase/6/webnotes/6u14.html

In the latest release 1.6.0_14 (6u14) , a new G1 garbage collector is included.

To try G1, specify these command line options:

-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

In addition, the following options can be used to affect G1's behaviour:

  • To set the max GC pause time goal in milliseconds that G1 will attempt to meet:
     -XX:MaxGCPauseMillis=<x> 
  • To set the time interval over which GC pauses totaling up to MaxGCPauseMillis may take place:
    -XX:GCPauseIntervalMillis=<x>

But before you try on this new G1 garbage collector, you need to obtain the Java SE for Business support contract. Seem like the Oracle phenomena is stared.