As the *nix systems do multitasking to handle their processes, there also has to be a system where it is possible to prioritize certain processes. This can be done thru the commands nice and renice.
The priority can be set within a range from -20 to 19. Where -20 is the most favorable scheduling. An easy way to remember is to think about gravity. The more weight you have, the lower you float, and the lower you are on the priority list.
So what’s the difference between the two commands;
– The nice command can be used to give a weight to the process when launching this process.
– The renice is to be used when an already active process needs to be re prioritized.
nice -n 10 /foo/bar
renice -p $PID -n 10
This small bit of knowledge can help you tune the process management of you system. Thus tune your server to be more effecient, as the important processes get more system resources.