FreeBSD 4.x and OS-X tcp performance

Nickolay Kritsky Nickolay.Kritsky at astra-sw.com
Wed Mar 9 03:28:50 PST 2005


Here is my $0.02

I have seen such a problem with TCP flows between FreeBSD 4.5 and SUN servers.
The same scenario - ACKs getting lost on the one side of the link, which was clearly seen on the tcpdumps taken on each sides at one time. I am not so good in theory, but as quick fix - setting Sun's NIC to HD helped.

My guess was that packets are lost in the switch queues because of "too high" speed of Sun's NIC. Like overflowing some internal buffers. I don't know if it's true.

Nick

-----Original Message-----
From: Daniel Hartmeier [mailto:daniel at benzedrine.cx]
Sent: Tuesday, March 08, 2005 3:47 PM
To: Charles Sprickman
Cc: freebsd-net at freebsd.org
Subject: Re: FreeBSD 4.x and OS-X tcp performance


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
_______________________________________________
freebsd-net at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-net mailing list