• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: TCP, and clamping MSS..?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TCP, and clamping MSS..?


  • Subject: Re: TCP, and clamping MSS..?
  • From: Vincent Lubet <email@hidden>
  • Date: Wed, 10 Jan 2007 15:52:53 -0800

Andrew,

This is an optimization that is simple missin in xnu -- thanks for bringing it to our attention.

Feel free to file an enhancement request at http:// bugreporter.apple.com/ to make sure this won't fall through the cracks.

Thanks,

Vincent

On Jan 10, 2007, at 1:50 PM, Andrew Gallatin wrote:


Most BSDs "clamp" the MSS to a multiple of MCLBYTES.
From netinet/tcp_input.c in both darwin and and FreeBSD:

/* * Determine a reasonable value for maxseg size. * If the route is known, check route for mtu. * If none, use an mss that can be handled on the outgoing * interface without forcing IP to fragment; if bigger than * an mbuf cluster (MCLBYTES), round down to nearest multiple of MCLBYTES * to utilize large mbufs. If no route is found, route has no mtu, <....>

And in tcp_mss() FreeBSD actually does this:

        tp->t_maxseg = mss;

#if     (MCLBYTES & (MCLBYTES - 1)) == 0
                if (mss > MCLBYTES)
                        mss &= ~(MCLBYTES-1);
#else
                if (mss > MCLBYTES)
                        mss = mss / MCLBYTES * MCLBYTES;
#endif
        tp->t_maxseg = mss;

Any idea why this code is missing from darwin?

While trying to get decent 10GbE jumbo frame performance numbers from
MacOSX 10.4.8 between a pair of 2.6Ghz Mac Pros, I found I was limited
to about 7Gb/s for a single threaded test, or 8.8Gb/s for a
multi-threaded test.  If I manually set the MTU such that the MSS
winds up as 8192, then the single threaded performance jumps
to 8Gb/s and the multi-threaded to 9.08Gb/s.  Eg:

% netperf242 -H macpro01-m -l10 -P 0
524288 524288 524288    10.00    7047.07

% sudo route change -mtu 8244 macpro01-m
change host macpro01-m

% netperf242 -H macpro01-m -l10 -P 0
524288 524288 524288    10.00    8009.17


(I'm quoting a small sample size for this email, but it is reproducable over a large number of runs..)

Drew

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: TCP, and clamping MSS..?
      • From: Andrew Gallatin <email@hidden>
References: 
 >TCP, and clamping MSS..? (From: Andrew Gallatin <email@hidden>)

  • Prev by Date: TCP, and clamping MSS..?
  • Next by Date: Re: Understanding cores...
  • Previous by thread: TCP, and clamping MSS..?
  • Next by thread: Re: TCP, and clamping MSS..?
  • Index(es):
    • Date
    • Thread