Skip to content

CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit


(Linux® only)

This option controls whether a garbage collection cycle takes place when the state of the Eclipse OpenJ9™ VM is set to idle. Compaction of the heap is also attempted during the idle GC when certain triggers are met.

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:+IdleTuningGcOnIdle Enable yes
-XX:-IdleTuningGcOnIdle Disable yes

The default depends on whether or not the OpenJ9 VM is running in a docker container. As indicated in the table, when the VM is running in a container and the state is set to idle, this option causes the VM to release free memory pages in the object heap without resizing the Java™ heap and attempts to compact the heap after the garbage collection cycle if certain heuristics are triggered. The pages are reclaimed by the operating system, which reduces the physical memory footprint of the VM.

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

When enabled, the -XX:+IdleTuningGcOnIdle option is used with the -XX:IdleTuningMinIdleWaitTime and -XX:IdleTuningMinFreeHeapOnIdle options. If values for these options are not explicitly specified, the VM sets the following defaults:

  • -XX:IdleTuningMinIdleWaitTime=180
  • -XX:IdleTuningMinFreeHeapOnIdle=0

See also