[MUD-Dev] Re: Ethernet NICS, maximum connections..mud testing.

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Sun Aug 9 23:45:20 CEST 1998


[Ben Greear:]

 >Try this:  write a 1 meg file to disk, 10 characters at a time, and
 >do the same with 4k blocks.  Sending over a socket would be the
 >should show the same graph.

Perhaps we should take this out of the MUD-Dev list.

ami-cg /home/cg % time a.out
Writing 16777216 bytes in 10 byte chunks
All done
0.78user 8.77system 0:09.74elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (63major+7minor)pagefaults 0swaps

ami-cg /home/cg % time a.out
Writing 16777216 bytes in 4096 byte chunks
All done
0.00user 0.27system 0:00.66elapsed 40%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (63major+7minor)pagefaults 0swaps

As expected, the larger writes are much faster. Note however that the
effort on the smaller writes is almost entirely CPU time. The perfmeter
goes up, and the CPU usage reported by 'time' is high. This is all as
expected.

The question I am asking has nothing to do with the speed of large
requests versus small requests. Obviously large requests are more
efficient. The question I am asking, and the point I am getting at,
is that my socket activities are showing, on average, less than 2%
CPU usage. There are no idle delays in either program, and the client
reads from the disk in 512 byte chunks. The physical disk is only
active for a very small part of the elapsed time, so I am not spending
time waiting for it.

The question is: why does my experiment run at such a low CPU utilization?
Not why is it slow, but why does it run with the CPU mostly idle? I
think you have been missing this point.

--
Chris Gray     cg at ami-cg.GraySage.Edmonton.AB.CA




More information about the mud-dev-archive mailing list