(Linux® only)

This option controls garbage collection processing with compaction when the state of the OpenJ9 VM is set to idle.

Restrictions: This option applies only to Linux® architectures when the Generational Concurrent (gencon) garbage collection policy is in use. This option is not effective if the object heap is configured to use large pages.


Setting Effect Default Default when running in a docker container
-XX:+IdleTuningCompactOnIdle Enable yes
-XX:-IdleTuningCompactOnIdle Disable yes

The default depends on whether or not the OpenJ9 VM is running in a container. As indicated in the table, when the VM is running in a container and the state is set to idle, the VM attempts to compact the object heap following a garbage collection cycle. The garbage collection cycle is controlled by the -XX:+IdleTuningGcOnIdle option, which is also enabled by default when the OpenJ9 VM is running inside a container.

If your application is not running in a container and you want to enable compaction as part of the idle-tuning process, set the -XX:+IdleTuningCompactOnIdle option on the command line when you start your application.

The -XX:+IdleTuningCompactOnIdle option can be used with the -XX:+IdleTuningMinIdleWaitTime, which controls the amount of time that the VM must be idle before an idle state is set. If a value for the -XX:+IdleTuningMinIdleWaitTime option is not explicitly specified, the VM sets a default value of 180 seconds.

See also