Buffers vs. tty throughput
John R. Levine
johnl at iecc.cambridge.ma.us
Mon Jan 28 14:26:06 AEST 1991
I am running ISC 2.2 Unix on an Intel 302, a pretty much vanilla cached 25
MHz 386 with 16MB, 8MB on the motherboard, and 8MB on an expansion card.
The kernel has TCP/IP, X, and the Norton unerase, of which only the latter
two are turned on.
I have an internal Telebit with a 16550 UART, and uucp connections generally
run between 800 and 1100 cps, depending on who's on the other end. I noticed
that my system is fairly disk bound, and that since I'm not running NFS I
don't fill up all my RAM. It seemed sensible to increase my disk buffers, so
I built a new kernel with 4000 rather than 2000 buffers. It works OK, except
for one thing -- uucp throughput stinks. It was down around 400 cps. I
rebooted the old kernel and throughput is back up. As far as I can tell, the
only difference between the old and new kernels is NBUF.
What is going on? The most likely thing I can think of is that somewhere in
the buffer management code there is an N^2 algorithm that runs with
interrupts masked, and with 4000 buffers it takes so long that even with a
16550 I lose interrupts. I note that in the mtune file, 2000 is the maximum
number of buffers you're normally supposed to configure, but losing
performance when you add more buffers is pretty pitiful. As I recall, a
16550 has a 16 character silo, so to lose characters you'd have to stay
masked for upwards of 15ms at a time.
Regards,
John Levine, johnl at iecc.cambridge.ma.us, {spdcc|ima|world}!iecc!johnl
More information about the Comp.unix.sysv386
mailing list