From LQWiki
Operating systems such as Unix and Unix-like systems such as Linux allow the application of attributes known as priorities which control how much time is given to a certain program in proportion to others.
The priority of a process is maintained by the scheduler and worked out by a number of factors — how much the process voluntarily sleeps, how much of the CPU time it's been using in the past few milliseconds, and so on. One of the factors is called the niceness value.
Users can influence priorities via the nice utility, a tool that reports or sets the niceness value of a given application, which is an integer between -20 and +19. It is called "nice" because the number that is given to a process determines how willing a task is to step aside and let other tasks monopolize the processor.
The scheduler allocates a priority to each process by a number of factors — how much the process voluntarily sleeps, how much of the CPU it's been using in the past few milliseconds, and so on. One of the factors is the niceness value.
The niceness value acts to increase or reduce the priority of a given process, after everything else has been calculated. Niceness ranges from -19 to +20; the default value is 0, higher values lower the priority and lower values increase it.
The amount of CPU time given to each process depends on its priority relative to other processes in the system (except that a process can deliberately sleep before its slice of the CPU is up, giving way to the next process).
So if you increase its niceness value, this decreases its priority and makes the process take less CPU time.
nice is used to set the niceness value for a process when a command is first run. For example,
nice -n 19 setiathome
would run setiathome with the lowest possible priority. To change the niceness of a currently running process, use renice.
Privileges are required to run a command with negative niceness, or to lower the niceness of a running command.

This page is available under a