TaskConfig: Add option for file_limit to set RLIMIT_NOFILE#180
TaskConfig: Add option for file_limit to set RLIMIT_NOFILE#180sundbry wants to merge 1 commit intoRoblox:masterfrom
file_limit to set RLIMIT_NOFILE#180Conversation
containerd/containerd.go
Outdated
| containerd.WithRuntime(d.config.ContainerdRuntime, nil), | ||
| containerd.WithNewSnapshot(containerConfig.ContainerSnapshotName, containerConfig.Image), | ||
| containerd.WithNewSpec(opts...), | ||
| withFileLimit(uint64(config.FileLimit)), |
There was a problem hiding this comment.
Instead of unmarshalling just-built spec back, I'd suggest setting rlimit by appending your function to opts
There was a problem hiding this comment.
Thanks for pointing that out, I had to read a load of source code to find the right knobs to twist for this and that was something I missed. New revision just pushed up and verified in my test system!
eea3c06 to
eb2daff
Compare
Depending on the workload, the default resource limit (ulimit) for the max number of file descriptors per process may need to be raised, such as for database servers. Add a `file_limit` option to the task config which will allow the limit to be set per task. Signed-off-by: Ryan Sundberg <ryan@arctype.co>
|
@slonopotamus Please re-approve when you get a chance, I had to rebase the branch. Thanks! |
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
I have read the CLA Document and I hereby sign the CLA |
|
FYI, this is included unofficial v0.9.5-beta1 in case someone is interested. |
|
@olljanat Awesome! I'm thrilled that you've taken this initiative. I will switch over my builds to use the new fork. |
Depending on the workload, the default resource limit (ulimit) for the max number of file descriptors per process may need to be raised, such as for database servers. Add a
file_limitoption to the task config which will allow the limit to be set per task.