-
Notifications
You must be signed in to change notification settings - Fork 527
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
cri: set default RLIMIT_NOFILE #1180
Conversation
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.
Code looks good to me, just one question about what the value should be.
packages/containerd/3001-cri-set-a-default-RLIMIT_NOFILE-of-1048576.patch
Outdated
Show resolved
Hide resolved
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.
Wow, nice job.
84c1fd3
to
27ea49a
Compare
^ added a soft limit of 65536 and confirmed this is what the node sees.
|
I ran the MySQL manifest from #1136 with an AMI built using this patch and confirmed the pod runs just fine without any OOM issues that I could see. (I also ran the pod with the current released Bottlerocket AMI and confirmed that it does indeed OOM)
|
The `cri` plugin currently inherits the limit from the default OCI spec or the containerd process. This change sets the default hard RLIMIT_NOFILE to 1048576 and the soft limit to 65536 in the OCI spec for any container spawned using `cri`.
27ea49a
to
ebda969
Compare
^ the above force push fixes up the spacing issues @bcressey caught (Thanks |
Issue number:
Related to #1136
Description of changes:
The intent is to upstream this patch, but there is additional work to be done to make it compatible with
containerd
>1.3. We also don't have some of the upstream unit tests in ourcontainerd
package; we'll need to write one for this change when we submit upstream.Given that the AL2 AMI uses this limit, albeit on the
containerd
process, it seems a reasonable number to use for container processes spawned bycri
.Testing done:
Ran a busybox pod on a Bottlerocket AMI built using this patch:
Ran a busybox pod on the latest released Bottlerocket AMI:
Ran the MySQL manifest from #1136 with an AMI built using this patch and confirmed the pod runs just fine without any OOM issues that I could see. (I also ran the pod with the current released Bottlerocket AMI and confirmed that it does indeed OOM)
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.