John Sheu wrote:
Sort of misleading. For a highly CPU-bound process, renicing a program will make it run faster, as it gets a better share of the CPU's valuable time. And in some cases (i.e. game framerate, if a game was for some reason CPU-bound), faster in fact equals smoother.
Faster than what? It certainly can't run any faster than it was originally intended to do. The only thing it can do, is run faster than it would do if it wasn't (re)niced. The only time that it would run faster by (re)nicing would be if the server was under heavy load.
If a process consumes 10% of CPU time per second, (re)nicing it will not make it consume more or less time, thereby making it work faster or slower. (re)nicing the process will only allocate larger or smaller time slices (and more of them) to that process. The process will still only run as fast as it would if were not (re)niced at all. Imagine a scenario of an ideal system, with nothing else running and, no overheads for swapping processes. You have 1 high CPU-bound process(a) utilising 70% of the CPU time slices/s. It is happy using the CPU without any interruptions from any other processes. (re)nicing it will not make it run any faster or slower as there is no other processes to share the CPU time slices. In this scenario, there is no point to renicing the process as there is nothing else to share the CPU time with. Lets add to this ideal system another process(b). Lets assume that if this process were on its own, it would utilise 20% of the CPU time slices/s. Now we have 2 processes which are highly likely to be wanting to use the CPU at the same time. (re)nicing process(a) ensures the our main process always has priority to use the CPU and get to use more of it before the CPU passes control to the other process. This ensures that process(a) runs smoother - but not faster. If we were to add yet another process to this system which would, by itself, utilise 30% of the CPU time slices/s, then this is the only case where (re)nicing would make a process run faster than it would otherwise. We would now have a 3 processes trying to grab more time slices/s than the CPU can provide and all the processes would lag regardless of how you reniced them. Matt. _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux

