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

Added minimum threshold of cpu-usage for limited process #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akanehira
Copy link

This PR provides the option that cpulimit send STOP signal to processes only using more than given value. This funciton is important specifically when the cpu-usage of each process is unbalaced. For example, when we would like to limit cpu-usage of parallel wrokers which execute some function on url string and donwload images based on it. Since original cpulimit does send STOP signal to all process, it causes inefficency due to interference with downloading image, which is not use much cpu.

To solve this problem, I newly add the option to stop process consuming much cpu resource and leave not-cpu-bounded processes to continue, making it possible to process with efficiency.
We can use it as cpulimit -l 10 -i -m 0.01. This means process using more than 1% of cpu are stopped, and the others are ignored by cpulimit.

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

Successfully merging this pull request may close these issues.

2 participants