The nice
command allows you to adjust the priority a process runs at. Modern-day operating systems usually do a great job of task scheduling. However, a particular process may require some tweaking on occasions. Here, we will show how to use nice
.
The priority is referred to as the niceness level. The range of niceness a process can have goes from 19, which is the least favorable, down to a maximum of -20, which is the most favorable (if this seems backwards to you, it does to me as well).
Most favorable________________________Least favorable
20 __________________________________19
Highest priority________________________Lowest priority
You may recall the NI column from the previous section on top
. This is the niceness setting and on Fedora, several services run at the most favorable setting of -20.
Note that changing the niceness setting of a process is not a guarantee that the OS will honor it. It is simply a suggestion to the scheduler.
Also note that...