Skip to content

KEP-2570: Add documentation for MemoryQoS with cgroups v2 for 1.36#54417

Open
QiWang19 wants to merge 1 commit intokubernetes:dev-1.36from
QiWang19:2570-doc-placeholder
Open

KEP-2570: Add documentation for MemoryQoS with cgroups v2 for 1.36#54417
QiWang19 wants to merge 1 commit intokubernetes:dev-1.36from
QiWang19:2570-doc-placeholder

Conversation

@QiWang19
Copy link
Copy Markdown

Description

This is a placeholder PR for the documentation of MemoryQoS v1.36, which is targeting Alpha v3 for the 1.36 release.

k/e KEP: kubernetes/enhancements#5879
k/e issue: kubernetes/enhancements#2570

Issue

Closes: #

@k8s-ci-robot k8s-ci-robot added this to the 1.36 milestone Feb 12, 2026
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 12, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @QiWang19!

It looks like this is your first PR to kubernetes/website 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/website has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Feb 12, 2026
@k8s-ci-robot
Copy link
Copy Markdown
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 katcosgrove for approval. For more information see the Code Review Process.

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

Details 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 12, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 12, 2026

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit deeff10
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/69c4ae819b6b7f0008691fe2
😎 Deploy Preview https://deploy-preview-54417--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.

@kernel-kun
Copy link
Copy Markdown
Contributor

Hello @QiWang19 👋, v1.36 Docs Team here again!

Please take a look at Documenting for a release - PR Ready for Review to get your PR ready for review before Tuesday 31st March 2026.

Please let us know once your PR is fully Ready for Review -- meaning all documentation updates are complete and it's awaiting reviewer feedback -- so we can update our tracking.

Thank you!

Signed-off-by: Qi Wang <qiwan@redhat.com>
@QiWang19 QiWang19 force-pushed the 2570-doc-placeholder branch from 1d1387d to deeff10 Compare March 26, 2026 03:56
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 26, 2026
@QiWang19 QiWang19 marked this pull request as ready for review March 27, 2026 14:37
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 27, 2026
@QiWang19 QiWang19 changed the title Add documentation for MemoryQoS with cgroups v2 for 1.36 KEP-2570: Add documentation for MemoryQoS with cgroups v2 for 1.36 Mar 27, 2026
@QiWang19
Copy link
Copy Markdown
Author

@sohankunkerkar @ndixita could you review?

- Linux with cgroup v2
- Kernel version 5.9 or higher for safe memory.high throttling. If the MemoryQoS feature gate is enabled on an older kernel, the kubelet logs a warning because of a known kernel livelock bug when using `memory.high` throttling on older kernels.

Memory QoS requires cgroup v2. When enabled on kernels older than 5.9, kubelet logs a warning
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks duplicated. You might need to remove these lines

- Burstable pods (soft reservation): `memory.low` is set to memory requests, the kernel preferentially retains this memory but may reclaim it under extreme pressure.
- BestEffort pods: no memory protection is set.

If memory limits are set in the container,this means that the system needs to limit container memory usage; Memory QoS uses `memory.high` to throttle workloads
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
If memory limits are set in the container,this means that the system needs to limit container memory usage; Memory QoS uses `memory.high` to throttle workloads
If memory limits are set in the container, this means that the system needs to limit container memory usage; Memory QoS uses `memory.high` to throttle workloads

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, this piece applies regardless of memoryReservationPolicy. Should be moved before "### Configuring Memory QoS" or into its own subsection (e.g., "### Memory Throttling") since throttling is independent of reservation policy.

controlled by `memoryThrottlingFactor`, and reservation is controlled by
`memoryReservationPolicy` (default `None`, optional `TieredReservation`).
Kubelet logs a warning on kernels older than 5.9 because `memory.high` throttling
can trigger a kernel livelock bug on older kernels.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
can trigger a kernel livelock bug on older kernels.
can trigger a kernel livelock bug.

cgroup v2 memory controller.
cgroup v2 memory controller. This feature allows kubelet to set `memory.high`
for throttling and configure tiered memory protection, when `memoryReservationPolicy` kubelet
configuration set to `TieredReservation`, `memory.min` / `memory.low` for memory protection are enabled.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
configuration set to `TieredReservation`, `memory.min` / `memory.low` for memory protection are enabled.
configuration is set to `TieredReservation`, `memory.min` / `memory.low` for memory protection are enabled.

due to a potential livelock situation a memory hungry can cause.
There is an alpha feature `MemoryQoS` which adds preemptive memory throttling
and optional memory reservation on Linux nodes using cgroup v2. Throttling is
controlled by `memoryThrottlingFactor`, and reservation is controlled by
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you would need to add a blurb about memoryThrottlingFactor in pod-qos.md as well. Otherwise, Readers will wonder what it does

@kernel-kun
Copy link
Copy Markdown
Contributor

Hello @QiWang19 👋, v1.36 Docs Team here again!

Just checking in as we approach Docs Freeze on Wednesday 8th April 2026 (AoE) / Thursday 9th April 2026, 12:00 UTC.

This documentation appears to still be under review. To meet the Docs Freeze, this PR must have a technical review as well as lgtm and approve labels applied, without any unaddressed comments or concerns from SIG Docs.

Thank you!

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.

4 participants