Skip to content

-Xcompactgc / -Xnocompactgc

Enables or disables full compaction on all garbage collections (system and global).


Setting Action
-Xcompactgc Enable full compaction
-Xnocompactgc Disable full compaction

Default behavior

If no compaction option is specified, the garbage collector compacts based on a series of triggers that attempt to compact only when it is beneficial to the future performance of the OpenJ9 VM.

See also