Skip to content
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

cpulimit limits #4354

Open
rusty-snake opened this issue Jun 10, 2021 · 1 comment
Open

cpulimit limits #4354

rusty-snake opened this issue Jun 10, 2021 · 1 comment
Labels
enhancement New feature request

Comments

@rusty-snake
Copy link
Collaborator

Currently we have --cpu to limit cores and --rlimit-cpu to limit the total time.

Cpulimit is a tool which limits the CPU usage of a process (expressed in percentage, not in CPU time).

IMO this would be a good addition.

The project seems to be dead (last commit 17 Jun 2015) but it is packaged in the most distros as I see it.
IDC if you call cpulimit (which need it installed), integrated it's code (GPLv2+ too) or implement your own code.

@rusty-snake rusty-snake added the enhancement New feature request label Jun 10, 2021
@reinerh
Copy link
Collaborator

reinerh commented Jun 10, 2021

This is also possible with cgroups:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/resource_management_guide/sect-cpu-example_usage
Which is a bit nicer than cpulimit, as the cgroup limits will be enforced by the kernel.
From a quick glance cpulimit is sending SIGSTOP/SIGCONT to processes to enforce the limit (which seems a bit inaccurate to me).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request
Projects
None yet
Development

No branches or pull requests

2 participants