You can change the default priority that an application runs with by starting it with the nice command, but if you want to change the priority of a process that is already running, the command to use is renice.
Renice can be used to change the priority of a single process, or of all the processes owned by a specified user. As with the nice command, the priority values range from -20 to +19 and negative numbers raise the priority of a task while positive numbers lower it. Yes, that seems a little backwards, but the higher the priority the less resources are devoted to it. Only the superuser can specify negative numbers (thus raising the priority of a process).
renice 5 some_process
This command will change the priority of some_process to 5.
renice -5 -u erik
will change the priority of all processes owned by user erik to -5.
renice -5 -u erik -p 699
will chance the priority of all processes owned by erik and process with PID 699 to -5.
Related posts:
- simple foreach to kill multiple PIDs Sometimes you’ll find a bunch of stale or malicious processes...
- apache MPMs What are Multi-Processing Modules (MPM)? Prefork vs Worker Multi-Processing Modules...
Related posts brought to you by Yet Another Related Posts Plugin.