LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   process priority,nice -- small question regarding high/low priority values (https://www.linuxquestions.org/questions/linux-newbie-8/process-priority-nice-small-question-regarding-high-low-priority-values-491445/)

beeblequix 10-11-2006 10:14 AM

process priority,nice -- small question regarding high/low priority values
 
http://www.samspublishing.com/articl...?p=101760&rl=1
This url explains most of my question about process priority. It tells me that nice has values ranging from -20(highest priority) to 19(lowest priority). It also mentions the regular process scheduled priority range from 0 to 99. BUT it doesn't tell me which is higher -- is 0 the highest priority or is 99? Dumb question, I know, but I can't assume it's along the same x axis as 'nice'. Ideas? URLs?

ß

beeblequix 10-11-2006 10:22 AM

Another question: why do these two commands (ps -el & top) list priorities differently?

me@mysles8server:~> ps -el|head -15
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
004 S 0 1 0 0 75 0 - 120 11df6a ? 00:00:11 init
006 S 0 2 1 0 -40 0 - 0 1106e0 ? 00:00:00 migration_CPU0
002 S 0 3 1 0 85 0 - 0 1099ee ? 00:00:00 kmcheck
002 S 0 4 1 0 75 0 - 0 123d56 ? 00:00:00 keventd
002 R 0 5 1 0 94 19 - 0 - ? 00:00:34 ksoftirqd_CPU0
022 S 0 6 1 0 75 0 - 0 1395c6 ? 00:42:11 kswapd
002 S 0 7 1 0 75 0 - 0 14a00a ? 00:00:00 bdflush
002 S 0 8 1 0 75 0 - 0 11df6a ? 00:00:13 kupdated
002 S 0 9 1 0 76 0 - 0 160eee ? 00:00:13 kinoded
002 S 0 56 1 0 83 0 - 0 1fd398 ? 00:00:00 mdrecoveryd
002 S 0 63 1 0 75 0 - 0 11df6a ? 00:00:01 kreiserfsd
002 S 0 86 1 0 60 -20 - 0 1099ee ? 00:00:00 lvm-mpd
002 S 0 106 1 0 75 0 - 0 8f1588 ? 00:00:00 kjournald
002 S 0 107 1 0 75 0 - 0 8f1588 ? 00:08:43 kjournald


me@mysles8server:~> top -b -n1|head -25


9:19am up 33 days, 22:13, 1 user, load average: 1.09, 1.21, 1.26
192 processes: 189 sleeping, 2 running, 1 zombie, 0 stopped
CPU states: 0.4% user, 0.4% system, 0.0% nice, 0.9% idle
Mem: 1290448K av, 1272476K used, 17972K free, 0K shrd, 60040K buff
Swap: 4048K av, 4048K used, 0K free 671736K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
10844 me 17 0 1100 1096 808 R 19.9 0.0 0:00 top
1 root 15 0 84 84 44 S 0.0 0.0 0:11 init
2 root 0K 0 0 0 0 SW 0.0 0.0 0:00 migration_CPU0
3 root 25 0 0 0 0 SW 0.0 0.0 0:00 kmcheck
4 root 15 0 0 0 0 SW 0.0 0.0 0:00 keventd
5 root 34 19 0 0 0 RWN 0.0 0.0 0:34 ksoftirqd_CPU0
6 root 15 0 0 0 0 SW 0.0 0.0 42:11 kswapd
7 root 15 0 0 0 0 SW 0.0 0.0 0:00 bdflush
8 root 15 0 0 0 0 SW 0.0 0.0 0:13 kupdated
9 root 16 0 0 0 0 SW 0.0 0.0 0:13 kinoded
56 root 23 0 0 0 0 SW 0.0 0.0 0:00 mdrecoveryd
63 root 15 0 0 0 0 SW 0.0 0.0 0:01 kreiserfsd
86 root 0 -20 0 0 0 SW< 0.0 0.0 0:00 lvm-mpd
106 root 15 0 0 0 0 SW 0.0 0.0 0:00 kjournald
107 root 15 0 0 0 0 SW 0.0 0.0 8:43 kjournald
245 root 20 0 0 0 0 SW 0.0 0.0 0:00 qethsoftd0018


All times are GMT -5. The time now is 10:40 PM.