Add to Favorites

Linux, make your processes play “nice”

Ever run into a problem where one program on your server starts using up all the cpu? Make that process be "nicer" to the rest of the running programs. Each running process has a nice value, essentially a priority for who gets more of the cpu time. You will need the process id of the process you want to be nicer, you can get that using the nifty "ps" command. After you do that, renice that process with a command like
renice +15 -p <process_id>

The nice priority works in reverse of how a regular priority system works, in this case you give the process a higher nice value to make it.... well.... nicer to other processes. This also works in reverse, you can make a process "meaner" to give it more cpu leverage
renice -10 -p <process_id>


Be the first to leave a comment on this post.

Leave a comment

To leave a comment, please log in / sign up