-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add cgroup limiting to Linux Executor #52
Conversation
Added executor interface, includes drop privileges for linux
I've updated this PR to move I have not looked into any kind of hooks yet. |
Yeah it doesn't seem like there is a good way to do it with the Manager. The Apply method is actually creating the cgroups. You could just keep Limit the same but move the Apply call on the manager to the Start method. |
I'm curious what corollary, if any, exists in Windows or FreeBSD. We may have to change this around later anyway, so for now if it's simpler / faster / easier to swap Start and Limit let's do that to save time. We can switch it back later if we need to. |
// then placed in the corresponding files. | ||
// Ex: restricting a process to 2048Mhz CPU and 2MB of memory: | ||
// $ cat /sys/fs/cgroup/cpu/user/1000.user/4.session/<uuid>/cpu.shares | ||
// 2028 |
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.
I think this should be 2048
Well there is actually a slightly bigger problem with the way it is done now: That is why you want to build the cgroup first and then launch the pid into the group rather than joining it. |
Update from slack discussion: Will go with the double fork approach where the intermediate process joins the cgroup, launches the desired process, sending over the child pid to the original process and then killing itself. I will be implementing this |
Will you be building off this and sending a PR here, or should I close this? |
jobspec: default job ID also comes from key
Yeah I am building on that branch! Thanks for asking!
|
api: sort all list responses
9ff0971
to
e00d906
Compare
Do not use prefix splitting to deploy
Force Ruby 2.2.2 on Heroku
e00d906
to
a8dbcab
Compare
Closed in favor of #68 |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Spike at adding some basic cgroup limits based off of the Tasks Resources
/cc @cbednarski