An idea to reduce battery usage on mobile

As I understand it, keeping network connections on changing networks is power consuming.

For those who don’t need instant sync and prefer to keep low battery usage by using scheduled full scans (daily for example), may I suggest :

  • if filesystem watcher is disabled and only scheduled full scans are enabled :
    • don’t try to keep network connections (disable network?)
  • when a full scan is due :
    • enable network and start to sync then go to sleep again

Does it make sense?

Doesn’t make much sense to me, sorry. You could pause all devices before going to sleep, than resume after waking. Can be automated using our REST API. Would that work for you?

Combined with a semi-modern version of Android, Syncthing’s Settings → Run Conditions panel should cover most (if not all) that you’re asking for above:

Android also consolidates network requests from multiple apps to reduce the overhead of waking up the network hardware (i.e., Android doesn’t instantly provide a network connection whenever an app asks. Different apps are given different priorities.)

See also:

Here’s my thought.

Android operating system has a “Do Not Disturb” feature in settings. It keeps the phone notifications quiet while you’re trying to sleep.

Personally, I have mine set for 12AM-8AM.

Presuming there’s no need for a syncthing to be synchronizing anything while you’re sleeping for those eight hours it would be nice to put syncthing to sleep or pause all synchronization functions while the phone is in do not disturb mode.

If syncthing had in its settings, an option to respect the do not disturb feature of Android, syncthing would automatically save battery power during those eight hours by remaining quiet.

As soon as do not disturb time is turned off or expires let the software resume its normal synchronization.

It would be tedious to have to pause all folders and all synchronization manually every night and then remember to turn them all back on again in the morning. I normally just exit the software program at night for this reason. Also, when I’m not at home because there’s nothing to sync with. If I’m not attached to my home Wi-fi I don’t the software consuming any battery.

What do they maintainers and developers think?

Would it not make sense to add to the settings menu the option to observe the Android do not disturb operating system feature?

While do not disturb is enabled do nothing otherwise run normally.

Thoughts?

1 Like

I guess relying on android power management is enough then.

If there was interest to reduce power usage furthermore, an idea could be to implement a kind a scheduler in syncthing, something like : wake-up once every xx hours. This would unpause all folders & activate network and start syncing.

This, or maybe it’s completely overkill :slight_smile:

In all cases, syncthing is a really really cool tool, thank you for all the work!

I’ll hang on here if that’s OK, because my question is quite similar.

I’ve been using syncthing for only one day and the interesting question for me is whether power is consumed at all as long as no change is made to the folders set?

In my case, I have a folder of notes on my smartphone (Android 12) that I want to sync with my Linux desktop PC. However, I only use my PC about once a week.

So for me it would make sense if syncthing really only syncs and consumes significant power when I use my PC in parallel.

There is still power consumed because, e.g. by default folders are rescanned every hour and connections between devices need to be maintained. You can mitigate the former by setting a higher rescan interval and relying mainly on file watching to detect changes instead. I personally like to use a rescan interval of 1 day.

Where exactly do you set that?

It’s in the Advanced tab when you edit folders in the Web GUI. On Android, you can access the Web GUI from the left slide-out menu.

1 Like

I’d suggest running Syncthing on your phone only on the day that you need to sync with Linux. I sync this way too. For me, I don’t have anything to sync more than once per day, so I launch the app, let it sync, and then exit the app for another day.

No reason to leave any software running on your cell seven days a week if you only use it one day per week.

My thoughts is that this would be a misfeature. The “Do Not Disturb” feature is for turning off disturbances i.e. for making the phone neither beep nor vibrate or activate its screen as a resuslt of stuff happening. It’s useful for things like sleeping, working, or periods of time where you for whatever reason don’t want to be disturbed.

But it’s not intended as a “no need to synchronize” clue, and having things magically apparently stop working for no rational reason increases confusion for no good reason. I predict if we had this feature, we’d get support-questions from users confused by why, when they set up syncthing on their phone prior to going to sleep, the phone STILL hadn’t synced the next morning. Is it really that sloooooow??? etc.

OK, I see your point. The software itself could have a setting for the hours for which it’s going to synchronize and which hours it’s not going to synchronize just like a backup software program would do. What the software could do inside settings is tell it when not to sync.

There is already a perfect place to put this setting.

Enable run conditions

Create a new time table setting that tells Syncthing what hours to use.

Very simple and straight forward solution that won’t create any questions at all for support.

You can already choose between running or not running on Wifi, running on mobile data or not running on mobile data, why not put a time schedule in there also?

1 Like

I agree such a feature would work, and wouldn’t cause trouble for anyone. If someone wants this feature enough to implement it, I guess incorporating that patch would be a good thing to do.