I am using bzip2 to compress a file,the process takes more that 100% cpu.Is there any way to run bzip2 with minimum CPU precentage.
migrated from serverfault.com Mar 14 '13 at 16:22
This question came from our site for professional system and network administrators.
Is this process interfering with other processes on your system? Why do you want to limit the CPU bzip2 uses?
You can use the
Additionally, you can try lowering the
Recommended: using priorities
In addition to @EEAA answer, if you want to give the maximum of low priority to the bzip process, so that when other processes are impacted a minimum, you should use
To verify which IO scheduler you are using:
As Tom and EEAA explained, this is good enough. The kernel will make sure that bzip can run as fast as possible when no other process needs CPU or IO. But it will give the priority to other processes if they need it. This is the recommended choice.
Alternative: cpulimit - limits the CPU usage in pourcentage
Now you can still use a "CPU limitation" on bzip. That would not be my choice, but if you want to experiment or like it better, you should use