I started up tinkering with my router a couple of months ago because I needed a dynamic DNS splitting and OpenWRT seemed the best way to go. I flashed OpenWRT and almost everything has been working great. I say almost, because WiFi quality has been pretty poor. I tried everything, including upgrading from 23.04 to 23.05, but nothing fixes this simple fact: from any device if I ping 192.168.0.1 (my router) via WiFi, the ping is somewhat all over the place, ranging from 2/3 ms to up to 200 ms.
I know that a 200ms latency for a single package wouldn't be that strange via WiFi, but it happens every 10 to 20 packets. This makes low-latency use cases, for instance online fast-paced gaming, basically impossible. Every once in a while I get up to 5 minutes of normal ping, but more often than not, I cannot go 10 seconds without a ping spike. I monitor the CPU load of the router during the tests and I see 98% of idle CPU time.
The router is an Asus RT-AX53U, which I understand comes with a MT7621 SoC, with a MT7915 for WiFi.
The problem doesn't manifest at all via LAN (I get consistent 0.5ms pings). Also the laptops, phones, etc. I use to test WiFi stand 2 meters away from the router, with a ~-40 dB gain, which should be good enough.
Output of a 2 minute ping (with 1 second frequency):
Any particular reason we are testing against a target through the WAN? The problem is definitely in the (Bridged) LAN. Wouldn't introducing a target over the internet add the ISP as a factor too?
(192.168.0.100 is another, idle, laptop. Should be more than capable of handling 1 ICMP per second).
Also, a little bit off-topic. Can an image prepared via the luci-attended-sysupgrade be flashed directly into the router? I would think it can, but I read some phrase in the Wiki, which I cannot find now, which seemed to advise against it. I ask because I will try reverting to stock (vendor) firmware to get baseline numbers to which I can compare AP performance. Said image would help me get the router back to OpenWRT before the family notices the downtime .
As clients I've used two different laptops (one 4 years old, another 7 years old, both get stable wireless connection using other APs) and a Pixel 7. All three of them with the same result.
Set bridge txqueuelen to zero, it has transmit queues in member interfaces, should do no harm.
Disable ethernet pause/pacing via ethtool -a / -A /-r (verify result wth ethtool ) - some network drivers can push back 4M of data from single pause signal.
Can you test if spikes also occur with all wireless devices down, except one?
(to find out if issue is related to Wifi channel scanning from certain device(s) - see https://blog.cerowrt.org/post/disabling_channel_scans/)
Thank you all very much for your help and ideas. I was away on a quite long Christmas holiday to visit family.
The last couple of days before traveling, and the few days since I've been back, ping from client to router has behaved acceptably (I get a spike of 14ms with a 5ms median for a client 6 meters away).
I guess there must had been some kind of interference from a neighbor at the time¹ or something as I didn't change anything regarding set up, clients, positioning, power outlets, nothing. I had just resorted to using cable when low latency was needed until I'd found more time to debug this.
¹: Although, in all the channels? Seems unlikely.
TLDR: Good thing, it solved on its own. Bad thing, I don't like not knowing what was wrong. This can be marked as solved.