The definitions of the Metronome Garbage Collector options.
- -Xgc:synchronousGCOnOOM | -Xgc:nosynchronousGCOnOOM
- One occasion when garbage collection occurs is when the heap runs
out of memory. If there is no more free space in the heap, using -Xgc:synchronousGCOnOOM stops
your application while garbage collection removes unused objects.
If free space runs out again, consider decreasing the target utilization
to allow garbage collection more time to complete. Setting -Xgc:nosynchronousGCOnOOM implies
that when heap memory is full your application stops and issues an
out-of-memory message. The default is -Xgc:synchronousGCOnOOM.
- -Xnoclassgc
- Disables class garbage collection. This option switches off garbage
collection of storage associated with Java™ classes
that are no longer being used by the JVM. The
default behavior is -Xnoclassgc.
- -Xgc:targetUtilization=N
- Sets the application utilization to N%; the Garbage Collector
attempts to use at most (100-N)% of each time interval. Reasonable
values are in the range of 50-80%. Applications with low allocation
rates might be able to run at 90%. The default is 70%.
This example
shows the maximum size of the heap memory is 30 MB. The garbage collector
attempts to use 25% of each time interval because the target utilization
for the application is 75%.
java -Xgcpolicy:metronome -Xmx30m -Xgc:targetUtilization=75 Test
- -Xgc:threads=N
- Specifies the number of GC threads to run. The default is the number of processor
cores available to the process. The maximum value you can specify
is the number of processors available to the operating system.
- -Xgc:verboseGCCycleTime=N
- N is the time in milliseconds that the summaries should be dumped.
Note: The cycle time does not mean that the summary is dumped
precisely at that time, but rather when the last GC quanta or heartbeat
that passes this time criteria.
- -Xmx<size>
- Specifies the Java heap size. Unlike other garbage
collection strategies, the real-time Metronome GC does not support
heap expansion. There is not an initial or maximum heap size option.
You can specify only the maximum heap size.