Re: Disabling periodic scans



On Fri, 2022-07-01 at 02:12 +0300, Slava Monich wrote:

What I had in mind was a scenario when the device running network 
manager has more than one Wi-Fi interface, and those are not
connected 
(but have to be ready to be connected at any time). Passive scans 
produce lots of D-Bus traffic, which creates serious load (I mean it,
really serious load) on the device. And yet, periodic scans on all
those 
interfaces produce more or less the same list of networks, needlessly
wasting precious system resources.

Hi,


you mean, active scans, right? NM doesn't do passive scans (though it
should).


It's not clear that both devices will see the same scan result. E.g.
one radio might be worse, or maybe one of them is 2.4GHz only... it
seems non-trivial to select a device to use for scanning.

Also, if there is a good algorithm for solving this problem reliably,
then maybe this should be done by NetworkManager, because another
serivce find it hard to understand all the subtleties for selecting a
device for scanning.

Also, I guess after one device finds an SSID, it would connect and
you'd re-enable scanning on the other device? Imainge you have a
profile for $SSID that is tied to "connection.interface-name=wlan0".
When then scanning is only enabled on wlan1, then even if wlan1 finds
$SSID, then you would need logic that recognizes that now scanning on
wlan0 needs to be turned on. But of course, there is no guarantee that
wlan0 will find $SSID, so you need logic to disable it again. Seems all
non-trivial.



Maybe, if the scanning is too resource intensive, then maybe we should
-- after X minutes of scanning without success -- ratelimit the
scanning and only scan 1 every 5 minutes.

Or maybe, we could switch to passive scans for 4  out of 5 minutes...



Btw, you can also just set the device as unmanaged. After all, if you
are not going to scan, nothing interesting will happen on that device.
For unmanaged devices we don't scan. There is a D-Bus API (and it does
not survive reboot).



Thomas



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]