Has anybody noticed that scheduling appears to be broken on the alpha?
On both i386 & alpha, try:
echo "main(){for(;;);}" > foo.c
cc foo.c
/usr/bin/nice -20 ./a.out & ; ./a.out &
& watch the programs run in top. You'll notice that on the i386, the
non-niced job will get about 2/3 of the cpu & the niced job will get
about one third:
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
51676 gallatin 94 0 764K 204K RUN 5:37 64.31% 64.31% a.out
51675 gallatin 105 20 764K 204K RUN 2:42 32.71% 32.71% a.out
On the alpha, its close to dead even & the nice'd job is actually
getting more CPU!:
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
76397 gallatin 105 20 1168K 960K RUN 4:10 49.61% 49.61% a.out
76398 gallatin 105 0 1168K 960K RUN 4:38 48.00% 48.00% a.out
The i386 (a PII) shows this for kern.clockrate:
kern.clockrate: { hz = 100, tick = 10000, tickadj = 5, profhz = 1024, stathz = 128 }
And the alpha shows this:
kern.clockrate: { hz = 1024, tick = 976, tickadj = 5, profhz = 1024, stathz = 1024 }
I fully admit that I don't have a good understanding of the scheduling
algorithm. I was hoping somebody who does might be able to suggest a
fix.
Thanks,
Drew
------------------------------------------------------------------------------
Andrew Gallatin, Sr Systems Programmer http://www.cs.duke.edu/~gallatin
Duke University Email: [EMAIL PROTECTED]
Department of Computer Science Phone: (919) 660-6590
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message