config-linux: mark memory.kernel[TCP] as NOT RECOMMENDED#1093
Merged
tianon merged 1 commit intoopencontainers:masterfrom Mar 8, 2021
Merged
config-linux: mark memory.kernel[TCP] as NOT RECOMMENDED#1093tianon merged 1 commit intoopencontainers:masterfrom
tianon merged 1 commit intoopencontainers:masterfrom
Conversation
Per-cgroup kernel memory accounting (and explicit limiting) is problematic in the Linux kernel for too many reasons to quote here. Besides, cgroup v2 does not even have a kernel memory limit knob, and the one in cgroup v1 is made obsoleted in kernel v5.4 [1]. Mark memory.kernel and memory.kernelTCP as NOT RECOMMENDED, in additon to OPTIONAL. This is a way to say "we do not anyone (runtimes or users) to set those limits, unless they have good understanding and strong reasons to do so". [1] torvalds/linux@0158115f702b0ba208ab0b Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
thaJeztah
reviewed
Mar 8, 2021
Comment on lines
+267
to
+268
| * **`kernel`** *(int64, OPTIONAL, NOT RECOMMENDED)* - sets hard limit for kernel memory | ||
| * **`kernelTCP`** *(int64, OPTIONAL, NOT RECOMMENDED)* - sets hard limit for kernel TCP buffer memory |
Member
There was a problem hiding this comment.
Wondering if it would be better to mark them as "deprecated" (as they're deprecated in the Kernel); kept for backward compatibility by runtimes are allowed to ignore them
Contributor
Author
There was a problem hiding this comment.
- We're using the terms (OPTIONAL, NOT RECOMMENDED) as per RFC2119, and there's no such term as "DEPRECATED" in its lexicon.
- This spec (if I understand it right) is for both runtimes and their users. Saying "OPTIONAL" means users can chose to not set these limits, and runtimes can ignore the set limits. Saying NOT RECOMMENDED means users and runtimes should not set those limits, unless there's a good understanding and some compelling reasons to do so.
Contributor
Merged
This was referenced Sep 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per-cgroup kernel memory accounting (and explicit limiting) is
problematic in the Linux kernel for too many reasons to quote here.
Besides, cgroup v2 does not even have a kernel memory limit knob,
and the one in cgroup v1 is made obsoleted in kernel v5.4 [1].
Mark memory.kernel and memory.kernelTCP as NOT RECOMMENDED, in additon
to OPTIONAL. This is a way to say "we do not anyone (runtimes or users)
to set those limits, unless they have good understanding and strong
reasons to do so".
[1]torvalds/linux@0158115f702b0ba208ab0