Profile Image
vishnupriya

What is Memory tuning: -XX:UseContainerSupport?

What is Memory tuning: -XX:UseContainerSupport? Have you used this JVM arguement before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvmargument

  • xx-usecontainersupport

  • x-usecontainersupport

  • Memory tuning

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:

 

You can limit amount of memory used by JVM in containerized environment with:

 

-XX: UseContainerSupport

 

Description:

 

When using container technology, applications are typically run on their own and do not need to compete for memory. The JVM now has automatic container detection support, which makes it possible for the JVM to determine the amount of memory and number of processors that are available to a Java process running in docker containers that imposes limits. It uses this information to allocate system resources. This support is only available on Linux x64 platforms. If supported, the default for this flag is true, and container support is enabled by default. It can be disabled with -XX:-UseContainerSupport. If this option is disabled, then JVM will try to acquire resources from the host machine, bypassing container limits.

 

Unified Logging is available to help to diagnose issues related to this support.

 

Use -Xlog:os+container=trace for maximum logging of container information.

 

Default Value:

 

Default value is true

 

Errors:

 

None

 

Arguments related:

 

TODO link Xloggc, Xlog:gc

 

Related Posts:

 NOTE:

 

If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvmargument

  • xx-usecontainersupport

  • x-usecontainersupport

  • Memory tuning