Difference between revisions of "Limit CPU usage for a process"

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽
Line 1: Line 1:
 +
<span data-link_translate_ru_title="Ограничить использование ЦП для процесса"  data-link_translate_ru_url="%D0%9E%D0%B3%D1%80%D0%B0%D0%BD%D0%B8%D1%87%D0%B8%D1%82%D1%8C+%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5+%D0%A6%D0%9F+%D0%B4%D0%BB%D1%8F+%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D1%81%D1%81%D0%B0"></span>[[:ru:Ограничить использование ЦП для процесса]][[ru:Ограничить использование ЦП для процесса]]
 
<span data-link_translate_ar_title="الحد من استخدام وحدة المعالجة المركزية لعملية"  data-link_translate_ar_url="%D8%A7%D9%84%D8%AD%D8%AF+%D9%85%D9%86+%D8%A7%D8%B3%D8%AA%D8%AE%D8%AF%D8%A7%D9%85+%D9%88%D8%AD%D8%AF%D8%A9+%D8%A7%D9%84%D9%85%D8%B9%D8%A7%D9%84%D8%AC%D8%A9+%D8%A7%D9%84%D9%85%D8%B1%D9%83%D8%B2%D9%8A%D8%A9+%D9%84%D8%B9%D9%85%D9%84%D9%8A%D8%A9"></span>[[:ar:الحد من استخدام وحدة المعالجة المركزية لعملية]][[ar:الحد من استخدام وحدة المعالجة المركزية لعملية]]
 
<span data-link_translate_ar_title="الحد من استخدام وحدة المعالجة المركزية لعملية"  data-link_translate_ar_url="%D8%A7%D9%84%D8%AD%D8%AF+%D9%85%D9%86+%D8%A7%D8%B3%D8%AA%D8%AE%D8%AF%D8%A7%D9%85+%D9%88%D8%AD%D8%AF%D8%A9+%D8%A7%D9%84%D9%85%D8%B9%D8%A7%D9%84%D8%AC%D8%A9+%D8%A7%D9%84%D9%85%D8%B1%D9%83%D8%B2%D9%8A%D8%A9+%D9%84%D8%B9%D9%85%D9%84%D9%8A%D8%A9"></span>[[:ar:الحد من استخدام وحدة المعالجة المركزية لعملية]][[ar:الحد من استخدام وحدة المعالجة المركزية لعملية]]
 
<span data-link_translate_it_title="Limitare l'utilizzo della CPU per un processo"  data-link_translate_it_url="Limitare+l%27utilizzo+della+CPU+per+un+processo"></span>[[:it:Limitare l'utilizzo della CPU per un processo]][[it:Limitare l'utilizzo della CPU per un processo]]
 
<span data-link_translate_it_title="Limitare l'utilizzo della CPU per un processo"  data-link_translate_it_url="Limitare+l%27utilizzo+della+CPU+per+un+processo"></span>[[:it:Limitare l'utilizzo della CPU per un processo]][[it:Limitare l'utilizzo della CPU per un processo]]

Revision as of 04:11, 27 February 2016

ru:Ограничить использование ЦП для процесса ar:الحد من استخدام وحدة المعالجة المركزية لعملية it:Limitare l'utilizzo della CPU per un processo pt:Limitar o uso da CPU por um processo 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



You are not allowed to post comments.