RFR: 8197589: CPU count wrong when both cpu shares and quotas are used

Mikhailo Seledtsov mikhailo.seledtsov at oracle.com
Tue Feb 13 02:04:02 UTC 2018


Test changes look good to me,

Thank you,
Misha

On 2/12/18, 11:53 AM, Bob Vandette wrote:
> Updated webrev URL.
>
>
>> On Feb 12, 2018, at 2:41 PM, Bob Vandette<bob.vandette at oracle.com>  wrote:
>>
>> Please review this change to the cpu count selection logic used when running in docker containers.
>>
>> BUG:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8197589
>>
>> WEBREV:
>>
>> http://cr.openjdk.java.net/~bobv/8197589/webrev.00/
>>
>> The algorithm implemented in JDK-8146115 for selecting the number of active cpus assumed that a container
>> would not be configured to use both cpu shares AND cpu quotas at the same time. This was an invalid assumption
>> since this how containers are configured to allow bursting activity [1].  A Java process running in a container with
>> cpu shares set to the equivalent of 2 cpus and a quota set to 6, will end up configuring the VM for 2 CPUs rather
>> than 6.
>>
>> [1] https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/#motivation-for-cpu-requests-and-limits
>>
>> Bob.
>>
>>


More information about the hotspot-runtime-dev mailing list