NUMA support; tweaking TCP for GPRS

Sean Hamilton sh at bel.bc.ca
Fri Jan 1 10:33:05 UTC 2010


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 <sh at bel.bc.ca>


More information about the freebsd-hackers mailing list