How to troubleshoot wifi degrading latency?

Hi everyone,
I would like to know if there is an established procedure to troubleshoot wifi performance degradation on openwrt.
I have a wrt1900ac(v1 -mamba) that is running openwrt 22.03-SNAPSHOT.
The wifi connection is really good for most of the day, but usually late at night the latency degrades horribly. I first thought it could be an internet issue, but that might not the case.
After rebooting the router, I can ping it from my laptop and the response time is around 2ms. After many hours of use, there is a point in which I notice horrible internet connection and my ping to the router increases to about 2000ms.
Just to give context, I have been having the same problem with older versions of openwrt and usually programing a reboot late at night had the effect of having a pretty good connection during the day. That is not the case anymore, since the degradation seems to happen faster.
I have openwrt configured with all the required quirks for mlwifi and when everything works, the connection is very good for many hours, so I don't think the configuration could be the issue.
I also noticed that restarting the network service on the router seems to solve the problem right away. I go from 2000ms pings to the router to 2ms after that.
Based on all the above, I am wondering if this is related to a memory leak of some sort, but I don't know how to try to isolate the problem.
Any suggestions?
Thank you!

1 Like

Can you confirm that this behaviour is wifi-only - and that wired systems still have the expected performance?

If so, the mwlwifi driver has been abandoned by its manufacturer (and never made it into mainline, as they didn't bother to follow through with it), so chances of improvements for things than have never been working properly (other than 'recent' breakage, that could be bisected to a faulty commit) aren't good</euphemism>.

Thank you for your answer.
I will wait for the performance degradation to show up again measure the latency and speeds with a cable connection. I will post the updates as soon as I get the information.
Is there a way to just reload the wifi driver instead of restarting all the networking service? Maybe that can help find if the problem is the driver...

wifi down/ wifi up might suffice.

Sorry for the late reply, I was traveling. I can confirm the degradation of performance only affects wifi clients. Is there any way to troubleshoot this? Thanks!

@slh suggestion will work if you have a wired connection.
That would mean you log into an app like putty to your router's IP; via a wired connection and run the command.


wifi down


Kinda like rebooting just the radio.
Then run the next command to bring it back up


wifi up


There are post that have scripts that monitor the wifi and restart based on response time.. beyond my tech ability.. But for insight look here. Would need to be tailored/modified to use on your specific system. Members here are savvy and can explain if they see this Thread.

Thank you!
I am leaning towards creating a script that will restart the wifi when the pings are above certain response time as a not-so-elegant workaround... but I still would like to know how to troubleshoot the issue. It doesn't seems related to a memory leak because the router reports plenty of free memory, so I'm still puzzled...