-
Enhancement
-
Resolution: Fixed
-
P3
-
9
-
Docker container
-
b34
-
x86
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8212494 | 8u202 | Poonam Bajaj Parhar | P3 | Resolved | Fixed | b01 |
JDK-8208395 | 8u201 | Poonam Bajaj Parhar | P3 | Resolved | Fixed | b01 |
JDK-8205629 | 8u192 | Poonam Bajaj Parhar | P3 | Resolved | Fixed | b02 |
JDK-8207352 | 8u191 | Poonam Bajaj Parhar | P3 | Resolved | Fixed | b02 |
JDK-8216740 | emb-8u201 | Poonam Bajaj Parhar | P3 | Resolved | Fixed | master |
JDK-8211482 | emb-8u191 | Poonam Bajaj Parhar | P3 | Resolved | Fixed | b02 |
The experimental memory detection that has been implemented only impacts the Heap selection and does not apply to the os::physical_memory or os::available_memory low level functions. This leaves other parts of the VM and core libraries to believe there is more memory available than there actually is.
To correct these shortcomings and make this support more robust, here's a list of the current cgroup subsystems that we be examined in order to update the internal VM and core library configuration.
Number of CPUs
-----------------------
Use a combination of number_of_cpus() and cpu_sets() in order to determine how many processors are available to the process and adjust the JVMs os::active_processor_count appropriately. The number_of_cpus() will be calculated based on the cpu_quota() and cpu_period() using this formula: number_of_cpus() = cpu_quota() / cpu_period(). If cpu_shares has been setup for the container, the number_of_cpus() will be calculated based on cpu_shares()/1024. 1024 is the default and standard unit for calculating relative cpu usage in cloud based container management software.
Also add a new VM flag (-XX:ActiveProcessorCount=xx) that allows the number of CPUs to be overridden. This flag will be honored even if UseContainerSupport is not enabled.
Total available memory
-------------------------------
Use the memory_limit() value from the cgroup file system to initialize the os::physical_memory() value in the VM. This value will propagate to all other parts of the Java runtime.
Memory usage
--------------------
Use memory_usage_in_bytes() for providing os::available_memory() by subtracting the usage from the total available memory allocated to the container.
As as troubleshooting aid, we will dump any available container statistics to the hotspot error log and add container specific information to the JVM logging system. Unified Logging will be added to help to diagnose issue related to this support. Use -Xlog:os+container=trace for maximum logging of container information.
A new option -XX:-UseContainerSupport will be added to allow the container support to be disabled. The default for this flag will be true. Container support will be enabled by default.
- backported by
-
JDK-8205629 Improve docker container detection and resource configuration usage
- Resolved
-
JDK-8207352 Improve docker container detection and resource configuration usage
- Resolved
-
JDK-8208395 Improve docker container detection and resource configuration usage
- Resolved
-
JDK-8211482 Improve docker container detection and resource configuration usage
- Resolved
-
JDK-8212494 Improve docker container detection and resource configuration usage
- Resolved
-
JDK-8216740 Improve docker container detection and resource configuration usage
- Resolved
- csr for
-
JDK-8189497 Improve docker container detection and resource configuration usage
- Closed
- duplicates
-
JDK-8157478 add option to change value returned by java.lang.Runtime.availableProcessors()
- Closed
- relates to
-
JDK-8190942 Document Docker container VM options
- Resolved
-
JDK-8339593 [Linux] Not all cgroup related metrics get looked up correctly
- Open
-
JDK-8194086 Remove deprecated experimental flag UseCGroupMemoryLimitForHeap
- Resolved
-
JDK-8292083 Detected container memory limit may exceed physical machine memory
- Resolved
-
JDK-8216366 Add rationale to PER_CPU_SHARES define
- Resolved
-
JDK-8140793 getAvailableProcessors may incorrectly report the number of cpus in Docker container
- Closed
-
JDK-8170888 [linux] Experimental support for cgroup memory limits in container (ie Docker) environments
- Resolved
-
JDK-8287007 [cgroups] Consistently use stringStream throughout parsing code
- Resolved
-
JDK-8230305 Cgroups v2: Container awareness
- Resolved
-
JDK-8182070 Container Awareness
- Closed
-
JDK-8192154 JVM crashes inside some chroot environments on linux
- Resolved
-
JDK-8197589 Update CPU count algorithm when both cpu shares and quotas are used
- Closed
-
JDK-8229202 Docker reporting causes secondary crashes in error handling
- Closed
-
JDK-8215905 8u192-Loss of LDAP performance after upgrade from 8u172
- Closed
-
JDK-8189762 [TESTBUG] Create tests for JDK-8146115 container awareness and resource configuration
- Resolved
-
JDK-8281181 Do not use CPU Shares to compute active processor count
- Resolved
1.
|
Document Docker container VM options | Resolved | Clifford Wayne (Inactive) | 2018-02-23 | |
2.
|
Release Note: Java Improvements for Docker Containers | Closed | Bob Vandette (Inactive) |