All of lore.kernel.org
 help / color / mirror / Atom feed
* 5GHz inbound connection latency spikes on Raspberry Pi
@ 2020-06-29 17:29 Nicolas Saenz Julienne
  0 siblings, 0 replies; only message in thread
From: Nicolas Saenz Julienne @ 2020-06-29 17:29 UTC (permalink / raw)
  To: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin, Wright Feng
  Cc: linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
	linux-rpi-kernel

[-- Attachment #1: Type: text/plain, Size: 2257 bytes --]

Hi all,
I'm seeing latency spikes on inbound 5GHz connections with brcmfmac on RPi4.
For example, this is me pinging an idle RPi4 running today's linux-next build
from my work computer (although I can reproduce this with older kernels and/or
RPi3):

	nico@linux-9qgx:~> ping 192.168.1.18
	PING 192.168.1.18 (192.168.1.18) 56(84) bytes of data.
	64 bytes from 192.168.1.18: icmp_seq=1 ttl=64 time=306 ms
	64 bytes from 192.168.1.18: icmp_seq=2 ttl=64 time=1351 ms
	64 bytes from 192.168.1.18: icmp_seq=3 ttl=64 time=326 ms
	64 bytes from 192.168.1.18: icmp_seq=4 ttl=64 time=175 ms
	64 bytes from 192.168.1.18: icmp_seq=5 ttl=64 time=1431 ms
	64 bytes from 192.168.1.18: icmp_seq=6 ttl=64 time=425 ms
	64 bytes from 192.168.1.18: icmp_seq=7 ttl=64 time=1457 ms
	64 bytes from 192.168.1.18: icmp_seq=8 ttl=64 time=441 ms
	64 bytes from 192.168.1.18: icmp_seq=9 ttl=64 time=360 ms
	64 bytes from 192.168.1.18: icmp_seq=10 ttl=64 time=1395 ms
	64 bytes from 192.168.1.18: icmp_seq=11 ttl=64 time=388 ms
	64 bytes from 192.168.1.18: icmp_seq=12 ttl=64 time=1431 ms
	64 bytes from 192.168.1.18: icmp_seq=13 ttl=64 time=416 ms
	64 bytes from 192.168.1.18: icmp_seq=14 ttl=64 time=1272 ms
	64 bytes from 192.168.1.18: icmp_seq=15 ttl=64 time=257 ms
	64 bytes from 192.168.1.18: icmp_seq=16 ttl=64 time=1291 ms
	64 bytes from 192.168.1.18: icmp_seq=17 ttl=64 time=277 ms

It turns out that if I disable the low power mode on the wireless network
interface: 'iwconfig wlan0 power off', everything behaves as expected, with
latencies between averaging 10ms. I've also found this patch[1] from RPi's
downstream kernel tree which tweaks the LPM entry delay and makes things a
little better. With it, SSHing into the machine is bearable.

I can understand that tweak not being OK for all brcmfmac users so I figured I
could apply it conditionally on RPi's compatible strings. That said, before
doing anything I wonder if you have a better solution in mind.

Also note that latencies on 2GHz connections are also visible, but in the order
of 150-200ms, which is more acceptable.

Regards,
Nicolas

[1] 
https://github.com/raspberrypi/linux/commit/3e0d7cb39d3229a00f06de5b3e60bd7acf0ece3f#diff-1b8fac2d29272755e8f53049866fc1e5


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-29 21:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 17:29 5GHz inbound connection latency spikes on Raspberry Pi Nicolas Saenz Julienne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.