Date: Tue, 26 Dec 1995 01:20:44 -0800 From: David Greenman <davidg@Root.COM> To: Petri Helenius <pete@sms.fi> Cc: questions@freebsd.org, wollman@freebsd.org, olah@freebsd.org Subject: Re: Unpleasant scrolling behaviour on 2.1.0 (fwd) Message-ID: <199512260920.BAA06348@corbin.Root.COM> In-Reply-To: Your message of "Tue, 26 Dec 95 10:01:50 %2B0200." <199512260801.KAA27158@silver.sms.fi>
next in thread | previous in thread | raw e-mail | index | archive | help
>David Greenman writes: > > > The loopback MTU has been at 16K or greater since Garrett Wollman first > > changed it to 64k back in FreeBSD 1.1. I changed it from 64K to 16K back in > > March of this year because of some bad interaction that 64K has with the > > socket layer. As for "stop-and-go", no, having the MTU at 16k doesn't by > > itself cause this - especially since the window size is significantly larger > > than that. You can use a variety of network tools to verify this. > >The window size is (by default) at 16384. Just run tcpdump and you'll >soon figure this out. I did, that's why I know it isn't 16k. "you'll soon figure this out" doesn't score any positive points for your assertions. 00:15:11.445903 localhost.1109 > localhost.discard: S 2016000422:2016000422(0) win 16384 <mss 16344> (DF) 00:15:11.446021 localhost.discard > localhost.1109: S 2016085048:2016085048(0) ack 2016000423 win 28672 <mss 16344> (DF) 00:15:11.446066 localhost.1109 > localhost.discard: . ack 1 win 28672 (DF) 00:15:11.451363 localhost.1109 > localhost.discard: P 1:14337(14336) ack 1 win 28672 (DF) 00:15:11.451839 localhost.discard > localhost.1109: . ack 14337 win 28672 (DF) ... (ttcp -p9 -t localhost) > > It's very presumptuous to assume that "non-networking skilled individuals" > > were involved in this change. Quite the contrary. If you want to be helpful, > > then I'd suggest making useful comments about what you think the MTU should be > > changed to and why you think it should be changed. Your comments will > > otherwise only alienante you and cause people to ignore you. > > >The MTU should be half or less of the default window size. I would recommend >values in the range of 5k to get effective streaming regardless of the >application and specific system scheduling load. Calculate something like >TCP_MSS < MTU < (TCP_WIN/3) and you'll be safe. Yes, in general it would be best for the window to be at least twice the MTU. However, for the loopback device the way the code is written actually makes this work significantly worse than using a larger MTU. There are a variety of reasons why this is the case, and some of them are due to bugs in the code. On first glance, one of the bugs involved here appears to be that even though TCP_MAXWIN is 64k, the actual window being used (as seen above in tcpdump) is 28K and the packets sent through the loopback device are 14K large. This is likely at least partially due to the socket highwater limit on the xmit and/or receive side being lower than the MTU, but I haven't recently looked at the code to be sure. Something to try would be to increase SO_RCVBUF and/or SO_SNDBUF to 64k and see how things are effected. ...or: sysctl -w net.inet.tcp.sendspace=65536 sysctl -w net.inet.tcp.recvspace=65536 ...but there are likely other limits or bugs that will get in the way of making this work as expected. >On the helpfulness side, I'd tried to raise discussion on this topic >a couple of times before, until I threw the flame above, nobody cared. The only other message I've seen from you on this subject was worded in much the same way as this last one: "What's your lo0 MTU? If it's the 16384 that some non-tcp-knowledgeable person put in sometime in the past " If your tone hadn't been so completely condescending, perhaps someone may have actually listened to you. Perhaps you're refering to some other messages from a few months back? If so, they probably got completely overlooked while I was working on the 2.1 release, and any other people (Garrett, Andras) that might have been interested don't subscribe to freebsd-questions. Merry Christmas. -DG
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512260920.BAA06348>