Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!hsdndev!spdcc!iecc!Postmaster From: johnl@iecc.cambridge.ma.us (John R. Levine) Newsgroups: comp.unix.sysv386 Subject: Buffers vs. tty throughput Message-ID: <9101272226.AA01243@iecc.cambridge.ma.us> Date: 28 Jan 91 03:26:06 GMT Sender: Postmaster@iecc.cambridge.ma.us Organization: I.E.C.C. Lines: 25 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@iecc.cambridge.ma.us, {spdcc|ima|world}!iecc!johnl