Skip to content

Document the meaning of CPU requests & limits #50987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pegasas
Copy link
Contributor

@pegasas pegasas commented May 20, 2025

Description

I have added a new section titled "How CPU requests and limits work under the hood", which explains in detail:

  1. On Linux systems:
    How CPU requests are translated into cgroups v1 shares or cgroups v2 weight

How CPU limits are implemented using a quota system with a fixed 100ms period

An explanation of CPU limiting, including concrete examples

Explanation of how CPU throttling works

  1. On Windows systems:
    The different implementation of CPU requests and limits

Explanation of how CPU caps are used to enforce limits in Windows

Explanation of how it works on multi-core systems

Issue

fix: #50308

@k8s-ci-robot k8s-ci-robot requested review from salaxander and tengqm May 20, 2025 08:56
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 20, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dipesh-rawat for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 20, 2025
Copy link

netlify bot commented May 20, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit c51086d
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/682c43cfbf6e900008cd66f7
😎 Deploy Preview https://deploy-preview-50987--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

## How CPU requests and limits work under the hood

### On Linux systems

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wrap the long "lines" appropriately.
See https://sembr.org for the preferred line wrapping style.

@lmktfy
Copy link
Contributor

lmktfy commented May 21, 2025

I think this new section would be great as a page under https://kubernetes.io/docs/concepts/containers/

The existing task page can (should) link to that new concept page, and can also include a bit of a summary.

@salaxander
Copy link
Contributor

I think this new section would be great as a page under https://kubernetes.io/docs/concepts/containers/

The existing task page can (should) link to that new concept page, and can also include a bit of a summary.

Agree with @lmktfy here, I think this would be a great place for the content

@lmktfy
Copy link
Contributor

lmktfy commented May 22, 2025

@pegagas, would you be willing to adapt this per #50987 (comment) ?

You can, of course, keep all the words you've already written - it's just about where they go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document the meaning of CPU requests & limits
5 participants