6

8281181: Do not use CPU Shares to compute active processor count by iklam · Pull...

 2 years ago
source link: https://github.com/openjdk/jdk/pull/7666
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Member

@iklam iklam commented on Mar 2

edited by openjdk[bot] bot

This is a simple change (Linux-only) that removes the consideration of Cgroups CPU Shares from the active process count calculation. Of note, this fixes CPU underutilization when Java is executed by Kubernetes without CPU resources limits.

Please see the CSR JDK-8281571 for a detailed discussion of the reasons to make this change.

To err on the side of caution, we added a temporary (and deprecated) VM flag -XX:+UseContainerCpuShares to enable the old behavior. We believe the old behavior is wrong and unnecessary. The plan is to remove the old behavior in JDK 20.

The associated flag, PreferContainerQuotaForCPUCount is also deprecated. Both flags will be obsoleted in JDK 20.

Testing with tiers 1-4, as well as container tests in tier5.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed
  • Change requires a CSR request to be approved

Issues

  • JDK-8281181: Do not use CPU Shares to compute active processor count
  • JDK-8281571: Do not use CPU Shares to compute active processor count (CSR)

Reviewers

Reviewing

Using git

Using Skara CLI tools

Using diff file

sureshg and malkav30 reacted with thumbs up emoji sureshg reacted with rocket emoji

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK