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_en_title="Limit CPU usage for a process"  data-link_translate_en_url="Limit CPU usage for a process"></span>[[:en:Limit CPU usage for a process]][[en:Limit CPU usage for a process]]
 
<span data-link_translate_pl_title="Ograniczyć użycie procesora dla procesu"  data-link_translate_pl_url="Ograniczy%C4%87+u%C5%BCycie+procesora+dla+procesu"></span>[[:pl:Ograniczyć użycie procesora dla procesu]][[pl:Ograniczyć użycie procesora dla procesu]]
 
<span data-link_translate_pl_title="Ograniczyć użycie procesora dla procesu"  data-link_translate_pl_url="Ograniczy%C4%87+u%C5%BCycie+procesora+dla+procesu"></span>[[:pl:Ograniczyć użycie procesora dla procesu]][[pl:Ograniczyć użycie procesora dla procesu]]
 
<span data-link_translate_ja_title="プロセスの CPU 使用率を制限します。"  data-link_translate_ja_url="%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE+CPU+%E4%BD%BF%E7%94%A8%E7%8E%87%E3%82%92%E5%88%B6%E9%99%90%E3%81%97%E3%81%BE%E3%81%99%E3%80%82"></span>[[:ja:プロセスの CPU 使用率を制限します。]][[ja:プロセスの CPU 使用率を制限します。]]
 
<span data-link_translate_ja_title="プロセスの CPU 使用率を制限します。"  data-link_translate_ja_url="%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE+CPU+%E4%BD%BF%E7%94%A8%E7%8E%87%E3%82%92%E5%88%B6%E9%99%90%E3%81%97%E3%81%BE%E3%81%99%E3%80%82"></span>[[:ja:プロセスの CPU 使用率を制限します。]][[ja:プロセスの CPU 使用率を制限します。]]

Revision as of 16:30, 9 February 2017

en:Limit CPU usage for a process pl:Ograniczyć użycie procesora dla procesu ja:プロセスの CPU 使用率を制限します。 zh:限制进程的 CPU 使用情况 de:CPU-Auslastung für einen Prozess zu begrenzen nl:Beperken van CPU-gebruik voor een proces he:להגביל את השימוש ב- CPU עבור תהליך ro:Limita utilizarea Procesorului pentru un proces 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.