The Source for Java Technology Collaboration


HotSpot Options Affecting Garbage Collection:

Option Description
-verbose:gc
Turns on various forms of gc statistics gathering.
-XX:+PrintGCTimeStamps
Prints the times at which the GCs happen relative to the start of the application. (available beginning in J2SE? 1.4.0)
-XX:+PrintGCDetails
Gives details about the GCs (available beginning in J2SE? 1.4.0)
-Xincgc
Use Train GC (Java 1.4 and earlier) or Concurrent Mark Sweep collector (Java 5+)
-Xnoincgc
Do not use Train Garbage Collection (default)
-XX:MaxHeapFreeRatio=<Maximum>
Maximum percentage of heap free after GC to avoid shrinking (default 70)
-XX:MinHeapFreeRatio=<Minimum>
Minimum percentage of heap free after GC to avoid expansion (default 40)
-Xmn<Size>
Set the size of the young generation (available beginning in J2SE? 1.4.0)
-XX:+UseParallelGC
Use parallel garbage collection (available beginning in J2SE? 1.4.1)
-XX:+UseConcMarkSweepGC
Use concurrent garbage collector (available beginning with J2SE? 1.4.1)
-XX:MaxPermSize=64m
Size of the Permanent Generation
-XX:-PrintTenuringDistribution
Print tenuring age information
-XX:TargetSurvivorRatio=50
Desired percentage of survivor space used after scavenge
-XX:MaxTenuringThreshold=##
Need details
-XX:SurvivorRatio=##
Need details
-XX:-DisableExplicitGC
Disable calls to System.gc(), JVM still performs garbage collection when necessary

See Tuning Garbage Collection with the 5.0 Javatm Virtual Machine

See Tuning Garbage Collection with the 1.4.2 Virtual Machine

See GC Tuning (an older 1.3.1 reference.)

See Java HotSpot VM Options.

See Garbage Collection (GC) Analysis and Performance Tuning Using the GC Portal

Topic GarbageCollector . { Edit | Ref-By | Printable | Diffs r5 < r4 < r3 < r2 < r1 | More }
 XML java.net RSS

Revision r5 - 25 Oct 2005 - 03:05:07 - Main.swpalmer
Parents: WebHome