Adjusting the nice level is useful when running a non time-critical process that lasts long and uses large amounts of CPU time, such as compiling a kernel, on a system that also performs other tasks. Making such a process “nicer”, ensures that the other tasks, for example a webserver, will have a higher priority.
Calling nice without any parameters prints the current niceness:
nikesh@poison:~> nice
0
Running nice command increments the current nice level for the given command by 10. Using nice -n level command lets you specify a new niceness relative to the current one.
To change the niceness of a running process, use renice priority -p process id, for example:
renice +5 3266
To renice all processes owned by a specific user, use the option -u user. Process groups are reniced by the option -g process group id.
1 comments:
Nice hint :) thanks
Post a Comment