Mostly Helpful Stuff

Free Carrots #6: Tools For Fighting WiFi Inequality

Free Carrots is an ongoing series of helpful tips for using Plan 9.

Intel 6205

Updated: 2023.07.13

The 9front FQA brazenly declares that the following Intel WiFi cards are supported by the iwl driver: 100, 1000, 2200, 2230, 3160, 4965, 5100, 5300, 5350, 6000, 6205, 7260, 8260, 8265, 9260, with the following supported by the wpi driver: 3945. Various users have reported over time that they do all work. But some of them seem to work better than others (the WiFi cards, not the users). Specifically, older cards exhibit far greater throughput than newer cards exchanging packets over the same networks.

Because I move between so many different machines, it has taken me a while to realize the intermittently bad WiFi performance conforms to a pattern.

What gives?

mPCIe cards are faster than M.2 cards

I’ve tested most of these cards in many different machines. Without exception, for reasons I don’t understand, I’ve observed that all known working mPCIe cards are much faster than all known working M.2 cards (save for one! See below), regardless of host machine or network.

What follows is an ad hoc demonstration wherein two different machines are connected to the Internet via WiFi sharing from my mobile phone. In both cases, the same remote OpenBSD box is mounted over sshfs(4), and the same files from that box are moved across the network, capturing throughput statistics with the tput(1) utility.

ThinkPad X60 Tablet w/ mPCIe Intel 3945:

   ; cat /n/rachael/usr/bin/* | tput
   0.00 B/s
   28.00 KB/s
   36.78 KB/s
   47.59 KB/s
   52.47 KB/s
   58.39 KB/s
   61.48 KB/s
   64.79 KB/s
   67.37 KB/s
   70.23 KB/s
   72.58 KB/s
   71.81 KB/s
   74.29 KB/s
   76.41 KB/s
   78.25 KB/s
   80.36 KB/s
   80.18 KB/s
   80.62 KB/s
   80.05 KB/s
   81.25 KB/s
   82.33 KB/s
   83.31 KB/s
   84.21 KB/s
   85.04 KB/s
   86.12 KB/s
   86.80 KB/s
   87.44 KB/s
   88.32 KB/s
   88.21 KB/s
   87.36 KB/s
   86.35 KB/s
   86.15 KB/s
   86.69 KB/s

Wow, so slow. Let’s see what happens if we use a much more powerful computer with a much newer Intel WiFi card:

ThinkPad X1 Yoga 3rd Gen w/ M.2 Intel 9260:

   ; cat /n/rachael/usr/bin/* | tput
   0.00 B/s
   0.00 B/s
   10.67 KB/s
   16.00 KB/s
   19.20 KB/s
   19.72 KB/s
   21.48 KB/s
   23.79 KB/s
   23.82 KB/s
   24.63 KB/s
   25.30 KB/s
   25.86 KB/s
   26.33 KB/s
   26.74 KB/s
   27.09 KB/s
   27.40 KB/s
   28.61 KB/s
   28.80 KB/s
   28.96 KB/s
   29.12 KB/s
   28.87 KB/s
   29.02 KB/s
   29.49 KB/s
   29.60 KB/s
   29.37 KB/s
   29.47 KB/s
   29.57 KB/s
   29.06 KB/s
   28.33 KB/s
   28.19 KB/s
   28.57 KB/s
   28.43 KB/s
   28.54 KB/s

Uh… what?

These results are consistent with all of my previous A/B comparisons between mPCIe and M.2 cards on myriad different computers and WiFi networks.

Why this sucks

9front WiFi is arbitrarily capped at 54mbps. This is in no way fast, but has proven sufficient for my own use case of running VNC over SSH (documented way back in Free Carrots #1). However, the above results for M.2 cards, which effectively means all mainstream laptops you can still get batteries for, are resoundingly insufficient to this and many other common tasks. 9P suffers with increased latency, souring the whole experience of using Plan 9.


Update 2023.07.07: I told an inadvertent lie above, claiming that no M.2 cards are as fast as mPCIe in 9front. In fact, the Intel 6235 is an M.2 NGFF card, and turns out to be pretty fast. Years ago I had recorded this fact after installing one in my ThinkPad T431s, and then we even bragged about it in the body of a 9front release announcement. At some point I forgot it existed. One day, after writing the original version of this post, I was perusing old sysinfo entries and re-noticed the designation. I acquired another example, installed it in my ThinkPad X1 Yoga 3rd Gen, and it observed that it performs similarly to the mPCIe cards examined above. That is to say, it exhibits much faster throughput than any opther M.2 card I’ve tried.

Update 2023.07.13: 9front recently added support for the Intel 3160 (unlike the 6235, a member of the newer, 7000 family). This is also an M.2 NGFF card. I don’t have one, so I haven’t been able to test it yet. My tentative hypothesis is that it will perform badly, just like its similarly modern siblings.

So far, I’ve failed to find any other Intel M.2 cards besides the 6235 that are older than the 7260. So I guess we can recommend precisely one rare card to our users for their modern machines.

Workaround for the workaround

If you have a machine with an M.2 slot, need faster speeds, and don’t have an Intel 6235, or, in lieu of actual code fixes that add support for higher transfer rates to the existing iwl and wpi drivers, it’s always possible to fall back to an Ethernet to WiFi bridge. One major benefit of this approach, even on machines with the right combination of “fast” cards, is vastly greater speeds in general. For example, the IOgear GWU637 supports 300mpbs on 2.4GHz and works fine with every WiFi network I’ve tested it on. Just velcro it or something similar onto your machine and try not to trip over the cables.

ThinkPad X1 Yoga 3rd Gen w/ IOgear GWU637 Ethernet to WiFi bridge:

   ; cat /n/rachael/usr/bin/* | tput
   406.34 KB/s
   406.86 KB/s
   433.90 KB/s
   392.23 KB/s
   411.39 KB/s
   426.37 KB/s
   412.73 KB/s
   405.03 KB/s
   415.13 KB/s
   419.22 KB/s
   418.93 KB/s
   418.68 KB/s
   420.32 KB/s
   415.44 KB/s
   420.81 KB/s
   426.01 KB/s
   427.78 KB/s
   431.57 KB/s
   435.38 KB/s
   438.81 KB/s
   440.77 KB/s
   441.46 KB/s
   441.40 KB/s
   442.68 KB/s
   443.21 KB/s
   444.32 KB/s
   446.82 KB/s
   448.58 KB/s
   449.94 KB/s
   451.21 KB/s
   452.39 KB/s
   453.76 KB/s
   454.07 KB/s

Lo-res cats