IBM User Guide for Java V7 on Windows > Reference > Command-line options



Balanced Garbage Collection policy options

The policy supports a number of command-line options to tune garbage collection (GC) operations.


About the policy

The policy uses a hybrid approach to garbage collection by targeting areas of the heap with the best return on investment. The policy tries to avoid global collections by matching allocation and survival rates. The policy uses mark, sweep, compact and generational style garbage collection. For more information about the Balanced Garbage Collection policy, see Balanced Garbage Collection policy. For information about when to use this policy, see When to use the Balanced garbage collection policy.

You specify the Balanced policy with the -Xgcpolicy:balanced command-line option. The following defaults apply:

Heap size

The initial heap size is Xmx/1024, rounded down to the nearest power of 2, where Xmx is the maximum heap size available. You can override this value by specifying the -Xms option on the command line.


Command-line options

The following options can also be specified on the command line with -Xgcpolicy:balanced:

A detailed description of these command-line options can be found in Garbage Collector command-line options.

The behavior of the following options is different when specified with -Xgcpolicy:balanced:

-Xcompactgc
Compaction occurs when a System.gc() call is received (default). Compaction always occurs on all other collection types.
-Xnocompactgc
Compaction does not occur when a System.gc() call is received. Compaction always occurs on all other collection types.

The following options are ignored when specified with -Xgcpolicy:balanced:

A detailed description of these command-line options can be found in Garbage Collector command-line options.


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.