IBM User Guide for Java V7 on Windows > Reference > Command-line options
Garbage Collector command-line options
Use these Garbage Collector command-line options to control garbage collection.
You might need to read The collector and the allocator to understand some of the references that are given here.
The -verbose:gc option detailed in Verbose garbage collection logging is the main diagnostic aid that is available for runtime analysis of the Garbage Collector. However, additional command-line options are available that affect the behavior of the Garbage Collector and might aid diagnostics data collection.
For options that take a <size> parameter, suffix the number with "k" or "K" to indicate kilobytes, "m" or "M" to indicate megabytes, or "g" or "G" to indicate gigabytes.
For options that take a <percentage> parameter, use a number from 0 to 1, for example, 50% is 0.5.
- -Xalwaysclassgc
Always perform dynamic class unloading checks during global collection.- -Xclassgc
Enables dynamic unloading of classes by the JVM.- -Xcompactexplicitgc
Enables full compaction each time System.gc() is called.- -Xcompactgc
Compacts on all garbage collections (system and global).- -Xconcurrentbackground
Specifies the number of low-priority background threads attached to assist the mutator threads in concurrent mark.- -Xconcurrentlevel
Specifies the allocation "tax" rate.- -Xconcurrentslack
Attempts to keep the specified amount of the heap space free in concurrent collectors by starting the concurrent operations earlier.- -Xconmeter
This option determines the usage of which area, LOA (Large Object Area) or SOA (Small Object Area), is metered and hence which allocations are taxed during concurrent mark.- -Xdisableexcessivegc
Disables the throwing of an OutOfMemory exception if excessive time is spent in the GC.- -Xdisableexplicitgc
Disables System.gc() calls.- -Xdisablestringconstantgc
Prevents strings in the string intern table from being collected.- -Xenableexcessivegc
If excessive time is spent in the GC, the option returns null for an allocate request and thus causes an OutOfMemory exception to be thrown.- -Xenablestringconstantgc
Enables strings from the string intern table to be collected.- -Xgc
Options that change the behavior of the Garbage Collector.- -Xgc:splitheap (Windows 32-bit JVM only)
Allocates the new and old areas of the generational Java heap in separate areas of memory.- -Xgcpolicy
Controls the behavior of the Garbage Collector.- -Xgcthreads
Sets the number of threads that the Garbage Collector uses for parallel operations.- -Xgcworkpackets
Specifies the total number of work packets available in the global collector.- -Xloa
Allocates a large object area (LOA).- -Xloainitial
Specifies the initial percentage (between 0 and 0.95) of the current tenure space allocated to the large object area (LOA).- -Xloamaximum
Specifies the maximum percentage (between 0 and 0.95) of the current tenure space allocated to the large object area (LOA).- -Xloaminimum
Specifies the minimum percentage (between 0 and 0.95) of the current tenure space allocated to the large object area (LOA).- -Xmaxe
Sets the maximum amount by which the garbage collector expands the heap.- -Xmaxf
Specifies the maximum percentage of heap that must be free after a garbage collection.- -Xmaxt
Specifies the maximum percentage of time to be spent in Garbage Collection.- -Xmca
Sets the expansion step for the memory allocated to store the RAM portion of loaded classes.- -Xmco
Sets the expansion step for the memory allocated to store the ROM portion of loaded classes.- -Xmine
Sets the minimum amount by which the Garbage Collector expands the heap.- -Xminf
Specifies the minimum percentage of heap to be left free after a garbage collection.- -Xmint
Specifies the minimum percentage of time to spend in Garbage Collection.- -Xmn
Sets the initial and maximum size of the new area to the specified value when using -Xgcpolicy:gencon.- -Xmns
Sets the initial size of the new area to the specified value when using -Xgcpolicy:gencon.- -Xmnx
Sets the maximum size of the new area to the specified value when using -Xgcpolicy:gencon.- -Xmo
Sets the initial and maximum size of the old (tenured) heap to the specified value when using -Xgcpolicy:gencon.- -Xmoi
Sets the amount the Java heap is incremented when using -Xgcpolicy:gencon.- -Xmos
Sets the initial size of the old (tenure) heap to the specified value when using -Xgcpolicy:gencon.- -Xmox
Sets the maximum size of the old (tenure) heap to the specified value when using -Xgcpolicy:gencon.- -Xmr
Sets the size of the Garbage Collection "remembered set".- -Xmrx
Sets the remembered maximum size setting.- -Xms
Sets the initial Java heap size.- -Xmx
Sets the maximum memory size (-Xmx >= -Xms).- -Xnoclassgc
Disables dynamic class unloading.- -Xnocompactexplicitgc
Disables compaction on System.gc() calls.- -Xnocompactgc
Disables compaction on all garbage collections (system or global).- -Xnoloa
Prevents allocation of a large object area; all objects are allocated in the SOA.- -Xnuma:none
Use this option to turn off Non-Uniform Memory Architecture (NUMA) awareness when using the balanced garbage collection policy.-Xsoftmx
This option sets a "soft" maximum limit for the initial size of the Java heap.- -Xsoftrefthreshold
Sets the value used by the garbage collector to determine the number of garbage collections after which a soft reference is cleared if its referent has not been marked.- -Xtgc
Provides garbage collection tracing options.- -Xverbosegclog
Causes -verbose:gc output to be written to a specified file.
Parent: Command-line options
Error 404 - Not Found Error 404 - Not Found
The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.