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

  • darwinosx - Monday, June 24, 2013 - link

    Another peson who didn't read the article and knows nothing about Macs.
  • watersb - Monday, June 24, 2013 - link

    Excellent review!

    If only it were available with RAM...
  • darwinosx - Monday, June 24, 2013 - link

    If only you took tow seconds to find out you can order it with 8 GB of ram.
  • appliance5000 - Friday, December 20, 2013 - link

    It's available with 8gb ram - but here's the rub: If you have the 512gb ssd coupled with the fact that it's mounted on the pcie bus, your page ins and outs are about as fast as memory - or seemingly so. It's a very fast machine - I've tested it stitching multi gb panos and editing multi gb layered files in CS6 and it just rips.
  • FrozenDarkness - Monday, June 24, 2013 - link

    I think people get retina confused with higher resolution computers. Couple things, your windows computer? DPI up scaling sucks too much to truly run retina. Know that retina on a 13 MBP actually runs at a resolution of 1280x800 to be truly "retina" or else you're just up-scaling then down-scaling and burning your graphics card in the process. So in a sense, it's not truly higher resolution in terms of workspace, just in terms of beauty to behold. This also means a MBA retina would have to be a different, higher resolution panel, than the one used in the 13" MBP and at that point, what is the point of the MBP? I think you're more likely to see the MBP become more lik the MBA in size than vice versa.

    Also, panel lottery sucks, let's not act like apple is the only manufacturer who has a panel lottery or that samsung are only in "review" units.
  • A5 - Monday, June 24, 2013 - link

    Windows 8.1 is supposed to fix the DPI scaling in Windows. Win8 is already significantly better than 7.

    Beyond that, sharper pixels even without an increased workspace is still a good thing. I think the rMBPs have a mode that does both, anyway.
  • JarJarThomas - Tuesday, June 25, 2013 - link

    Windows 8.1 can't fix the dpi scaling in windows cause the problem is that most desktop applications can't scale well.

    Fixing dpi scaling with win8 would be similar to the solution apple does for non retine enabled grafics, internally upscale it.

    But that would not work with the way the windows grafic stack works and the applications are dependent on this.

    So scaling will ONLY be better for modern ui apps, not for desktop apps.
    And therefore it will suck
  • akdj - Wednesday, June 26, 2013 - link

    'Desktop applications can't scale well' because and ONLY because of the underlying OS. It's up to the operating systems architecture to provide third party scaling options/abilities. As we've seen with the rMBP....in less than a year, literally hundreds of apps....from small developers ala Pixelmator to the monsters...AKA, Adobe....have updated their 'code' for HiDPI displays. As has Apple with their software....and Windows with their native apps. Look at the Surface Pro for instance. Anything other than native Windows programming is a PITA. Windows 8.1 absolutely can help...regardless of how the graphic stack is set up....it's that low level coding that Windows needs to get creative with. Especially with dozens of OEMs, screen sizes and ratios....it will absolutely fall into Windows hands to provide decent scaling options and APIs for developers. High Rez monitors aren't going anywhere. 4k was all the rage at CES this year....and $7,000 Sony 4k TVs are already at Best Buys.
    OSx meanwhile has done an excellent job with pixel doubling trickery for text....while allowing developers the ability to natively use every pixel available 'in app' when drawing, editing video or stills....et al.
    That said, and as a rMBP and 11" Air owner, I can honestly say the Air's resolution doesn't bug me in the least. It's a 2011 core i7 and I use it daily....right along side my 15" rMBP...which is the best computer I've ever purchased. Almost a full year with it and it still brings a smile to my face. I started my computer life @ 14 with an Apple IIe in '85. I remember being jealous when my buddy got the 'color' screen for his IIc...while I continued to slave away on a green monochrome screen. Lol....I suppose its where we come from, our ages....and therefore, appreciation for higher resolution vs decent resolution (11" Air) more than adequate and a helluva lot better than other choices on the market. Dunno
  • Bkord123 - Tuesday, June 25, 2013 - link

    I do not claim to know a ton about computers, and I'll be honest, half of this review looks like it's written in Latin to me. However, regarding the comment that Windows 8 is better than 7, didn't I read several headlines that Windows 8 is more or less responsible for a massive decline in PC sales?
  • TheinsanegamerN - Sunday, June 30, 2013 - link

    the main reason pc sales are declining is a mix of a poor economy and computers lasting longer. machines reached the point of being fast enough for consumers five or six years ago. most consumers dont run out to get the newest thing in laptops, they wait until their current one breaks, which is more pronounced when jobs are not certain and raises are nonexistent. they were declining before windows 8 made it to market, though windows 8 isnt helping at all.

Log in

Don't have an account? Sign up now