A Collection of JVM Options

22
A Collection of JVM Options compiled by: Joseph D. Mocker (Sun Microsystems, Inc.) revision: 28.Aug.2007 This document is a compilation of all the JVM options for various versions of the JVM on primarily SPARC/Solaris Platform. The descriptions for each option are taken mostly verbatim from the reference documents. The JavaTM HotSpot VM Options page makes some good points regarding the different types of options, which should be followed when reading this document as well. To paraphrase: Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages. Options that begin with -X are non-standard (not guaranteed to be supported on all VM implementations), and are subject to change without notice in subsequent releases of the Java 2 SDK. Because the -XX options have specific system requirements for correct operation and may require privileged access to system configuration parameters, they are not recommended for casual use. These options are also subject to change without notice. Please submit any comments, corrections, additions to [email protected] . Caveats: I am not associated with any Java Platform development group, I simply put this list together from the various reference sources I could find and without referring to any source code. I have done my best to ensure the options are valid for representative JVMs, however I have not tested every version of every JVM so it is quite possible that options may not be valid in all cases. Option Type 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Description -client bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Use Client HotSpot VM. Must be first option. -server bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Use Server HotSpot VM. Must be first option. -verbose[:class|gc|jni] bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable output of various pieces of the VM. specifying options twice may produce more detailed output. -cp path 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set search path for application classes and resources -classpath path 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set search path for application classes and resources -version bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 print product version and exit -showversion bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 print product version and continue -fullversion bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 print full java version and exit -agentlib:<libname>[=<options>] nv 1.6.0 load native agent library <libname>, e.g. - agentlib:hprof see also, - agentlib:jdwp=help and - agentlib:hprof=help -agentpath:<pathname>[=<options>] nv 1.6.0 load native agent library by full pathname -javaagent:<jarpath>[=<options>] nv 1.6.0 load Java programming language agent, see java.lang.instrument -d32 bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 use a 32-bit data model if available -d64 bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 use a 64-bit data model if available -ea[:packagename...|:classname] list 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable assertions -enableassertions[:packagename...|:classname] list 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable assertions -da[:packagename...|:classname] list 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 disable assertions -disableassertions[:packagename...|:classname] list 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 disable assertions -esa bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable system assertions -enablesystemassertions bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable system assertions -dsa bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 disable system assertions -disablesystemassertions bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 disable system assertions -Dname=value nv 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set a system property -jre-restrict-search bool 1.5.0 1.6.0 include user private JREs in the version search -jre-no-restrict-search bool 1.5.0 1.6.0 exclude user private JREs in the version search -Xt bool O O O O O O turn on instruction tracing -Xtm bool O O O O O O turn on method tracing 10/08/2010 A Collection of JVM Options blogs.sun.com/…/jvm-options-list.html 1/22

Transcript of A Collection of JVM Options

Page 1: A Collection of JVM Options

A Collection of JVM Options compiled by: Joseph D. Mocker (Sun Microsystems, Inc.) revision: 28.Aug.2007

This document is a compilation of all the JVM options for various versions of the JVM on primarilySPARC/Solaris Platform. The descriptions for each option are taken mostly verbatim from thereference documents.

The JavaTM HotSpot VM Options page makes some good points regarding the different types ofoptions, which should be followed when reading this document as well. To paraphrase:

Standard options recognized by the Java HotSpot VM are described on the Java ApplicationLauncher reference pages.Options that begin with -X are non-standard (not guaranteed to be supported on all VMimplementations), and are subject to change without notice in subsequent releases of theJava 2 SDK.Because the -XX options have specific system requirements for correct operation and mayrequire privileged access to system configuration parameters, they are not recommended forcasual use. These options are also subject to change without notice.

Please submit any comments, corrections, additions to [email protected] .

Caveats: I am not associated with any Java Platform development group, I simply put this listtogether from the various reference sources I could find and without referring to any source code. Ihave done my best to ensure the options are valid for representative JVMs, however I have nottested every version of every JVM so it is quite possible that options may not be valid in all cases.

Option Type 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Description-client bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Use Client HotSpot VM. Must be first

option.-server bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Use Server HotSpot VM. Must be first

option.-verbose[:class|gc|jni] bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable output of various pieces of the

VM. specifying options twice mayproduce more detailed output.

-cp path 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set search path for application classesand resources

-classpath path 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set search path for application classesand resources

-version bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 print product version and exit-showversion bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 print product version and continue-fullversion bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 print full java version and exit-agentlib:<libname>[=<options>] nv 1.6.0 load native agent library <libname>, e.g. -

agentlib:hprof see also, -agentlib:jdwp=help and -agentlib:hprof=help

-agentpath:<pathname>[=<options>] nv 1.6.0 load native agent library by full pathname-javaagent:<jarpath>[=<options>] nv 1.6.0 load Java programming language agent,

see java.lang.instrument-d32 bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 use a 32-bit data model if available-d64 bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 use a 64-bit data model if available-ea[:packagename...|:classname] list 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable assertions-enableassertions[:packagename...|:classname] list 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable assertions-da[:packagename...|:classname] list 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 disable assertions-disableassertions[:packagename...|:classname] list 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 disable assertions-esa bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable system assertions-enablesystemassertions bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable system assertions-dsa bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 disable system assertions-disablesystemassertions bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 disable system assertions-Dname=value nv 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set a system property-jre-restrict-search bool 1.5.0 1.6.0 include user private JREs in the version

search-jre-no-restrict-search bool 1.5.0 1.6.0 exclude user private JREs in the version

search-Xt bool O O O O O O turn on instruction tracing-Xtm bool O O O O O O turn on method tracing

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 1/22

Page 2: A Collection of JVM Options

-Xbootclasspath[/a|/p]:<path> list 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set, append to, or prepend to boot classpath

-Xdebug bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable remote debugging-Xfuture bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 enable strictest checks, anticipating

future default-Xcheck:jni bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 perform additional checks for JNI

functions-Xshare:off bool 1.6.0 do not attempt to use shared class data-Xshare:auto bool 1.6.0 use shared class data if possible

(default)-Xshare:on bool 1.6.0 require using shared class data,

otherwise fail.-Xnoclassgc bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 disable class garbage collection-Xss<size> size 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set maximum native stack size for any

thread-Xoss<size> size 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set maximum Java stack size for any

thread. Note: This option is useless withHotSpot as HotSpot doesn't haveseparate native and Java stacks.

-Xms<size> size 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set initial Java heap size-Xmx<size> size 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set maximum Java heap size-Xmn<size> size 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Size of young generation-Xrs bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 reduce the use of OS signals-Xrunhprof[:help]|[:option=value, ...] list 1.3.1 1.4.0 1.4.2 1.5.0 1.6.0 perform heap or cpu profiling-Xmaxjitcodesize<size> size 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 set the maximum size (in bytes) for the

JIT code area-Xsqnopause bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 do not pause for user interaction on

SIGQUIT-Xoptimize bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Use optimizing JIT compiler (SPARC

only). Replaced by -server in later VMs-Xmixed bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 mixed mode execution (default)-Xint bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 interpreted mode execution only-Xincgc bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Incremental GC-Xconcgc bool 1.4.1 1.4.2 1.5.0 1.6.0 Concurrent GC. Replaced by -

XX:+UseConcMarkSweepGC (availablebeginning with J2SE 1.4.1)

-Xprof bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Precursor to -Xrunprof.-Xaprof path 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Simple allocation profiler. unstable.

debug only.-Xloggc:<file> path 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Log garbage collection actions to a

specified file.-Xcomp bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Forces HotSpot to compile 100% of the

code with maximum optimization.-Xbatch bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Forces HotSpot to compile methods in

the foreground. Normally methodcompilation is moved from theforeground to a background process ifthey take long. This allows allows theinterpreted version to continue to run untilthe compiled version is complete. Thisoption prevents background compiling.

-Xconcurrentio bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 The main feature turned on with -Xconcurrentio is to use LWP basedsynchronization instead of thread basedsynchronization. We have found certainapplications to speed up by over 40%. In1.4, LWP based synchronization is thedefault, but -Xconcurrentio can still helpsince it turns on some other internaloptions.

-Xgenconfig bool 1.6.0 1.2 option only-Xverifyheap bool O O O O O Verify heap integrity. Replaced by -

XX:+VerifyBeforeGC -XX:+VerifyAfterGC -XX:+VerifyTLE (-XX:+VerifyTLAB in J2SE 1.4) -XX:+VerifyBeforeScavenge -

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 2/22

Page 3: A Collection of JVM Options

XX:+VerifyAfterScavenge (all debugonly)

-XX:AdaptivePermSizeWeight=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:AdaptiveSizeDecrementScaleFactor=<value> uintx 1.5.0 1.6.0 -XX:AdaptiveSizePolicyCollectionCostMargin=<value> uintx 1.5.0 1.6.0 -XX:AdaptiveSizePolicyFootprintThreshold=<value> uintx 1.5.0 -XX:AdaptiveSizePolicyInitializingSteps=<value> uintx 1.5.0 1.6.0 -XX:AdaptiveSizePolicyWeight=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:AdaptiveSizeThroughPutPolicy=<value> uintx 1.5.0 1.6.0 -XX:AdaptiveTimeWeight=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+AdjustConcurrency bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

HotSpot Performance Tuning

-XX:+AggressiveHeap bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 This option instructs the JVM to pushmemory use to the limit: the overall heapis more than 3850MB, the allocation areaof each thread is 256K, the memorymanagement policy defers collection aslong as possible, and (beginning withJ2SE 1.3.1_02) some GC activity isdone in parallel.

Big Heaps and Intimate Shared Memory (ISM)Tuning Garbage Collection with the 1.4.2 Java[tm] Virtual Machine

-XX:+AggressiveOpts bool 1.6.0 -XX:AliasLevel=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:AllocatePrefetchDistance=<value> intx 1.6.0 -XX:AllocatePrefetchInstr=<value> intx 1.6.0 -XX:AllocatePrefetchLines=<value> intx 1.6.0 -XX:AllocatePrefetchStepSize=<value> intx 1.6.0 -XX:AllocatePrefetchStyle=<value> intx 1.6.0 -XX:+AllowJNIEnvProxy bool 1.6.0 -XX:+AllowUserSignalHandlers bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Do not complain if the application installs

signal handlers (Solaris Only)Java HotSpot VM Options

-XX:AltStackSize=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 Alternate signal stack size (in Kbytes,Solaris Only)

Java HotSpot VM Options

-XX:+AlwaysActAsServerClassMachine bool 1.6.0 -XX:+AlwaysCompileLoopMethods bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:AlwaysInflate=<value> intx 1.6.0 -XX:+AlwaysPreTouch bool 1.6.0 -XX:+AlwaysTenure bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:AppendRatio=<value> intx 1.5.0 1.6.0 -XX:+BackgroundCompilation bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Enables or disables JIT compilation in

the background. When enabled,interpreted methods are still executeduntil background compilation iscomplete.

The Java HotSpot Virtual Machine Client Compiler

-XX:BaseFootPrintEstimate=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:BCEATraceLevel=<value> intx 1.6.0 -XX:BiasedLockingBulkRebiasThreshold=<value> intx 1.6.0 -XX:BiasedLockingBulkRevokeThreshold=<value> intx 1.6.0 -XX:BiasedLockingDecayTime=<value> intx 1.6.0 -XX:BiasedLockingStartupDelay=<value> intx 1.6.0 -XX:+BindCMSThreadToCPU bool 1.6.0 -XX:+BindGCTaskThreadsToCPUs bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+BindScavengeThreads bool 1.3.1 -XX:+BlockOffsetArrayUseUnallocatedBlock bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+BytecodeVerificationLocal bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

bool

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 3/22

Page 4: A Collection of JVM Options

-XX:+BytecodeVerificationRemote bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+CheckJNICalls bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+CheckUnsafeOps bool 1.4.0 1.4.1 1.4.2 1.5.0 -XX:CICompilerCount=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+CICompilerCountPerCPU bool 1.4.2 1.5.0 1.6.0 -XX:+CIDynamicCompilePriority bool 1.3.1 1.4.0 1.4.1 -XX:+CIMaxPriority bool 1.4.0 1.4.1 -XX:+CITime bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Time spent in JIT Compiler

Java HotSpot VM Options

-XX:+ClassUnloading bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:ClearFPUAtPark=<value> intx 1.6.0 -XX:+ClipInlining bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CMSAbortablePrecleanMinWorkPerIteration=<value> uintx 1.5.0 1.6.0 -XX:CMSAbortablePrecleanWaitMillis=<value> intx 1.5.0 1.6.0 -XX:+CMSAbortSemantics bool 1.6.0 -XX:CMSBitMapYieldQuantum=<value> uintx 1.4.2 1.5.0 -XX:CMSBootstrapOccupancy=<value> intx 1.5.0 1.6.0 -XX:+CMSClassUnloadingEnabled bool 1.4.1 1.4.2 1.5.0 1.6.0 It has been reported that for 1.5, this

apparently needs to be combined with -XX:+CMSPermGenSweepingEnabled inorder to take effect.

Java Developer Connection Bug Parade

-XX:+CMSCompactWhenClearAllSoftRefs bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+CMSConcurrentMTEnabled bool 1.6.0 -XX:CMSDictionaryChoice=<value> intx 1.4.0 -XX:CMSExpAvgFactor=<value> uintx 1.4.2 1.5.0 1.6.0 -XX:CMSFullGCsBeforeCompaction=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 Parameter that affects compaction of the

old generation. If at least this number ofconcurrent collections has not succeededbetween full collection, do a compactionon full collections. If 0, always docompactions on full collections whenUseCMSCompactAtFullCollection is true

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:CMSIncrementalDutyCycle=<value> uintx 1.4.2 1.5.0 1.6.0 -XX:CMSIncrementalDutyCycleMin=<value> uintx 1.4.2 1.5.0 1.6.0 -XX:+CMSIncrementalMode bool 1.4.2 1.5.0 1.6.0 -XX:CMSIncrementalOffset=<value> uintx 1.4.2 1.5.0 1.6.0 -XX:+CMSIncrementalPacing bool 1.4.2 1.5.0 1.6.0 -XX:CMSIncrementalSafetyFactor=<value> uintx 1.4.2 1.5.0 1.6.0 -XX:CMSIndexedFreeListReplenish=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CMSInitiatingOccupancyFraction=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 Sets the threshold percentage of the

used heap in the old generation at whichthe CMS collection takes place. Forexample, if set to 60, the CMS collectorwill be initiated every time the oldgeneration becomes 60% full. By default,this threshold is calculated at run time,and the CMS collector might be triggeredonly when the old generation heap isabout 80-90% full. Tuning this value canimprove performance in many cases.Since the CMS collector does notsuspend the mutators as it sweeps andfrees memory, setting this switch canensure that enough free memory isavailable for object promotion from theyoung generation as more data isallocated by the application. Sometimes,

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 4/22

Page 5: A Collection of JVM Options

if this switch is not tuned, CMS collectionmight not be able to keep up and mayfail, eventually triggering the default stop-the-world mark-compact collector.Available from J2SE1.4.1.

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual MachineTurbo-charging Java HotSpot Virtual Machine

-XX:+CMSLoopWarn bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CMSMarkStackSize=<value> uintx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CMSMarkStackSizeMax=<value> uintx 1.5.0 1.6.0 -XX:CMSMaxAbortablePrecleanLoops=<value> uintx 1.5.0 1.6.0 -XX:CMSMaxAbortablePrecleanTime=<value> intx 1.5.0 1.6.0 -XX:+CMSNoWarning bool 1.4.0 1.4.1

Java Developer Connection Bug Parade

-XX:+CMSParallelRemarkEnabled bool 1.4.2 1.5.0 1.6.0 Attempt to descrease remark pauseswhen used with -XX:+UseParNewGC.

Tuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineFrequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:+CMSParallelSurvivorRemarkEnabled bool 1.6.0 -XX:+CMSPermGenPrecleaningEnabled bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+CMSPermGenSweepingEnabled bool 1.4.1 1.4.2 1.5.0 1.6.0 It has been reported that for 1.5, this

apparently needs to be combined with -XX:+CMSClassUnloadingEnabled inorder to take effect.

-XX:+CMSPLABRecordAlways bool 1.6.0 -XX:CMSPrecleanDenominator=<value> uintx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+CMSPrecleaningEnabled bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CMSPrecleanIter=<value> uintx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CMSPrecleanNumerator=<value> uintx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+CMSPrecleanRefLists1 bool 1.5.0 1.6.0 -XX:+CMSPrecleanRefLists2 bool 1.5.0 1.6.0 -XX:+CMSPrecleanSurvivors1 bool 1.6.0 -XX:+CMSPrecleanSurvivors2 bool 1.6.0 -XX:CMSPrecleanThreshold=<value> uintx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CMSRescanMultiple=<value> uintx 1.4.2 1.5.0 1.6.0 -XX:CMSRevisitStackSize=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CMSSamplingGrain=<value> uintx 1.5.0 1.6.0 -XX:+CMSScavengeBeforeRemark bool 1.6.0 -XX:CMSScheduleRemarkEdenPenetration=<value> uintx 1.5.0 1.6.0 -XX:CMSScheduleRemarkEdenSizeThreshold=<value> uintx 1.5.0 1.6.0 -XX:CMSScheduleRemarkSamplingRatio=<value> uintx 1.5.0 1.6.0 -XX:CMSTriggerRatio=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+CMSUseOldDefaults bool 1.6.0 -XX:CMSWaitDuration=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CMSWorkQueueDrainThreshold=<value> uintx 1.4.2 1.5.0 1.6.0 -XX:+CMSYield bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CMSYieldQuantum=<value> intx 1.4.0 1.4.1 -XX:CMSYoungGenPerWorker=<value> intx 1.6.0 -XX:CodeCacheExpansionSize=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CodeCacheMinimumFreeSpace=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+CodeForP6 bool 1.3.1

Java Developer Connection Bug Parade

-XX:+CollectGen0First bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+CompactFields bool 1.6.0 -XX:CompilationPolicyChoice=<value> intx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CompilationRepeat=<value> intx 1.4.2 1.5.0 -XX:CompileCommand=<value> ccstr 1.4.2 1.5.0 1.6.0 -XX:CompileCommandFile=<value> ccstr 1.4.2 1.5.0 1.6.0 Allows you to specify alternate compiler

command files. When used, thisoverrides the default behavior of the VM

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 5/22

Page 6: A Collection of JVM Options

and the VM will NOT scan either thelibjvm.sl directory or the current directoryfor a .hotspot_compiler file.

SDK release notes 1.3.1.12

-XX:CompileOnly=<value> ccstr 1.4.2 1.5.0 1.6.0 -XX:+CompilerThreadHintNoPreempt bool 1.4.2 1.5.0 1.6.0 -XX:CompilerThreadPriority=<value> intx 1.4.2 1.5.0 1.6.0 -XX:CompilerThreadStackSize=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:CompileThreshold=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 number of method invocations/branches

before (re-)compiling [10,000 -server,1,500 -client]

Java HotSpot VM Options

-XX:+ConvertSleepToYield bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+ConvertYieldToSleep bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+DebugNonSafepoints bool 1.6.0 -XX:DefaultInitialRAMFraction=<value> uintx 1.5.0 1.6.0 -XX:DefaultMaxRAM=<value> uintx 1.5.0 1.6.0 -XX:DefaultMaxRAMFraction=<value> uintx 1.5.0 1.6.0 -XX:DefaultThreadPriority=<value> intx 1.4.2 1.5.0 1.6.0 -XX:DefaultTickInterval=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 O -XX:+DefaultUseSpecLock bool 1.3.1 1.4.0

Java Developer Connection Bug Parade

-XX:DeferPollingPageLoopCount=<value> intx 1.6.0 -XX:DeferThrSuspendLoopCount=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:DelayTickAdjustment=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 O -XX:+DisableAttachMechanism bool 1.6.0 -XX:+DisableExplicitGC bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Disable calls to System.gc(), JVM still

performs garbage collection whennecessary

Java HotSpot VM OptionsTuning Garbage Collection with the 1.4.2 Java[tm] Virtual Machine

-XX:+DisplayVMOutput bool 1.4.2 1.5.0 1.6.0 -XX:+DisplayVMOutputToStderr bool 1.5.0 1.6.0 -XX:+DisplayVMOutputToStdout bool 1.5.0 1.6.0 -XX:+DontCompileHugeMethods bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+DontYieldALot bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+DontYieldALotInterval bool Interval in milliseconds between yields.(debug only)

Java HotSpot VM Options

-XX:+DTraceAllocProbes bool 1.6.0 -XX:+DTraceMethodProbes bool 1.6.0 -XX:+DTraceMonitorProbes bool 1.6.0 -XX:+DumpSharedSpaces bool 1.5.0 1.6.0 -XX:+EagerInitialization bool 1.4.1

Java Developer Connection Bug Parade

-XX:+EagerXrunInit bool 1.4.2 1.5.0 1.6.0 -XX:EmitLFence=<value> intx 1.6.0 -XX:EmitSync=<value> intx 1.6.0 -XX:+EnableJVMPIInstructionStartEvent bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Enables or disables the JVMPI event,

JVMPI_EVENT_INSTRUCTION_START,which is sent when each instruction isissued by the interpreter

JavaTM Virtual Machine Profiler Interface (JVMPI)

-XX:ErrorFile=<value> ccstr 1.6.0 -XX:+EstimateArgEscape bool 1.6.0 -XX:EventLogLength=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 6/22

Page 7: A Collection of JVM Options

-XX:+ExitOnBadLibThread bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 -XX:+ExplicitGCInvokesConcurrent bool 1.6.0 -XX:+ExtendedDTraceProbes bool 1.6.0 -XX:+FailOverToOldVerifier bool 1.6.0 -XX:+FasterSync bool 1.3.1 -XX:+FastNMethodDependencies bool 1.4.1 1.4.2 1.5.0

Java Developer Connection Bug Parade

-XX:+FastTLABRefill bool 1.5.0 -XX:FieldsAllocationStyle=<value> intx 1.6.0 -XX:+FilterSpuriousWakeups bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:FloatCacheThreshold=<value> intx 1.4.0 -XX:+FLSVerifyAllHeapReferences bool 1.6.0 -XX:+FLSVerifyIndexTable bool 1.6.0 -XX:+FLSVerifyLists bool 1.6.0 -XX:+ForceSharedSpaces bool 1.5.0 1.6.0 -XX:+ForceTimeHighResolution bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+ForceUseSpecLock bool 1.3.1 1.4.0 Java Developer Connection Bug Parade

-XX:FreqInlineSize=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Integer specifying maximum number ofbytecode instructions in a frequentlyexecuted method which gets inlined.

Java HotSpot VM Options

-XX:+FullSpeedJVMDI bool 1.4.0 1.4.1 1.4.2 Java Developer Connection Bug Parade

-XX:GCHeapFreeLimit=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 Used with -XX:+UseParallelGC to helpprevent out-of-memory exceptions fromoccuring during garbage collection. Thisparameter specifies the lower limit on theamount of space freed during a garbagecollection in per cent of the maximumheap (default is 5).

Garbage Collector Ergonomics

-XX:GCTaskTimeStampEntries=<value> uintx 1.4.2 1.5.0 1.6.0 -XX:GCTimeLimit=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 Used with -XX:+UseParallelGC to help

prevent out-of-memory exceptions fromoccuring during garbage collection. Thisparameter specifies the upper limit onthe amount of time spent in garbagecollection in per cent of total time (defaultis 90)

Garbage Collector Ergonomics

-XX:GCTimeRatio=<value> uintx 1.5.0 1.6.0 The ratio of GC time to application time,ratio being: 1 / (1 + nnn). For example -XX:GCTimeRatio=19 sets a goal of 5%of the total time for GC.

Garbage Collector Ergonomics

-XX:+HandlePromotionFailure bool 1.5.0 1.6.0 -XX:hashCode=<value> intx 1.6.0 -XX:+HeapDumpOnOutOfMemoryError bool 1.6.0 -XX:HeapDumpPath=<value> ccstr 1.6.0 -XX:HPILibPath=<value> ccstr 1.6.0 -XX:InitialCodeCacheSize=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:InitialSurvivorRatio=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:InitialTenuringThreshold=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+Inline bool 1.3.1 1.4.1 1.4.2 1.5.0 1.6.0

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 7/22

Page 8: A Collection of JVM Options

Java Developer Connection Bug Parade

-XX:InlineSmallCode=<value> intx 1.3.1 1.4.2 -XX:+InlineUnreachedCalls bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 -XX:+InstallMethods bool 1.3.1 -XX:InterpreterProfilePercentage=<value> intx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+JavaMonitorsInStackTrace bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Useful to display more stack trace

information about monitorsJava Developer Connection Forums

-XX:JavaPriority1_To_OSPriority=<value> intx 1.4.2 1.5.0 1.6.0 -XX:JavaPriority10_To_OSPriority=<value> intx 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:JavaPriority2_To_OSPriority=<value> intx 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:JavaPriority3_To_OSPriority=<value> intx 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:JavaPriority4_To_OSPriority=<value> intx 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:JavaPriority5_To_OSPriority=<value> intx 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:JavaPriority6_To_OSPriority=<value> intx 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:JavaPriority7_To_OSPriority=<value> intx 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:JavaPriority8_To_OSPriority=<value> intx 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:JavaPriority9_To_OSPriority=<value> intx 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+JNIDetachReleasesMonitors bool 1.6.0 -XX:+JVMPICheckGCCompatibility bool 1.5.0 1.6.0 -XX:LargePageHeapSizeThreshold=<value> uintx 1.5.0 1.6.0 -XX:LargePageSizeInBytes=<value> uintx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+LazyBootClassLoader bool 1.6.0 -XX:+LIRCacheLocals bool 1.4.0 1.4.1 1.4.2 1.5.0

Java Developer Connection Bug Parade

-XX:+LIRFillDelaySlots bool 1.4.0 1.4.1 1.4.2 1.5.0 -XX:+LIROptimize bool 1.4.0 -XX:+LIROptimizeDeleteOps bool 1.4.0 -XX:+LIROptimizeFloats bool 1.4.0 -XX:+LIROptimizeStack bool 1.4.0 -XX:LocalCacheThreshold=<value> intx 1.4.0 -XX:+LogCompilation bool 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:LogFile=<value> ccstr 1.4.2 1.5.0 Java Developer Connection Bug Parade

-XX:+LogVMOutput bool 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:MallocVerifyInterval=<value> intx 1.6.0 -XX:MallocVerifyStart=<value> intx 1.6.0 -XX:+ManagementServer bool 1.5.0 1.6.0 -XX:MarkSweepAlwaysCompactCount=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:MarkSweepDeadRatio=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 8/22

Page 9: A Collection of JVM Options

Java Developer Connection Bug Parade

-XX:MaxBCEAEstimateLevel=<value> intx 1.6.0 -XX:MaxBCEAEstimateSize=<value> intx 1.6.0 -XX:MaxDirectMemorySize=<value> intx 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+MaxFDLimit bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Bump the number of file descriptors tomax. (Solaris only)

Java HotSpot VM Options

-XX:MaxGCMinorPauseMillis=<value> uintx 1.5.0 1.6.0 -XX:MaxGCPauseMillis=<value> uintx 1.5.0 1.6.0 A hint to the virtual machine that pause

times of nnn milliseconds or less aredesired. The vm will adjust the java heapsize and other gc-related parameters inan attempt to keep gc-induced pausesshorter than nnn milliseconds. Note thatthis may cause the vm to reduce overallthroughput, and in some cases the vmwill not be able to meet the desiredpause time goal.

Garbage Collector Ergonomics

-XX:MaxHeapFreeRatio=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 heap free percentage (default 70)Java HotSpot VM OptionsTuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineHotSpot Performance Tuning

-XX:MaxHeapSize=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:MaxInlineLevel=<value> intx 1.3.1 1.4.2

Java Developer Connection Bug Parade

-XX:MaxInlineSize=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Integer specifying maximum number ofbytecode instructions in a method whichgets inlined.

Java HotSpot VM Options

-XX:MaxJavaStackTraceDepth=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:MaxLiveObjectEvacuationRatio=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Forums

-XX:MaxNewSize=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Maximum size of new generation (inbytes) [32m sparc, 2.5m intel for 1.3, nolimit for 1.4 as NewRatio is now used todetermine MaxNewSize]

Frequently Asked Questions About the Java HotSpot VMTurbo-charging Java HotSpot Virtual MachineJava HotSpot VM Options

-XX:MaxPermHeapExpansion=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:MaxPermSize=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Size of the Permanent Generation

Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual MachineImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Java HotSpot VM OptionsTuning Garbage Collection with the 1.3.1 Java Virtual Machine

-XX:MaxRecursiveInlineLevel=<value> intx 1.3.1 1.4.2 -XX:MaxSurvivorShrinkRatio=<value> size_t 1.3.1 -XX:MaxTenuringThreshold=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 This switch determines how much the

objects may age in the young generationbefore getting promoted to the oldergeneration. The default value is 31. For abig enough young generation and"survivor space", the long-lived objectsmay be copied up to 31 times betweenthe survivor spaces before they are finallypromoted to the old generation.

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 9/22

Page 10: A Collection of JVM Options

Turbo-charging Java HotSpot Virtual MachineImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:MaxTickInterval=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 O -XX:MaxTLABRatio=<value> uintx 1.4.0 1.4.1 1.4.2 -XX:MaxTLERatio=<value> 1.3.1 1.6.0 -XX:MinHeapDeltaBytes=<value> uintx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:MinHeapFreeRatio=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 heap free percentage (default 40)

Java HotSpot VM OptionsTuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineTuning Garbage Collection with the 1.3.1 Java Virtual Machine

-XX:MinOldHeapExpansion=<value> size_t 1.3.1 -XX:MinPermHeapExpansion=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:MinSurvivorRatio=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:MinTickInterval=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 O -XX:MinTLABSize=<value> uintx 1.5.0 1.6.0 -XX:NativeSynchronization=<value> ccstr 1.5.0 -XX:+NeverActAsServerClassMachine bool 1.6.0 -XX:+NeverTenure bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:NewRatio=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Ratio of new/old generation sizes [sparc

-server: 2, sparc -client: 4 (1.3) 8(1.3.1+), intel: 12]

-XX:NewSize=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Default size of new generation (in bytes)[sparc 2.125M, intel: 640k]

Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual MachineTuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineFrequently Asked Questions About the Java HotSpot VMJava HotSpot VM OptionsImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1

-XX:NewSizeThreadIncrease=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 As more threads are created in a serverapplication, the object allocation ratemay increase with the number of activethreads. The number of active threads isconsidered when adjusting the size of theyoung space, after a garbage collection.This flag specifies, in Kilobytes, theincrement in young object space size,per active thread, to accomodatepotentially faster object allocation rate.

Java HotSpotTM Server VM Version 2.0 for Win32 Platforms

-XX:NmethodSweepFraction=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:NMethodSweepInterval=<value> 1.3.1 -XX:NUMAChunkResizeWeight=<value> intx 1.6.0 -XX:NUMAPageScanRate=<value> intx 1.6.0 -XX:NUMASpaceResizeRate=<value> intx 1.6.0 -XX:+NUMAStats bool 1.6.0 -XX:OldPLABSize=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:OldSize=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+OmitStackTraceInFastThrow bool 1.6.0 -XX:OnError=<value> ccstr 1.5.0 1.6.0 The Hotspot JVM includes a fatal error

hander that can run a user-supplied scriptor program if the JVM aborts. A debugtool can also connect to a hung JVM orcore file using the Hotspot JVMserviceability agent connector.

J2SE 1.5 in a Nutshell

-XX:OnOutOfMemoryError=<value> ccstr 1.6.0 -XX:OnStackReplacePercentage=<value> intx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:OnStackReplaceThreshold=<value> 1.3.1 -XX:+OptimizeSinglePrecision bool 1.4.0 -XX:+OverrideDefaultLibthread bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 On Solaris 9, this option is not

necessary. On Solaris 8, J2SE? versions1.3.1_02+ and 1.4+ require this option

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 10/22

Page 11: A Collection of JVM Options

when using the alternate threads library.This option is not possible on pre-Solaris8 operating environments.

Java Developer Connection ForumsJava HotSpot VM Options (docs.sun.com)

-XX:OversizedCarThreshold=<value> uintx 1.4.0 1.4.1 1.4.2 1.5.0 O -XX:ParallelGCBufferWastePct=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:ParallelGCG1AllocBufferSize=<value> intx 1.4.1 1.4.2 1.5.0 -XX:ParallelGCOldGenAllocBufferSize=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 Java 6: se -XX:OldPLABSize in place of

-XX:ParallelGCOldGenAllocBufferSize inthe future.

-XX:+ParallelGCRetainPLAB bool 1.5.0 1.6.0 -XX:ParallelGCTermSpinLoopMS=<value> intx 1.4.1 1.4.2 1.5.0 -XX:ParallelGCThreads=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 This switch sets the number of parallel

GC threads that the JVM must run forperforming garbage collection in theyoung generation. The default value of nis equal to the number of CPUs on thesystem. However, it has been observedthat tweaking this number may improveperformance in some cases. An examplemight be that of multiple instances ofJVM running on a single multi-CPUsystem. In this case, the number ofparallel GC threads for each JVM mayneed to be set to less than the number ofCPUs by using this switch. Availablefrom J2SE1.4.1.

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual MachineTuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineTurbo-charging Java HotSpot Virtual Machine

-XX:ParallelGCToSpaceAllocBufferSize=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 Java 6: Use -XX:YoungPLABSize inplace of -XX:ParallelGCToSpaceAllocBufferSizein the future.

-XX:+ParallelGCVerbose bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+ParallelRefProcEnabled bool 1.5.0 1.6.0 -XX:ParCMSPromoteBlocksToClaim=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 Java 6: Use -

XX:CMSParPromoteBlocksToClaim inplace of -XX:ParCMSPromoteBlocksToClaim inthe future.

-XX:ParGCArrayScanChunk=<value> intx 1.5.0 1.6.0 -XX:ParGCDesiredObjsFromOverflowList=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:ParGCMaxArrayAsNormalObject=<value> intx 1.4.1 1.4.2 -XX:+ParkTLE bool 1.3.1 -XX:+PassParametersInRegisters bool 1.3.1 -XX:+PauseAtStartup bool 1.6.0 -XX:PauseAtStartupFile=<value> ccstr 1.6.0 -XX:PerBytecodeRecompilationCutoff=<value> intx 1.6.0 -XX:PerBytecodeTrapLimit=<value> intx 1.6.0 -XX:+PerfAllowAtExitRegistration bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+PerfBypassFileSystemCheck bool 1.4.2 1.5.0 1.6.0 -XX:PerfDataMemorySize=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:PerfDataSamplingInterval=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+PerfDataSaveToFile bool 1.4.1 1.4.2 1.5.0 1.6.0

-XX:+PerfDisableSharedMem bool 1.4.1 1.4.2 1.5.0 1.6.0 1.4.2 HotSpot Instrumentation

-XX:PerfMaxStringConstLength=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:PerMethodRecompilationCutoff=<value> intx 1.6.0

intx 1.6.0

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 11/22

Page 12: A Collection of JVM Options

-XX:PerMethodTrapLimit=<value> intx 1.6.0 -XX:PermGenPadding=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:PermMarkSweepDeadRatio=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:PermSize=<value> uintx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Initial size of permanent generationImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:+PostSpinYield bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:PreBlockSpin=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+PreferInterpreterNativeStubs bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:PrefetchCopyIntervalInBytes=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Prefetch n bytes ahead for scavenge

copy destination area. The default is 0.The ideal value may vary depending onthe processor.

HotSpot Technology Tools and HP-Specific Features

-XX:PrefetchFieldsAhead=<value> intx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:PrefetchScanIntervalInBytes=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Prefetch n bytes ahead for scavenge

scan area. The default is 0. The idealvalue may vary depending on theprocessor.

HotSpot Technology Tools and HP-Specific Features

-XX:PrefetchScavengeFieldsAhead=<value> 1.3.1 Prefetch the next n fields of objectsduring scavenge. The default is 0. Theideal value may vary depending on theprocessor.

HotSpot Technology Tools and HP-Specific Features

-XX:PreInflateSpin=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+PreserveAllAnnotations bool 1.5.0 1.6.0 -XX:PreserveMarkStackSize=<value> uintx 1.5.0 1.6.0 -XX:+PreSpinYield bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:PretenureSizeThreshold=<value> uintx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Objects size greater than this is directly

allocated in the older generationImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:+PrintAdaptiveSizePolicy bool 1.4.1 1.4.2 1.5.0 1.6.0 Prints information about adaptive sizepolicy

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1

-XX:+PrintClassHistogram bool 1.4.2 1.5.0 1.6.0 Prints the all the java heap objects, theirinstance count and total space theyoccupy in the heap. The only downside isthat you need to issue a SIGQUIT (see -Xsqnopause) which will leave the apprunning but will dump all of this data tostdout. Very useful to assist in identifyingmemory problems for example on aproduction platform where an CPUintensive profiler cannot be used.

-XX:+PrintCMSInitiationStatistics bool 1.6.0 -XX:PrintCMSStatistics=<value> intx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 If > 0, Print statistics about the concurrent

collections. For example, the number oftimes the concurrent collection yield to ayoung generation collection and thenumber of cards precleaned

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1

-XX:+PrintCommandLineFlags bool 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+PrintCompilation bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 traces methods as compiledJava HotSpot VM Options

-XX:+PrintConcurrentLocks bool 1.6.0 intx 1.4.1 1.4.2 1.5.0 1.6.0 if > 0, print the populations of the CMS

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 12/22

Page 13: A Collection of JVM Options

-XX:PrintFLSCensus=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 if > 0, print the populations of the CMSfree lists

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1

-XX:PrintFLSStatistics=<value> intx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 If > 0, print statistics about the concurrentfree lists. For example, a fragmentationparameter

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1

-XX:+PrintGC bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1

-XX:+PrintGCApplicationConcurrentTime bool 1.4.2 1.5.0 1.6.0 Measure the amount of time theapplications runs between collectionpauses

Diagnosing a Garbage Collection problem

-XX:+PrintGCApplicationStoppedTime bool 1.4.2 1.5.0 1.6.0 Measure the length of the collectionpauses.

Diagnosing a Garbage Collection problem

-XX:+PrintGCDetails bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Gives some details about the GCs, suchas size of the young and old generationbefore and after GCs, size of total heap,time it takes for a GC to happen in youngand old generation, size of objectspromoted at every GC etc.

Tuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Turbo-charging Java HotSpot Virtual MachineFrequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:+PrintGCTaskTimeStamps bool 1.4.2 1.5.0 1.6.0 -XX:+PrintGCTimeStamps bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Prints the times at which the GCs happen

relative to the start of the applicationTurbo-charging Java HotSpot Virtual MachineImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1GC PortalTuning Garbage Collection with the 1.4.2 Java[tm] Virtual Machine

-XX:+PrintHeapAtGC bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Prints detailed GC info including heapoccupancy before and after GC.

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1

-XX:+PrintHeapAtSIGBREAK bool 1.6.0 -XX:+PrintHeapUsageOverTime bool Print heap usage and capacity with

timestampsImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1

-XX:+PrintInlining bool Print message about inlined methods(debug only)

Java HotSpot VM Options

-XX:+PrintInterpreter bool 1.6.0 -XX:+PrintJNIResolving bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+PrintParallelOldGCPhaseTimes bool 1.6.0 -XX:+PrintParScavenge bool 1.3.1 -XX:+PrintPLAB bool 1.6.0 -XX:+PrintScavenge bool 1.3.1

Java Developer Connection Bug Parade

-XX:+PrintSharedSpaces bool 1.5.0 1.6.0 -XX:+PrintTenuringDistribution bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Gives the aging distribution of the

allocated objects in the younggeneration. Tuning of -XX:NewSize, -XX:MaxNewSize, -XX:SurvivorRatio and-XX:MaxTenuringThreshold=0asdescribed earlier, should be directed bythe analysis of the output from this switchto determine that objects are not

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 13/22

Page 14: A Collection of JVM Options

prematurely promoted to the oldgeneration.

Turbo-charging Java HotSpot Virtual MachineImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Tuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineTuning Garbage Collection with the 1.3.1 Java Virtual MachineGC Portal

-XX:+PrintTLAB bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 trace all the operations on TLAB's(Thread Allocation Buffers)

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:+PrintTLE bool 1.3.1 1.6.0 -XX:+PrintVMOptions bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+PrintVMQWaitTime bool 1.6.0 -XX:ProcessDistributionStride=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:ProcessingToTenuringRatio=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 O -XX:+ProfileIntervals bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:ProfileIntervalsTicks=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:ProfileMaturityPercentage=<value> intx 1.6.0 -XX:+ProfilerLight bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 -XX:+ProfilerPrintByteCodeStatistics bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+ProfilerRecordPC bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+ProfileVM bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:PromotedPadding=<value> uintx 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:QueuedAllocationWarningCount=<value> intx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+RangeCheckElimination bool 1.6.0 -XX:ReadPrefetchInstr=<value> intx 1.6.0 -XX:ReadSpinIterations=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+ReduceSignalUsage bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:RefDiscoveryPolicy=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+RegisterFinalizersAtInit bool 1.6.0 -XX:+RelaxAccessControlCheck bool 1.6.0 -XX:+RequireSharedSpaces bool 1.5.0 1.6.0 -XX:ReservedCodeCacheSize=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Reserved code cache size (in bytes) -

maximum code cache size. [Solaris 64-bit: 1024m]

Java HotSpot VM Options

-XX:+ResizePLAB bool 1.6.0 -XX:+ResizeTLAB bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Enable or disable resizing of TLABs. The

-server VM has this option enabled bydefault.

Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:+ResizeTLE bool 1.3.1 1.6.0 Java Developer Connection Bug Parade

-XX:+RestoreMXCSROnJNICalls bool 1.6.0

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 14/22

Page 15: A Collection of JVM Options

-XX:+RewriteBytecodes bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+RewriteFrequentPairs bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+SafepointPolling bool 1.5.0 Java Developer Connection Bug Parade

-XX:SafepointSpinBeforeYield=<value> intx 1.6.0 -XX:+ScavengeBeforeFullGC bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:ScavengeThreads=<value> 1.3.1 -XX:SelfDestructTimer=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+SerializeVMOutput bool 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:SharedDummyBlockSize=<value> uintx 1.5.0 1.6.0 -XX:SharedMiscDataSize=<value> uintx 1.5.0 1.6.0 -XX:+SharedOptimizeColdStart bool 1.6.0 -XX:SharedReadOnlySize=<value> uintx 1.5.0 1.6.0 -XX:SharedReadWriteSize=<value> uintx 1.5.0 1.6.0 -XX:+SharedSkipVerify bool 1.6.0 -XX:+ShowMessageBoxOnError bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:SliceSizeInCards=<value> 1.3.1 -XX:SoftRefLRUPolicyMSPerMB=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Starting with Java HotSpot VM

implementations in J2SE 1.3.1, softlyreachable objects will remain alive forsome amount of time after the last timethey were referenced. The default valueis one second of lifetime per freemegabyte in the heap. This value can beadjusted using the -XX:SoftRefLRUPolicyMSPerMB flag,which accepts integer valuesrepresenting milliseconds per MB of freememory.

Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual MachineFrequently Asked Questions About the Java HotSpot VMTuning Garbage Collection with the 1.3.1 Java Virtual MachineTuning Garbage Collection with the 1.4.2 Java[tm] Virtual Machine

-XX:+SplitIfBlocks bool 1.6.0 -XX:StackRedPages=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:StackShadowPages=<value> intx 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+StackTraceInThrowable bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Enable or disable stack traces inexceptions.

The Java HotSpot Virtual Machine Client Compiler

-XX:StackYellowPages=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:Stage2CompileThreshold=<value> intx 1.4.0 -XX:+StagedCompilation bool 1.4.0 -XX:+StartAttachListener bool 1.6.0 -XX:StarvationMonitorInterval=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+StressLdcRewrite bool 1.6.0 -XX:+StressTieredRuntime bool 1.6.0 -XX:+SuppressFatalErrorMessage bool 1.6.0 -XX:SurvivorPadding=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:SurvivorRatio=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Sets the ratio of the survivor spaces

(there are two) to the whole of the younggeneration.

Turbo-charging Java HotSpot Virtual MachineA Test of Java Virtual Machine Performance

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 15/22

Page 16: A Collection of JVM Options

Tuning Garbage Collection with the 1.3.1 Java Virtual MachineTuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineFrequently Asked Questions About the Java HotSpot VMJava HotSpot VM OptionsFrequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:SuspendRetryCount=<value> intx 1.6.0 -XX:SuspendRetryDelay=<value> intx 1.6.0 -XX:SyncFlags=<value> intx 1.6.0 -XX:SyncKnobs=<value> ccstr 1.6.0 -XX:SyncVerbose=<value> intx 1.6.0 -XX:+TaggedStackInterpreter bool 1.6.0 -XX:TargetPLABWastePct=<value> intx 1.6.0 -XX:TargetSurvivorOccupationRatio=<value> size_t 1.3.1 -XX:TargetSurvivorPadding=<value> size_t 1.3.1 -XX:TargetSurvivorRatio=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 This flag sets the desired percentage of

the survivor space heap which must beused before objects are promoted to theold generation. For example, setting z to90 would mean that 90% of the survivorspace must be used before the younggeneration is considered full and objectsare promoted to the old generation. Thiswould allow objects to age more in theyoung generation before being tenured.The default value is 50.

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual MachineJava HotSpot VM Options

-XX:TenuredGenerationSizeIncrement=<value> uintx 1.5.0 1.6.0 -XX:TenuredGenerationSizeSupplement=<value> uintx 1.5.0 1.6.0 -XX:TenuredGenerationSizeSupplementDecay=<value> uintx 1.5.0 1.6.0 -XX:ThreadPriorityPolicy=<value> intx 1.5.0 1.6.0 -XX:+ThreadPriorityVerbose bool 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:ThreadSafetyMargin=<value> intx 1.5.0 1.6.0 -XX:ThreadStackSize=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Thread Stack Size (in Kbytes) (0 means

use default stack size) [Sparc: 512,Solaris Intel: 256, Sparc 64bit: 1024 allothers 0]

Java HotSpot VM Options

-XX:ThresholdTolerance=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:Tier1BytecodeLimit=<value> intx 1.6.0 -XX:+Tier1UpdateMethodData bool 1.6.0 -XX:Tier2BackEdgeThreshold=<value> intx 1.6.0 -XX:Tier2CompileThreshold=<value> intx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+TieredCompilation bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:TLABAllocationWeight=<value> uintx 1.5.0 1.6.0 -XX:TLABFragmentationRatio=<value> uintx 1.4.0 1.4.1 1.4.2 -XX:TLABRefillWasteFraction=<value> uintx 1.5.0 1.6.0 -XX:TLABSize=<value> uintx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Set the size of the TLAB in bytes.

Java and Solaris Threading

-XX:+TLABStats bool 1.5.0 1.6.0 -XX:TLABThreadRatio=<value> uintx 1.4.0 1.4.1 1.4.2

Java Developer Connection Bug Parade

-XX:TLABWasteIncrement=<value> uintx 1.5.0 1.6.0 -XX:TLABWasteTargetPercent=<value> uintx 1.5.0 1.6.0 -XX:TLEFragmentationRatio=<value> 1.3.1 1.6.0 -XX:TLESize=<value> size_t 1.3.1 1.6.0 Sets the size of the TLEs (in bytes)

Java and Solaris Threading

-XX:TLEThreadRatio=<value> 1.3.1 1.6.0 Java Developer Connection Bug Parade

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 16/22

Page 17: A Collection of JVM Options

-XX:+TraceBiasedLocking bool 1.6.0 -XX:+TraceClassLoading bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Display classes as they are loaded.

Similar to -verbose:class-XX:+TraceClassLoadingPreorder bool 1.4.2 1.5.0 1.6.0 -XX:+TraceClassResolution bool 1.4.2 1.5.0 1.6.0 -XX:+TraceClassUnloading bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Display classes as they are unloaded.

Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:+TraceFailedVMTextSegmentRetarget bool 1.4.0 1.4.1 -XX:+TraceGen0Time bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+TraceGen1Time bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:TraceJVMTI=<value> ccstr 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+TraceJVMTIObjectTagging bool 1.5.0 1.6.0 -XX:+TraceLoaderConstraints bool 1.6.0 -XX:+TraceMonitorInflation bool 1.6.0 -XX:+TraceParallelOldGCTasks bool 1.6.0 -XX:TraceRedefineClasses=<value> intx 1.6.0 -XX:TypeProfileFailureLimit=<value> intx 1.4.0 1.4.1 1.4.2 1.5.0 -XX:TypeProfileMinimumRatio=<value> intx 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:Ultra3PrefetchCopyIntervalInBytes=<value> 1.3.1 -XX:Ultra3PrefetchScanIntervalInBytes=<value> 1.3.1 -XX:Ultra3PrefetchScavengeFieldsAhead=<value> 1.3.1 -XX:UnguardOnExecutionViolation=<value> intx 1.6.0 -XX:+UnlockDiagnosticVMOptions bool 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+Use486InstrsOnly bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+UseAdaptiveGCBoundary bool 1.5.0 1.6.0 -XX:+UseAdaptiveGenerationSizePolicyAtMajorCollection

bool 1.5.0 1.6.0

-XX:+UseAdaptiveGenerationSizePolicyAtMinorCollection

bool 1.5.0 1.6.0

-XX:+UseAdaptiveNUMAChunkSizing bool 1.6.0 -XX:+UseAdaptiveSizeDecayMajorGCCost bool 1.6.0 -XX:+UseAdaptiveSizePolicy bool 1.4.1 1.4.2 1.5.0 1.6.0 Automatically sizes the young generation

and chooses an optimum survivor ratio tomaximize performance.

Garbage Collector ErgonomicsImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Tuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineFrequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:+UseAdaptiveSizePolicyAggressiveFootprintGoal bool 1.5.0 -XX:+UseAdaptiveSizePolicyFootprintGoal bool 1.5.0 1.6.0 -XX:+UseAdaptiveSizePolicyWithSystemGC bool 1.5.0 1.6.0 -XX:+UseAdaptiveSizeScaleFootprintChangeByRatio bool 1.5.0 -XX:+UseAdaptiveSizeScaleThroughputChangeByRatio bool 1.5.0 -XX:+UseAltSigs bool 1.3.1 1.4.1 1.4.2 1.5.0 1.6.0 On the Solaris operating environment,

the VM uses SIGUSR1 by default, whichcan sometimes conflict with applicationsthat signal-chain SIGUSR1. -XX:+UseAltSigs will cause the VM to usesignals other than SIGUSR1 andSIGUSR2 as the default.

Java HotSpot VM Options

-XX:+UseAutoGCSelectPolicy bool 1.6.0 -XX:+UseBiasedLocking bool 1.5.0 1.6.0 This option first appears in 1.5.0_06.

Enables a technique for improving theperformance of uncontendedsynchronization. Some applications withsignificant amounts of uncontendedsynchronization may attain significantspeedups with this flag enabled.

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 17/22

Page 18: A Collection of JVM Options

Java Tuning White Paper

-XX:+UseBoundThreads bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Bind user level threads (Solaris only)A Test of Java Virtual Machine PerformanceJava HotSpot VM OptionsJava and Solaris ThreadingFrequently Asked Questions About the Java HotSpot VM

-XX:+UseC2CallingConventions bool 1.3.1 1.4.0 1.4.1 1.4.2 Java Developer Connection Bug Parade

-XX:+UseCMSBestFit bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+UseCMSCollectionPassing bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+UseCMSCompactAtFullCollection bool 1.4.1 1.4.2 1.5.0 1.6.0 Normally the concurrent low pause

collector does not copy nor compact thelive objects. A garbage collection is donewithout moving the live objects. Iffragmentation becomes a problem,allocate a larger heap. In 1.4.2 iffragmentation in the tenured generationbecomes a problem, a compaction of thetenured generation will be done althoughnot concurrently. In 1.4.1 that compactionwill occur if theUseCMSCompactAtFullCollection optionis turned on.

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:+UseCMSInitiatingOccupancyOnly bool 1.4.1 1.4.2 1.5.0 1.6.0 Used to enabled/disable the use of theanticipated promotions to start aconcurrent collection set

Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine

-XX:+UseCompiler bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+UseCompilerSafepoints bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+UseConcMarkSweepGC bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 This flag turns on concurrent garbagecollection in the old generation. Availablefrom J2SE1.4.1.

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual MachineTuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineTurbo-charging Java HotSpot Virtual MachineJava HotSpot VM Options

-XX:+UseDefaultStackSize bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 -XX:+UseDepthFirstScavengeOrder bool 1.6.0 -XX:+UseExtendedFileIO bool 1.6.0 -XX:+UseFastAccessorMethods bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+UseFastEmptyMethods bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+UseFastJNIAccessors bool 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+UseFixedFrameSize bool 1.4.0 1.4.1 1.4.2 Java Developer Connection Bug Parade

-XX:+UseForcedSuspension bool 1.4.1 1.4.2 Java Developer Connection Bug Parade

-XX:+UseGCOverheadLimit bool 1.6.0 -XX:+UseGCTaskAffinity bool 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+UseHeavyMonitors bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+UseInterpreter bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 18/22

Page 19: A Collection of JVM Options

Java Developer Connection Bug Parade

-XX:+UseISM bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Intimate Shared MemoryBig Heaps and Intimate Shared Memory (ISM)Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Java HotSpot VM Options

-XX:+UseLargePages bool 1.6.0 -XX:+UseLargePageSize bool 1.4.0 1.4.1 -XX:+UseLoopCounter bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+UseLWPSynchronization bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Use LWP-based instead of thread basedsynchronization. Default is on in J2SE1.4.0 or higher. (Solaris only)

Java and Solaris ThreadingJava HotSpot VM Options

-XX:+UseMaximumCompactionOnSystemGC bool 1.6.0 -XX:+UseMembar bool 1.6.0 -XX:+UseMPSS bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Use Multiple Page Size Support (Solaris

9 only) w/4mb pages for the heap. Do notuse with ISM as this replaces the needfor ISM.

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Java HotSpot VM Options

-XX:+UseNewCode bool 1.6.0 -XX:+UseNewCode2 bool 1.6.0 -XX:+UseNewCode3 bool 1.6.0 -XX:+UseNewFeature1 bool 1.4.2 1.5.0 -XX:+UseNewFeature2 bool 1.4.2 1.5.0 -XX:+UseNewFeature3 bool 1.4.2 1.5.0 -XX:+UseNewFeature4 bool 1.4.2 1.5.0 -XX:+UseNiagaraInstrs bool 1.6.0 -XX:+UseOnStackReplacement bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+UseOversizedCarHandling bool 1.4.0 1.4.1 1.4.2 1.5.0 O -XX:+UseParallelDensePrefixUpdate bool 1.6.0 -XX:+UseParallelGC bool 1.4.1 1.4.2 1.5.0 1.6.0 This flag also turns on parallel garbage

collection policy in the young generation;however, it does not work with the CMScollector in the old generation. It is moresuitable for enterprise applications whichcan benefit from very large younggeneration heaps.

Garbage Collector ErgonomicsFrequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual MachineImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Tuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineTurbo-charging Java HotSpot Virtual Machine

-XX:+UseParallelOldGC bool 1.6.0 -XX:+UseParallelOldGCCompacting bool 1.6.0 -XX:+UseParallelOldGCDensePrefix bool 1.6.0 -XX:+UseParallelScavenge bool 1.3.1

Java Developer Connection Forums

-XX:+UseParNewGC bool 1.4.1 1.4.2 1.5.0 1.6.0 This flag turns on parallel garbagecollection in the young generation. It canbe enabled together with the CMScollector in the old generation. Availablein J2SE1.4.1 on an experimental basis.

Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual MachineTuning Garbage Collection with the 1.4.2 Java[tm] Virtual MachineDiagnosing a Garbage Collection problemTurbo-charging Java HotSpot Virtual Machine

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 19/22

Page 20: A Collection of JVM Options

-XX:+UsePerfData bool 1.4.1 1.4.2 1.5.0 1.6.0 1.4.2 HotSpot Instrumentation

-XX:+UsePermISM bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 HotSpot Performance Tuning

-XX:+UsePSAdaptiveSurvivorSizePolicy bool 1.5.0 1.6.0 -XX:+UseRecompilation bool 1.3.1

Java Developer Connection Bug Parade

-XX:+UseResizableSurvivorSpaces bool 1.3.1 -XX:+UseSerialGC bool 1.5.0 1.6.0 Enable the "legacy" serial garbage

collector. The 1.5+ collectors aregenerally more robust now, and thisgarbage collector will not be supportedmuch longer

Garbage Collector Ergonomics

-XX:+UseSharedSpaces bool 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+UseSignalChaining bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+UseSpecLock bool 1.3.1 1.4.0 Java Developer Connection Bug Parade

-XX:+UseSpinning bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+UseSplitVerifier bool 1.5.0 1.6.0 -XX:UseSSE=<value> intx 1.5.0 1.6.0 From Bug 5108893, The option probably

indicates whether the compiler shouldmake use of the processor's SSEiinstructions and is only available in serverVMs.

-XX:+UseStoreImmI16 bool 1.6.0 -XX:+UseSuspendResumeThreadLists bool 1.4.2 1.5.0 1.6.0 -XX:+UseThreadPriorities bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Use native thread priorities

HotSpot Performance TuningJava HotSpot VM Options

-XX:+UseTLAB bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Turn off thread-local object allocationJava HotSpot VM OptionsImproving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1Java and Solaris Threading

-XX:+UseTLE bool 1.3.1 1.6.0 Turn off thread local portions of the heapin the young generation

Java HotSpot VM OptionsJava and Solaris Threading

-XX:+UseTrainGC bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 O Java Developer Connection Bug Parade

-XX:+UseTypeProfile bool 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 Java Developer Connection Bug Parade

-XX:+UseUnsupportedDeprecatedJVMPI bool 1.6.0 -XX:+UseVectoredExceptions bool 1.6.0 -XX:+UseVMInterruptibleIO bool 1.6.0 -XX:ValueMapBucketInitialSize=<value> intx 1.4.0 -XX:ValueMapBucketMaxSize=<value> intx 1.4.0 -XX:ValueMapMaxSize=<value> intx 1.4.0 -XX:+VerifyAfterGC bool 1.6.0

Java HotSpot VM Options

-XX:+VerifyAfterScavenge bool Java HotSpot VM Options

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 20/22

Page 21: A Collection of JVM Options

-XX:+VerifyBeforeExit bool 1.6.0 -XX:+VerifyBeforeGC bool 1.6.0

Java HotSpot VM Options

-XX:+VerifyBeforeIteration bool 1.5.0 1.6.0 -XX:+VerifyBeforeScavenge bool

Java HotSpot VM Options

-XX:+VerifyDuringGC bool 1.6.0 -XX:VerifyGCLevel=<value> intx 1.6.0 -XX:+VerifyMergedCPBytecodes bool 1.6.0 -XX:+VerifyObjectStartArray bool 1.6.0 -XX:+VerifyRememberedSets bool 1.6.0 -XX:+VerifyTLAB bool 1.4.2

Java HotSpot VM Options

-XX:+VerifyTLE bool Java HotSpot VM Options

-XX:+VMThreadHintNoPreempt bool 1.4.2 1.5.0 1.6.0 -XX:VMThreadPriority=<value> intx 1.4.2 1.5.0 1.6.0 -XX:VMThreadStackSize=<value> intx 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:WorkAroundNPTLTimedWaitHang=<value> intx 1.6.0 -XX:YoungGenerationSizeIncrement=<value> uintx 1.5.0 1.6.0 -XX:YoungGenerationSizeSupplement=<value> uintx 1.5.0 1.6.0 -XX:YoungGenerationSizeSupplementDecay=<value> uintx 1.5.0 1.6.0 -XX:YoungPLABSize=<value> uintx 1.4.1 1.4.2 1.5.0 1.6.0 -XX:+ZeroTLAB bool 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0

Java Developer Connection Bug Parade

-XX:+ZeroTLE bool 1.3.1 Java Developer Connection Bug Parade

References:

1. JVM Performance Documentation2. Analyzing Stack Traces3. Turbo-charging Java HotSpot Virtual Machine4. Java HotSpot VM Options5. Tuning Garbage Collection with the 1.3.1 Java Virtual Machine6. Java and Solaris Threading7. Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual

Machine8. Tuning Garbage Collection with the 1.4.2 Java[tm] Virtual Machine9. Improving Java Application Performance and Scalability by Reducing Garbage Collection

Times and Sizing Memory Using JDK 1.4.110. Big Heaps and Intimate Shared Memory (ISM)11. A Test of Java Virtual Machine Performance12. HotSpot Performance Tuning13. The Java HotSpot Virtual Machine Client Compiler14. Java Developer Connection Bug Parade15. SDK release notes 1.3.1.1216. JavaTM Virtual Machine Profiler Interface (JVMPI)17. Garbage Collector Ergonomics18. Java Developer Connection Forums19. Frequently Asked Questions About the Java HotSpot VM20. Java HotSpotTM Server VM Version 2.0 for Win32 Platforms21. J2SE 1.5 in a Nutshell22. 1.4.2 HotSpot Instrumentation23. HotSpot Technology Tools and HP-Specific Features24. Diagnosing a Garbage Collection problem25. GC Portal26. HotSpot Performance Tuning27. Java HotSpot VM Options (docs.sun.com)28. Java Tuning White Paper

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 21/22

Page 22: A Collection of JVM Options

10/08/2010 A Collection of JVM Options

blogs.sun.com/…/jvm-options-list.html 22/22