Difference between revisions of "Limit CPU usage for a process"
Line 1: | Line 1: | ||
+ | <span data-link_translate_es_title="Limitar el uso de la CPU de un proceso" data-link_translate_es_url="Limitar+el+uso+de+la+CPU+de+un+proceso"></span>[[:es:Limitar el uso de la CPU de un proceso]][[es:Limitar el uso de la CPU de un proceso]] | ||
<span data-link_translate_fr_title="Limiter l'utilisation CPU pour un processus" data-link_translate_fr_url="Limiter_l%27utilisation_CPU_pour_un_processus"></span>[[:fr:Limiter l'utilisation CPU pour un processus]][[fr:Limiter l'utilisation CPU pour un processus]] | <span data-link_translate_fr_title="Limiter l'utilisation CPU pour un processus" data-link_translate_fr_url="Limiter_l%27utilisation_CPU_pour_un_processus"></span>[[:fr:Limiter l'utilisation CPU pour un processus]][[fr:Limiter l'utilisation CPU pour un processus]] | ||
<br /> | <br /> |
Revision as of 04:11, 27 February 2016
es:Limitar el uso de la CPU de un proceso
fr:Limiter l'utilisation CPU pour un processus
This article has been created by an automatic translation software. You can view the article source here.
It may be interesting to be able to limit the CPU usage for a process so that it does not overload your Server (case of a backup for example ).
The package that allows this is CPULimit You can install via the command :
apt-get install cpulimit
To set up the CPU limitation for a process in particular, you will need to use a screen.
The screen creation :
screen -S limitationCPU
In the screen, one sets up the CPU limitation (in the example below, we will restrict the process with the PID 888 à 50%) :
cpulimit -p 8888 -l 50%
Can then detach the screen using Ctrl + A + D.
If you want to reattach the screen created earlier, just run :
screen -r limitationCPU
Enable comment auto-refresher