I´ve got a question about the correct usage of
cpulimit (https://sourceforge.net/projects/cpulimit/ ).
With the help of CPU Usage Limiter for Linux you can limit the maximum percentage of CPU time that a process is allowed to consume.
I also found a pretty good description here: cpulimit › Wiki › ubuntuusers.de (although in German).
To make sure I understand it correctly:
Suppose a process or program called “foo” has started and is using 100% CPU.
With the following command the maximum CPU time can be limited to 50%:
cpulimit -e foo -l 50 # -e: name of the process
The following command can be used to limit the maximum CPU time consumed by the process with PID “1234” to 20%:
cpulimit -p 1234 -l 20 # -p: PID of the process
(translated from German; source: cpulimit › Wiki › ubuntuusers.de )
But let´s say the process “foo” (process ID: 1234) takes up 30% of the RAM (without invoking cpulimit) and I´ll try to limit it thus:
cpulimit -p 1234 -l 50
Then it should have no effect, right
The 50% limitation refers to 100% of the CPU time to be used, and the 30% usage is already below 50%.
Hopefully I got right.
If I wanted to make the process use 50% of what it´s using right now (30%) my command should be:
cpulimit -p 1234 -l 15
Can anyone confirm I understood it correctly
Many thanks in advance …
… and many greetings