weird loadavg.

robbie@scot-mur.demon.co.uk
Thu, 18 Jun 1998 22:20:56 +0100


Hi

I just ran a small program, to test full duplex on my sound card. It is
using the sgalaxy module. It is a stupid program, copying only 1 byte at a
time, but for some reason my load average is very high! I haven't noticed
any degradation of performance. cpu is k6 300 mHz, 64 mb ram. I also have
the rc5 client running.

Hmm, as I type this the load average is now at 76! and I killed the
program after generating the output below. weird.

Script started on Thu Jun 18 21:56:42 1998
scot-mur# top
9:57pm up 1 day, 1:49, 6 users, load average: 72.03, 71.19, 69.02
144 processes: 141 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: 91.7% user, 9.8% system, 88.1% nice, 0.0% idle
Mem: 63148K av, 61764K used, 1384K free, 35272K shrd, 13192K buff
Swap: 66524K av, 1880K used, 64644K free 27540K cached
PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
1828 nobody 20 19 704 704 548 R N 0 88.1 1.1 1236m distributed-
5344 root 5 0 796 796 568 R 0 8.9 1.2 0:00 top
5332 robbie 0 0 228 228 184 S 0 4.4 0.3 0:13 a.out
1 root 0 0 176 124 104 S 0 0.0 0.1 0:03 init
2 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 kflushd
...
The program a.out above is this. (I know it's not exactly the best way of
doing it:))
#include<stdio.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<unistd.h>
char a;
main()
{
int fd;
fd=open("/dev/dsp",O_RDWR);
while(1)
{
read(fd,&a,sizeof(a));
write(fd,&a,sizeof(a));
}
}

-- 

Robbie Murray

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu