From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 1 10:33:05 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C56FA106568B for ; Fri, 1 Jan 2010 10:33:05 +0000 (UTC) (envelope-from sh@visor.slugabed.org) Received: from visor.slugabed.org (visor.slugabed.org [64.69.77.108]) by mx1.freebsd.org (Postfix) with ESMTP id 8D8238FC16 for ; Fri, 1 Jan 2010 10:33:05 +0000 (UTC) Received: from visor.slugabed.org (sh@localhost [127.0.0.1]) by visor.slugabed.org (8.13.8/8.13.8) with ESMTP id o01AX2bm057256; Fri, 1 Jan 2010 02:33:02 -0800 (PST) (envelope-from sh@visor.slugabed.org) Received: (from sh@localhost) by visor.slugabed.org (8.13.8/8.13.8/Submit) id o01AWvNf057242; Fri, 1 Jan 2010 02:32:57 -0800 (PST) (envelope-from sh) Date: Fri, 1 Jan 2010 02:32:57 -0800 From: Sean Hamilton To: Lawrence Stewart Message-ID: <20100101103257.GM720@visor.slugabed.org> References: <20091113020835.GE12442@visor.slugabed.org> <4B2ADF1F.10908@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B2ADF1F.10908@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org Subject: Re: NUMA support; tweaking TCP for GPRS X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2010 10:33:05 -0000 On Fri, Dec 18, 2009 at 12:47:11PM +1100, Lawrence Stewart wrote: > Sean Hamilton wrote: > > [...] > > Second, I am using a FreeBSD server to talk to equipment > > which has a GPRS internet connection. This is fairly high > > latency (approximately one second RTT) and is prone to > > bursts of packet loss, or bursts of extremely high latency > > -- perhaps up to a minute. These intervals cause many > > retransmissions, which I presume is a good strategy over the > > internet, but not so good for GPRS. > > > > For my application, latency is mostly irrelevant. However, > > data over GPRS is very expensive, so I would like to reduce > > as much as possible the number of TCP retransmissions made > > on the FreeBSD side, possibly at the expense of latency. > > > > So, I am looking for suggestions on how to achieve this, via > > sysctl, setsockopt, etc. There seems to be a lot of > > literature regarding TCP tuning, but usually the focus is on > > improving performance, not reducing network traffic. The > > "rexmit_min" and "rexmit_sop" sysctls mentioned in tcp(4) > > seem interesting, but it's not clear to me exactly how they > > might be adjusted for this purpose. > > Just back from 6 months of travel and a bit busy right now catching up > on things, but ping me in a week or two about the TCP issue and I can > provide some insights. At this point, the issue is mostly resolved -- we were seeing a huge number of TCP retransmissions, but this was due to braindead and undocumented behaviour on the GPRS device side, not FreeBSD's fault at all. Specifically, the TCP stack on the device (eCos-based, but possibly using the TCP stack in the GSM chipset -- not sure) was setting some of its parameters based on the requested GPRS service class. For instance, if the GPRS service class indicated a desired average RTT of 0.5s, then it would just retransmit every 0.5s, or something like that -- the exact behaviour is undocumented, but clearly laughably broken. Anyway, I am still really interested in what you might have to say about this. I have already increased the minimum retransmission interval to a few seconds, with some success. -- Sean Hamilton