Re: Autoconnect backoff

2022-07-06 Thread Thomas Haller via networkmanager-list
On Wed, 2022-07-06 at 15:14 +0200, Sven Schwermer via networkmanager-
list wrote:
> Hi,
> 
> I have a device with cellular modem running a Linux-based OS with 
> ModemManager/NetworkManager used for the connectivity management. 
> Occasionally, the cellular connection breaks and it takes several 
> connection attempts until the connection can be established again. 
> Currently, we have autoconnect-retries=0 for our cellular connection
> so 
> there are infinite retries. This, however, can cause significant
> system 
> load if the ModemManager connect (dbus) calls fail immediately which 
> occasionally happens.
> 
> As far as I understand, NetworkManager will attempt a new
> autoconnection 
> attempt right away after the previous attempt failed. The only way of
> slowing this down is to set autoconnect-retries=1 which will cause 
> NetworkManager to wait for 5 minutes between attempts. This wait 
> duration seems to be fixed.
> 
> Is there a way to make NetworkManager perform a backoff (e.g. linear
> or 
> exponential) between connection attempts? Are there any other ways to
> guarantee that the cellular modem is "always connected" without
> having 
> NetworkManager to loop like crazy when a (re-)connection attempt
> fails?
> 
> Thanks and best regards,
> Sven


Hi


what you say is correct.

No, this is how it works.


After autoconnect-retries, autoconnect gets blocked for 5 minutes. That
is not configurable.

Patch or suggestion for improvements welcome, however, it's not clear
to me how to extend this so that it makes sense.


Thomas

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Autoconnect backoff

2022-07-06 Thread Greg Oliver via networkmanager-list
On Wed, Jul 6, 2022 at 10:03 AM Sven Schwermer via networkmanager-list <
networkmanager-list@gnome.org> wrote:

> Hi,
>
> I have a device with cellular modem running a Linux-based OS with
> ModemManager/NetworkManager used for the connectivity management.
> Occasionally, the cellular connection breaks and it takes several
> connection attempts until the connection can be established again.
> Currently, we have autoconnect-retries=0 for our cellular connection so
> there are infinite retries. This, however, can cause significant system
> load if the ModemManager connect (dbus) calls fail immediately which
> occasionally happens.
>
> As far as I understand, NetworkManager will attempt a new autoconnection
> attempt right away after the previous attempt failed. The only way of
> slowing this down is to set autoconnect-retries=1 which will cause
> NetworkManager to wait for 5 minutes between attempts. This wait
> duration seems to be fixed.
>
> Is there a way to make NetworkManager perform a backoff (e.g. linear or
> exponential) between connection attempts? Are there any other ways to
> guarantee that the cellular modem is "always connected" without having
> NetworkManager to loop like crazy when a (re-)connection attempt fails?
>
> Thanks and best regards,
> Sven
>

Sounds like a device that is going to be remotely controlled over LTE / GSM
/ CDMA..  If it is unreachable, what does it matter until it comes back
up?  You will not get to it anyhow :)
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list