I'm doing some throughput testing between an RPi "rpi-src" on WiFi and a wired ethernet PC "dest" attached to the WiFi AP. "dest" listens on a TCP port with nc (netcat), streams received data through pipebench, and dumps it to /dev/null. "rpi-src" runs yes to generate data, and nc to transmit it over the network to "dest". Here are the commands I'm using on the respective systems,

   dest$ nc -l -p 6789 | pipebench -b 1024 > /dev/null

rpi-src$ yes ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 | nc dest.local 6789

The problem is that the throughput alternates between running at a reasonable speed (for a wireless G device) of over 2MB/sec, then slows down to a trickle of only 7KB/sec. I estimate 90% of the time it runs at the trickle speed, only occasionally jumping up to full speed.

00h00m07.03s:   74.00 kB    7.00 kB/second (Thu May 26 10:30:13 2016)
00h00m14.47s:  149.00 kB    8.00 kB/second (Thu May 26 10:30:21 2016)
00h00m18.86s:  193.00 kB    9.00 kB/second (Thu May 26 10:30:25 2016)
00h00m25.44s:    4.75 MB    2.06 MB/second (Thu May 26 10:30:32 2016)
00h00m27.80s:    9.81 MB    2.16 MB/second (Thu May 26 10:30:34 2016)

If I repeat the experiment using UDP instead of TCP, I get a very consistent throughput with no slowdowns,

dest$ nc -u -l -p 6789 | pipebench -b 1024 > /dev/null 

rpi-src$ yes ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 | nc -u nucf696.local 6789

00h00m08.69s:   14.18 MB    1.94 MB/second (Thu May 26 10:36:15 2016)
00h00m10.56s:   18.04 MB    2.06 MB/second (Thu May 26 10:36:17 2016)
00h00m11.80s:   20.64 MB    2.02 MB/second (Thu May 26 10:36:18 2016)
00h00m12.72s:   22.38 MB    2.07 MB/second (Thu May 26 10:36:19 2016)
00h00m18.87s:   35.05 MB    2.04 MB/second (Thu May 26 10:36:25 2016)
00h00m19.67s:   36.74 MB    2.08 MB/second (Thu May 26 10:36:26 2016)
00h00m58.63s:  117.60 MB    1.89 MB/second (Thu May 26 10:37:05 2016)

"rpi-src" is: Raspberry Pi model 2, Raspbian "Jessie", kernel 4.4.9-v7+, IOGear GWU523 USB WiFi adapter, zd1211rw driver, firmware-zd1211 version

"dest" is: Intel NUC running Ubuntu 15.04, attached to 10/100/1000 ethernet port on same WiFi router.

I've repeated the experiment changing certain variables, with these results:

  • Different WiFi router. No change (slow TCP throughput).
  • "dest" on WiFi instead of wired. No change.
  • Different branded zd1211rw device, Pandigital PANWL2203V. No change.
  • Entirely different WiFi device, Edimax EW-7811UAC. Fixes the problem, throughput is high and stable.
  • zd1211rw device in Ubuntu 14.04 x86-64 laptop. Works fine, steady ~2.0MB/sec throughput.

So the easy solution is to just swap out the zd1211rw devices. But I have half a dozen of them, and before I toss them and spend $50 or $100 on a new batch, I wanted to see if anyone had some insight as to the source of the throughput problem here.

  • Note, I am posting the same question on the Raspberry Pi troubleshooting forum – jamieguinan May 26 '16 at 15:06
  • Since it's a vanilla kernel driver, it's probably not a "raspberry pi" issue at all -- although it could be some interaction between the two. Anyway, it looks like something that hasn't received a lot of love in some years. Or it could be the device itself...you'd have to investigate that yourself using another (non-linux) system or search online. – goldilocks May 26 '16 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.