Real World 802.11ac Performance Under OS X

A good friend of mine recently bought an older house and had been contemplating running a bunch of Cat6 through the crawlspace in order to get good, high-speed connectivity through his home. Pretty stoked about what I found with 802.11ac performance on the MacBook Air, I thought I came across a much easier solution to his problem. I shared my iPerf data with him, but he responded with a totally valid request: was I seeing those transfer rates in real world file copies?

I have an iMac running Mountain Lion connected over Gigabit Ethernet to my network. I mounted an AFP share on the MacBook Air connected over 802.11ac and copied a movie over.

21.2MB/s or 169.6Mbps is the fastest I saw.

Hmm. I connected the iMac to the same ASUS RT-AC66U router as the MacBook Air. Still 21.2MB/s.

I disabled all other wireless in my office. Still, no difference. I switched ethernet cables, I tried different Macs, I tried copying from a PC, I even tried copying smaller files - none of these changes did anything. At most, I only saw 21.2MB/s over 802.11ac.

I double checked my iPerf data. 533Mbps. Something weird was going on.

I plugged in Apple’s Thunderbolt Gigabit Ethernet adaptor and saw 906Mbps, clearly the source and the MacBook Air were both capable of high speed transfers.

What I tried next gave me some insight into what was going on. I setup web and FTP servers on the MacBook Air and transferred files that way. I didn’t get 533Mbps, but I broke 300Mbps. For some reason, copying over AFP or SMB shares was limited to much lower performance. This was a protocol issue.

Digging Deeper, Finding the Culprit

A major component of TCP networking, and what guarantees reliable data transmission, is the fact that all transfers are acknowledged and retransmitted if necessary. How frequently transfers are acknowledged has big implications on performance. Acknowledge (ACK) too frequently and you’ll get terrible throughput as the sender has to stop all work and wait for however long an ACK takes to travel across the network. Acknowledge too rarely on the other hand and you run the risk of doing a lot of wasted work in sub optimal network conditions. The TCP window size is a variable that’s used to define this balance.

TCP window size defines the max amount of data that can be in flight before an acknowledgement has to be sent/received. Modern TCP implementations support dynamic scaling of the TCP window in order to optimize for higher bandwidth interfaces.

If you know the round trip latency of a network, TCP window size as well as the maximum bandwidth that can be delivered over the connection you can actually calculate maximum usable bandwidth on the network.

The ratio of the network’s bandwidth-delay product to the TCP window size gives us that max bandwidth number.

The 2-stream 802.11ac in the new MacBook Air supports link rates of up to 867Mbps. My iPerf data showed ~533Mbps of usable bandwidth in the best conditions. Round trip latency over 50 ping requests between the MBA client and an iMac wired over Gigabit Ethernet host averaged 2.8ms. The bandwidth-delay product is 533Mbps x 2.8ms or 186,550 bytes. Now let’s look at the maximum usable bandwidth as a function of TCP window size:

Impact of TCP Window Size on 802.11ac Transfer Rates, 533Mbps Link, 2.8ms Latency
Window Size Bandwidth-Delay Product TCP Window/BDP Percentage Link Bandwidth Max Realized Bandwidth
32KB 186550B 32768/186550B 17.6% 533Mbps 93.6Mbps
64KB 186550B 65536/186550B 31.1% 533Mbps 187.2Mbps
128KB 186550B 131072/186550B 70.3% 533Mbps 374.5Mbps
256KB 186550B 262144/186550B 140.5% 533Mbps 533Mbps

The only way to get the full 533Mbps is by using a TCP window size that’s at least 256KB.

I re-ran my iPerf test and sniffed the packets that went by to confirm the TCP window size during the test. The results came back as expected. OS X properly scaled up the TCP window to 256KB, which enabled me to get the 533Mbps result:

I then monitored packets going by while copying files over an AFP share and found my culprit:

OS X didn’t scale the TCP window size beyond 64KB, which limits performance to a bit above what I could get over 5GHz 802.11n on the MacBook Air. Interestingly enough you can get better performance over HTTP or FTP, but in none of the cases would OS X scale TCP window size to 256KB - thus artificially limiting 802.11ac.

I spent a good amount of time trying to work around this issue, even manually setting TCP window size in OS X, but came up empty handed. I’m not overly familiar with the networking stack in OS X so it’s very possible that I missed something, but I’m confident in saying that there’s an issue here. At a risk of oversimplifying, it looks like the TCP window scaling algorithm features a hard limit in OS X’s WiFi networking stack optimized for 802.11n and unaware of ac’s higher bandwidth capabilities. I should also add that the current developer preview of OS X Mavericks doesn’t fix the issue, nor does using an Apple 802.11ac router.

The bad news is that in its shipping configuration, the new MacBook Air is capable of some amazing transfer rates over 802.11ac but you won’t see them when copying files between Macs or PCs. The good news is the issue seems entirely confined to software. I’ve already passed along my findings to Apple. If I had to guess, I would expect that we’ll see a software update addressing this.

802.11ac: 533Mbps Over WiFi Display
Comments Locked

233 Comments

View All Comments

  • Skolde - Monday, June 24, 2013 - link

    I find the current display resolutions on these "premium" products to be very lacking for me to actually seriously consider a purchase. At least stick something in there like 1600x900.

    ....1366 x 768? Come on!

    Also - bumping the memory up to 8GB would be nice. I know it isn't build to be a workhorse, but still.

    The XPS13 from Dell seems to be a much nicer option currently.
  • rangerdavid - Monday, June 24, 2013 - link

    1440 x 900 on this 13".
  • ddriver - Monday, June 24, 2013 - link

    Why not, they put higher resolution on 5 inch phones...
  • darwinosx - Monday, June 24, 2013 - link

    They put higher resolution screens on their retina laptops. The Air focus on battery life and performance above all.
  • designerfx - Monday, June 24, 2013 - link

    except that's a problem. You can't take advantage of certain basic parts of *performance* if you have a terrible display.
  • dsumanik - Tuesday, June 25, 2013 - link

    Here is the non TLDR version of this review:

    "intel came out with a new CPU, samsung made a new SSD and apple slapped it together last minute in an existing design. Ultimately, You get a slower, longer lasting air for a 100 bucks less that carries over all the little annoyances from last year."

    whoop dee f*ckin do……..This is apple innovation?

    "the m.2 spec wasnt far enough along to be used in this generation"

    Oh please, What a load of horse ****. I think anand, like many other review sites invested heavily in apple stock and are now trying to stop the bleeding. Apple has been deliberately stifling user upgrades for years….That is why they have proprietary connectors…ON EVERYTHING...your readers, and your reviewer knows this.

    "The only thing that hasn't changed, that perhaps should have is the display. "

    ya think? My phone has better rez. You've been criticizing PC makers for 2 years about the 1366x768 resolution, and here we have apple in 2013 and you say they "perhaps should have changed"

    ROFL

    Here are some "cheap" things they could have done to actually make this product an upgrade:

    -move the thunderbolt port beside the power connector (no more stethoscope when plugged in driving a display)
    -second thunderbolt port (now you can have 2 displays native and not be down a precious USB3)
    -16gb ram availability (now I can run several VM's comfortably when developing)
    -performance on par with last years MBA?
    -nfc support
    -4G support

    here is some mild innovation they could have done:

    -detachable screen (tablet notebook hybrid)
    -retina display
    -wireless desktop charger

    3rd tier PC makers are coming out with better hardware than apple now, this year was critical and they've dropped the ball…with the exception of the Mac pro.

    a smartwatch *could* be cool if it comes out totally water proof for active users…jogging swimming etc, if not i don't see the incentive to purchase unless it is super low cost.

    what they need to "fix" the situation

    -low cost iPhone (incoming 2013)
    -large screen iPhone (2014)
    -retina display across the board on all products (2015)
    -updated thunderbolt display, USB3 and 4k Rez for under 2000 bucks.
    -apple branded TV and home theatre system
    -thunderbolt or USB3 sync speeds on all iDevices

    Dump your apple stock now, it will bounce back but never to the highs it was previously.
  • Glindon - Wednesday, June 26, 2013 - link

    Bored much?
  • abazigal - Wednesday, June 26, 2013 - link

    Can you name me all the other manufacturers who are implementing these features, much less doing them properly?

    You want retina, there's the 13" retina MBP. And I think he was criticising manufacturers for using 1366x768 res on a 13" laptop screen. Apple uses that for their 11" MBA line, which I find is still acceptable.

    Apple decided that a slight decrease in performance was an acceptable tradeoff for longer battery life. And I am inclined to agree with them. The new processor speed still more than suffices for what typical consumers use it for anyways.

    What am I supposed to do with NFC on a laptop? You want the power source to be beside the thunderbolt port. I don't think there is quite sufficient space for 2 USB ports on one side, and so long as it hooks up to your thunderbolt display just fine, does it really irritate you so that the two cables split up?

    Personally, I feel there is nothing Apple "needs" to do. I am perfectly fine with their products. I like them, I buy them.
  • ysaykin - Saturday, July 13, 2013 - link

    I think that in a way the comments are right. 11 inch laptops for $1000 should have some luxury features. One of those is amazing battery life, good keyboard, nice display, and good performance. The macbook air has some bases covered, but lacks the display. The resolution is fine for a sub $600 notebook but not at $1000, also a TN panel on a $1000 notebook sounds like a rip off. It should have been at least an ips panel. The longer battery life is only achievable because Mac OSx has been optimized for battery life, but if you use windows on the machine your battery takes a huge dip. So is it a good laptop, definitely, but is it worth the $1000 price? I think it's def a mac tax. Look at the Lenovo yoga which if updated to haswell would have awesome battery life, touchscreen, ips 1600x900 resolution, and convertible to tablet mode.
  • rudolphbyers - Thursday, October 9, 2014 - link

    There's nothing that could replace my MacBook Air! /Rudolph from http://www.consumertop.com/best-laptop-guide/

Log in

Don't have an account? Sign up now