From owner-freebsd-hackers Sun Jan 22 03:21:54 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id DAA02380 for hackers-outgoing; Sun, 22 Jan 1995 03:21:54 -0800 Received: from duality.gnu.ai.mit.edu (!@#$%^&*!@#$%^&*!@#$%^&*!@#$%^&*!@#$%^&*!@#$%^&*!@#$%^&*!@#$%^&*!@#$%^&*!@#$@duality.gnu.ai.mit.edu [18.43.0.236]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id DAA02374 for ; Sun, 22 Jan 1995 03:21:47 -0800 Received: (from mycroft@localhost) by duality.gnu.ai.mit.edu (8.6.9/8.6.9) id GAA28543; Sun, 22 Jan 1995 06:21:25 -0500 Date: Sun, 22 Jan 1995 06:21:25 -0500 Message-Id: <199501221121.GAA28543@duality.gnu.ai.mit.edu> From: "Charles M. Hannum" To: davidg@Root.COM CC: olah@cs.utwente.nl, hackers@FreeBSD.org In-reply-to: <199501221012.CAA00270@corbin.Root.COM> (message from David Greenman on Sun, 22 Jan 1995 02:12:05 -0800) Subject: Re: Netinet internals (Was: Patching a running kernel) Sender: hackers-owner@FreeBSD.org Precedence: bulk Choppiness aside, this also fixes another problem where some 4.3BSD based hosts would often send less than the expected mss during a normal bulk transfer on an idle network. This can happen if you fill up the socket buffer before outputting a full window, since the receiver will wait until either a delayed ack timeout or a full window is received before acking. This usually happens with Berkeley TCP because for `performance reasons' the socket buffer is not aggressively compressed; nonetheless it is a more generic problem, and caused a factor of nearly 100 slowdown in one particular application I was looking at that opens a TCP connection to the local machine. I solved this (in NetBSD) by having the receiver always ack immediately if the incoming packet has the PUSH bit set. In the worst cases, there is either no change (if the PUSH bit is never set), or delayed ack is effectively disabled (if the PUSH bit is always set). In a slightly better implementation of TCP, the application would be able to request a push. In Berkeley TCP, the PUSH bit is set by the TCP stack automatically for the last piece of data in the buffer. Most implementations I've seen use the bit in this latter fashion. For compatibility reasons, all senders must set the PUSH bit about as often as Berkeley TCP (whether automatic or by request of the user), so the `worst case' of `no change' never happens. For the case of an honestly requested push, acking immediately is clearly the correct thing to do, since the sender would like to know as soon as possible that the data has actually been received. For the Berkeley TCP case, it turns out to solve the previous problem, and cause no additional network usage for bulk data transfers. I'm not aware of any problems created by this solution. (BTW, I also posted about this to comp.protocols.tcp-ip, though I only received one reply, on a somewhat different subject.)