From owner-freebsd-net Mon Nov 29 15:53:57 1999 Delivered-To: freebsd-net@freebsd.org Received: from mullian.ee.mu.OZ.AU (mullian.ee.mu.OZ.AU [128.250.80.1]) by hub.freebsd.org (Postfix) with ESMTP id 80AD915592 for ; Mon, 29 Nov 1999 15:53:24 -0800 (PST) (envelope-from m.summerfield@ee.mu.oz.au) Received: from m-summerfield.ee.mu.oz.au (m-summerfield.ee.mu.OZ.AU [128.250.79.188]) by mullian.ee.mu.OZ.AU (8.9.1a/8.9.1) with SMTP id KAA02746; Tue, 30 Nov 1999 10:53:01 +1100 (EST) Message-Id: <199911292353.KAA02746@mullian.ee.mu.OZ.AU> X-Sender: summer@mullian.ee.mu.oz.au X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0.1 Date: Tue, 30 Nov 1999 10:54:11 +1100 To: dg@root.com, Alex Rousskov From: Mark Summerfield Subject: Re: interaction between Nagle's algorithm and TCP delayed ACKs Cc: freebsd-net@FreeBSD.ORG In-Reply-To: <199911292249.OAA27538@implode.root.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At 14:49 29/11/99 -0800, David Greenman wrote: >>Interesting! In our benchmarking environment we disable delayed ACKs as >>well. However, we were recently attacked by several vendors of the >>products we test. The vendors claim that turning delayed ACKs off >>produces too many ACK packets compared to a "real" TCP stream they >>observe in practice. Those "extra" ACKs might overflow their >>NICs/adapters when they are close to their performance capacity. > > That sounds very lame. It *is* very lame. If you want an authority to quote, how about John Nagle? Earlier this year there was one of the periodic mild flame-fests that erupt in comp.protocols.tcp-ip when someone seeking improved performance suggests that the Nagle algorithm is a liability. The discussion, as archived on deja.com (search for the subject "Turning off Nagles [sic] algorithm") contains 87 posts, of which the most succinct and informative is the single contribution from John Nagle himself. It can be found at http://x32.deja.com/=dnc/getdoc.xp?AN=477899304 . You can read the full text for yourself, but to summarise: 1) The thing that bites people is the nasty interaction that can occur between delayed ACKs and Nagle. 2) This happened because the two algorithms were developed independently and contemporaneously -- i.e. Nagle developed his algorithm on a network which did not have delayed ACKs. 3) Delayed ACKs are a nasty hack which are unnecessary, and John Nagle would like to see them removed from the TCP spec. 4) Nonetheless, if you do see poor performance due to the interaction, it does mean that your application is probably not well-designed, and you *should* be able to fix it with some judicious modification to the code. >>The vendors also say that Linux TCP stack does not emit that many ACKs >>while not suffering from extra delays that default FreeBSD settings >>create (i.e., Linux folks allegedly found some magic "golden middle" >>that satisfies everybody). We have not verified these claims. > > It could be that delayed ACKs aren't delayed as long in Linux. We could do >the same thing in FreeBSD by shortening it down to say 10ms or something. The host requirements RFC (1122) says that TCP SHOULD implement a delayed ACK of less than 500ms in duration. It is therefore perfectly legal to reduce it to 10ms. It's also legal not to do it. You might ask your vendors why their products can't handle perfectly legal behaviour, if they claim this is a problem. Perhaps you are exposing them to "worst case" conditions, but even so, Nagle alone should be sufficient to prevent congestion collapse unless the vendors' equipment is brain-damaged (and you'd think they'd want to know if it is?!) Mark ---- Dr. Mark Summerfield Australian Photonics Cooperative Research Centre Photonics Research Laboratory Dept. of Electrical and Electronic Engineering The University of Melbourne Parkville, 3052 AUSTRALIA Phone: +61 3 9344 7419 Fax: +61 3 9344 6678 Email: m.summerfield@ieee.org WWW: http://www.ee.mu.oz.au/staff/summer/index.htm To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message