nice [-n | --adjustment=n] [command [command's args]...]
Run command
with an adjusted niceness, which affects process scheduling. command
, display the current niceness.
-n |
nice weatherAnalysis
will tend to defer (be nice) processing to other tasks.
Returns:
1-125 An error occurred in the nice utility.
126 command
was found but could not be invoked.
127 command
could not be found.
Otherwise, the exit status of nice shall be that of command
.
renice
- alter priority of running processes
renice priority [[-p] pid ...]
[[-g] pgrp ...]
[[-u] user ...]
Alters the scheduling priority of running processes.
Renice'ing a group of processes, effects all processes in the process group. Renice'ing a users processes, effects all processes owned by the user. By default, the processes to be affected are specified by their process ID's.
-g |
sudo renice +1 987 -u students adjuncts -p 32
would reduce the priority of process ID's 987 and 32, and all processes owned by users students and adjuntcs.
Users may only reduce the priority of processes they own, and
can only monotonically increase their nice value within the range 1 to PRIO_MAX
(20).
Super-user may alter the priority of any process and set the priority to any value in the range PRIO_MIN
(-20) to PRIO_MAX
.
Useful priorities are:
20
:the affected processes will run only when nothing else can use CPU resources.
0
:the base scheduling priority, anything negative (try make a process go faster). On Mac OSX normal prio seems to be 31, prio 14 is used by
Personal experience suggest that BOTH small changes can have drastic effects (like preventing other processes, including the bash shell you are using, from executing) and large changes may have only minmal effect dependent on the I/O activity of the competing processes.
The results are pretty unpredictible, actual milage WILL vary, depending on sorundings!
getpriority(2), setpriority(2)