Bad throughput with rtwn(4)

Per Hedeland per at hedeland.org
Sat Feb 9 20:46:32 UTC 2019


Hi,

I doubt that this is really an ARM-specific problem, but I only see it
on Raspberry Pi - it might be a matter of the kernel config used for
the RPi images though. If there is a more appropriate forum for this
issue, feel free to point me to it. I'm running FreeBSD 12.0-RELEASE
with a TP-LINK USB dongle that has a Realtek RTL8188EU chip - from
dmesg:

rtwn0 on uhub0
rtwn0: <Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 2> on usbus0
rtwn0: MAC/BB RTL8188EU, RF 6052 1T1R

On my amd64 laptop with GENERIC kernel, I get 17-20 MBit/s receive
speed and 11-12 Mbit/s transmit speed - perfectly acceptable.

With as identical conditions as possible, on RPi Zero with the "RPI-B"
kernel, I get some 9 Mbit/s receive speed - OK-ish - but only around
750 Kbit/s transmit speed - pretty painful.

On the RPi (but not on the laptop), dmesg reports:

ieee80211_load_module: load the wlan_amrr module by hand for now.

Loading this module at runtime when rtwn is already loaded has no
effect, but loading it via /boot/loader.conf ahead of rtwn has a
dramatic effect on transmit speed - it increases to the 11-12 Mbit/s I
see on the laptop. BUT - at the same time the *receive* speed drops to
2-2.5 Mbit/s. So it *is* a net win, but I'd prefer to get at least the
original receive speed...

AFAICS, wlan_amrr is included in the GENERIC kernel, since on the
laptop I get no suggestion to load it, nor is it listed by kldstat -
this explains the difference in "default" transmit speed. My thinking
a.k.a. speculation is that there is/are some other module(s) included in
GENERIC that I should load explicitly on the RPi to get an improvement
in receive speed - but I have not been able to figure out what it/they
might be. Any ideas?

Btw, this is not specific to 12.0, I have seen the same issue on 11.x,
just not investigated it properly.

Thanks

--Per Hedeland


More information about the freebsd-arm mailing list