Make your program behave nicely
Friday, December 16, 2005 1:02:09 AM
First of all I was thinking, maybe its my kernel, I manually compile my kernel, I might be screw up. Therefore i discuss with those debian experts at #debian channel of freenode. They told me,I can actually ask my program to behave nicely, just add nice infront of those program to ask them behave nicely.
I tried on it, it works! I finally discover every process have its nice value, which effects the process scheduling. The nice value is in range of (-20,20). The smaller the value is, the less nice the process, that means it will be scheduled to execute more often. My synatic actully have nice value -5, but most of the process are 0, so i change the shortcut properties of synatic, added nice -0 infront of the command. Xine works wonderfully clear in my debian box, but it sometimes less smooth. In order to make it more smooth, it have to do its work more often, so I append nice --5 infront of it.
To know what's processes nice value, can use top and ps. Just type top, look under ni field there you can get it. Or you may:
ps -o pid,ppid,args,ni -A
It lists all processes current running with only shows few field such as pid, ppid, process name and nice value.