I am considering renicing some processes so that they will remain responsive under heavy load on a server.
I read the short man page for renice, and I understand it less each time I re-read it. It says it alters the scheduling priority. However, priority is the opposite of niceness so that is surprising given that the command is called renice. Reading further, they discuss scheduling priority in the description section.
Useful priorities are: 19 (the affected processes will run only when nothing else in the system wants to), 0 (the ``base'' scheduling priority), anything negative (to make things go very fast).
This is not in line with a relation between niceness and priority seen in the top command. From man top:
The nice value of the task. A negative nice value means higher priority, whereas a positive nice value means lower priority. Zero in this field simply means priority will not be adjusted in determining a task's dispatch-ability.
In the world of top, priority is the opposite of niceness, and the separate PR field shows the priority value, which is higher for faster running processes.
In the world of renice, priority and niceness are discussed as if they are the same value. In fact, renice -n is apparently equivalent to renice --priority.
The example given in the renice man pages seems like something useful on many systems: Increasing the speed of root processes. However, if I'm not mistaken, it is actually decreasing the speed. I feel it is a misleading, or at least poorly explained example.
Toss in the fact that values are either an increment or a priority, with no command flag differentiating the two. So renice +1 can be used, and so can renice -1. But -1 can be a priority OR an increment, so which is it interpreted as? I can only guess what
renice -1 root would do, or determine it experimentally. There seems to be no logical way to determine what this would do from the man page.
Will a "nice" person please explain what command would make root processes run a bit faster, and how I can interpret the man page going forward?