From owner-freebsd-net@FreeBSD.ORG Tue Mar 8 12:46:58 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 661CA16A4CE for ; Tue, 8 Mar 2005 12:46:58 +0000 (GMT) Received: from insomnia.benzedrine.cx (insomnia.benzedrine.cx [62.65.145.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id A532843D5E for ; Tue, 8 Mar 2005 12:46:56 +0000 (GMT) (envelope-from dhartmei@insomnia.benzedrine.cx) Received: from insomnia.benzedrine.cx (dhartmei@localhost [127.0.0.1]) j28CkoMd019331 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Tue, 8 Mar 2005 13:46:51 +0100 (MET) Received: (from dhartmei@localhost) by insomnia.benzedrine.cx (8.13.3/8.12.10/Submit) id j28Cklfp019318; Tue, 8 Mar 2005 13:46:47 +0100 (MET) Date: Tue, 8 Mar 2005 13:46:46 +0100 From: Daniel Hartmeier To: Charles Sprickman Message-ID: <20050308124646.GF26999@insomnia.benzedrine.cx> References: <20050305024850.GA96307@wjv.com> <20050307090802.GR26999@insomnia.benzedrine.cx> <20050307204825.GY26999@insomnia.benzedrine.cx> <20050308101633.GC26999@insomnia.benzedrine.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050308101633.GC26999@insomnia.benzedrine.cx> User-Agent: Mutt/1.5.6i cc: freebsd-net@freebsd.org Subject: Re: FreeBSD 4.x and OS-X tcp performance X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2005 12:46:58 -0000 According to RFC 793 (the original TCP specification), the client may (even should) wait at least one second before retransmitting any segment. However, RFC 2001 describes Fast Retransmission, where the third acknowledgment for the same segment should be interpreted as an indication of packet loss, and cause an immediate retransmission (without waiting for the timeout of at least one second). I'd have expected Mac OS X to both implement this and enable it by default, but maybe I'm wrong. There's a sysctl net.inet.tcp.newreno which defaults to 0, and which seems to affect things. If you google, you find patches like http://www.opendarwin.org/~fkr/xnu/mach_kernel-to-517.7.21-SACK.diff which doesn't just contain SACK code, but possibly fixes fast retransmissions when newreno is not set. I'm not sure if disabling the newreno sysctl should disable fast retransmissions, or whether that's a bug. So, the Mac OS X client is not wrong in honouring RFC 793 alone. It just suffers badly from any packet loss. For you, the more relevant question is why there's 1.2% packet loss between the Mac OS X client and FreeBSD server, even when connected directly with crossover. Daniel