-
Notifications
You must be signed in to change notification settings - Fork 40k
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
dockertools: disable MemorySwap on Linux #59404
Conversation
/assign @pires |
/ok-to-test |
3164995
to
ee952cd
Compare
/retest |
Anything I can do to help with this one? |
@pires All tests have passed. Would you mind to review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/retest |
pinging @Random-Liu @dchen1107 @vishh for approval |
/retest |
/test all |
According to docker docs, setting MemorySwap equals to Memory can prevent docker containers from using any swap, instead of setting MemorySwap to zero.
ee952cd
to
ecc13c8
Compare
@pires Could you Ping kubelet OWNERs to approve this. Thanks. |
/lgtm |
@ohmystack: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ohmystack, pires, yujuhong The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Review the full test history for this PR. Silence the bot with an |
Automatic merge from submit-queue (batch tested with PRs 50724, 59025, 59710, 59404, 59958). If you want to cherry-pick this change to another branch, please follow the instructions here. |
Is it possible to get this merged into a 1.9 release? |
In this commit, set
MemorySwap
the same withMemory
to prevent using swap on Linux.What this PR does / why we need it:
In #39731, @pires tried to disable swap on Linux by setting
MemorySwap
to 0.However, according to Docker's docs, setting
MemorySwap
to 0 is treated as unset, and its default behavior is to set to twice the size ofMemory
, which can still cause the container to use the swap.Which issue(s) this PR fixes :
This issue was mentioned in this comment: #7294 (comment)
Special notes for your reviewer:
MemorySwap
.DefaultMemorySwap()
is for sandbox.Maybe setting the sandbox's
MemorySwap
to 0 is fine. I didn't change that.Release note: