Author Topic: Push is causing massive battery drain  (Read 13849 times)

openyoureyes

  • Newbie
  • *
  • Posts: 11
Push is causing massive battery drain
« on: April 27, 2017, 09:46:25 am »
Hello,

i'm using Aqua with 2 accounts (Hotmail,Exchange) on a Huawei P9 with Android 7.0. Push is activated on all 2 accounts and working suprisingly well (Push on Hotmail wasn't working with any other Email app).

But the battery drain is really massive (around 20% most of the time without working in Aqua, just for the background syncing).

The main problem seems Push on the Hotmail account - turning this feature off helps a lot. With only Push on the Exchange the battery usage is much better, but not as good as stock Email app (with working Push on the Exchange) - but thats ok.

So the main question is: Is there a way for a working Push on Hotmail without that massive battery drain?

Edit: I have around 15.000 unread mails (mostly spam) on the Hotmail account. Message sync is 50, and save local message is 250. Launcher (is that important?) is Nova.

Best greetings,

openyoureyes
« Last Edit: April 27, 2017, 09:56:11 am by openyoureyes »

openyoureyes

  • Newbie
  • *
  • Posts: 11
Re: Push is causing massive battery drain
« Reply #1 on: April 27, 2017, 10:23:01 am »
How many messages are downloaded every day using Exchange push? 10, 100, 1000?
In which country are you using your network? Which network is it (powerful WiFi, feable WiFi, 3G, etc.) ?

Messages are around 10-20 on every accout a day. Country is Austria, Network is mostly 4G with some WiFi (3 Mbit). The messages are mostly small, so nothing special.

The Exchange Push was a test yesterday after buying Aqua (refund it after the battery problems). So actually i can only test Push with hotmail which is around 20% battery usage.

Maybe the high number of unread messages is the problem?

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Push is causing massive battery drain
« Reply #2 on: April 27, 2017, 03:33:38 pm »
But the battery drain is really massive (around 20% most of the time without working in Aqua, just for the background syncing).

A big question is how you are judging this battery drain: is it really big, and is it indeed due to Aquamail.
If you are looking at Settings -> Battery, and you see that Aquamail is using 20% while you were not using the screen, and nothing major was running, - that might be reasonable, if the overall battery usage is reasonable (i.e. if you don't drain your battery withing just a few hours.

Additionally, Android 5+ has a bug that incorrectly shows some apps as if they are consuming lots of charge. Read the FAQ item "Android 5+ and high battery use, 'mobile radio active'"

So, the bottom line is if the overall battery charge live is reasonable, you do not need to worry about seeing 20% from Aquamail. If it is shortened significantly due to Push, - then you may need to worry.
If I may suggest, - a good experiment to run would be to charge the battery to 100%, and then disconnect, and let the phone run, say, for 2 hours (with Aquamail + Push enabled). Turn it on at 2 hours and see what percentage of the charge is left. Charge it back up to 100%, disconnect, disable Push, and let Aquamail running for 2 hours, and then check what percentage of the charge is left.
Compare the two numbers.

openyoureyes

  • Newbie
  • *
  • Posts: 11
Re: Push is causing massive battery drain
« Reply #3 on: April 27, 2017, 04:37:54 pm »
If I may suggest, - a good experiment to run would be to charge the battery to 100%, and then disconnect, and let the phone run, say, for 2 hours (with Aquamail + Push enabled). Turn it on at 2 hours and see what percentage of the charge is left. Charge it back up to 100%, disconnect, disable Push, and let Aquamail running for 2 hours, and then check what percentage of the charge is left.
Compare the two numbers.

I already did a similar experiment:

Time: 2h 6 min

Aqua Mail --> Hotmail with 15 min sync
Aqua Mail --> Exchange with 15 min sync

Huawei Email --> Hotmail with 15 min sync
Huaweil Email --> Gmail with 15 min sync
Huawei Email --> Exchange with Push

Aqua Mail --> 4,70% / 25,49 mAh
Huawei Email (Stock) --> 3,56% / 19,41 mAh
Exchange (Stock) --> 3,36% / 18,53 mAh

It seems that you have to sum up Huawei Email and Exchange. So it is 2 accounts with 15 min sync against 2 accouts with 15 min sync and 1 with push: Aqua 4,70% / Stock Email 6,92%. Everything ok here imho.

Phone is charging now and next test is Aqua with Push on Hotmail.


StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Push is causing massive battery drain
« Reply #4 on: April 27, 2017, 05:17:19 pm »
By the way, some people have been reporting issues originating from Hotmail servers. In this recent thread, migrating from Hotmail to Outlook account made a big change:
https://www.aqua-mail.com/forum/index.php?topic=5651.msg34171#msg34171
I am not using either, so, I have no first-hand experience ...

openyoureyes

  • Newbie
  • *
  • Posts: 11
Re: Push is causing massive battery drain
« Reply #5 on: April 27, 2017, 05:21:53 pm »
Usage Time: 18 min

Aqua is at 24,33% / 28,26 mAh

So with Push on Hotmail Aqua is using in 18 min more battery than without Push in 2h! This is horrible!

The only change was turning Push on on the Hotmail account.

openyoureyes

  • Newbie
  • *
  • Posts: 11
Re: Push is causing massive battery drain
« Reply #6 on: April 27, 2017, 06:11:45 pm »
Usage Time: 1h 2 min

AquaMail --> 32,04% / 108,25 mAh
Huawei Mail --> 2,83% / 9,58 mAh
Exchange --> 0,43% / 1,46 mAh

AquaMail with 2 accounts (Hotmail Push, Exchange 15 min sync)
Huawei Mail with 3 accounts (Hotmail + Gmail 15 min sync, Exchange Push)

Less than 5 Mails on the Hotmail, less than 10 Mails on the Exchange, no mail on the Gmail during that 1 h.

AquaMail alone was using more battery than the Hardware.

Hotmail Push wasn't working on any other Email Android App i tried so far (Bluemail, Nine, Maildroid, MyMail, K9, ...). So in my opinion AquaMail is doing something different in handling Hotmail Push. The good thing is that it is working very well, the bad thing is that it is burning the battery like crazy.

But Hotmail Push isn't my biggest problem - 15 min  or 30 min sync is sufficient. I only hope Exchange Push (this is important) is not the same battery burner with AquaMail :-(
« Last Edit: April 27, 2017, 06:23:50 pm by openyoureyes »

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Push is causing massive battery drain
« Reply #7 on: April 27, 2017, 08:47:40 pm »
Usage Time: 1h 2 min
AquaMail --> 32,04% / 108,25 mAh
and
Quote from: openyoureyes
Usage Time: 18 min
Aqua is at 24,33% / 28,26 mAh

That 108 mAh over an hour is a very large number. In both cases above, the app is reported to use an average of about 95-105 mA of current.

But just in case, to exclude other factor (since there could be a question of false per-app-usage reporting  by Android), - how much overall charge (in %) was remaining in the battery (when you were starting from the full charge, 100%) after the 2 hours without Push, and after the 1 hour with Push? If you didn't have that recorded and will be repeating the test, - try to do both over the same period of time (you can use just 1 hour for both), and both from a full charge, to avoid any artifcats.

One more thought:
If I were you, I'd probably create a Google account in Aquamail, and compare the battery usage the same way with and without Push. This will eliminate the factor related to the idiosyncrasies of Hotmail servers. (For kicks, you can send a few messages to that Google account using, say, your computer, - just to create some activity in it.)



Exchange Push (this is important) is not the same battery burner with AquaMail :-(

I am not using one, but from what I see written by Kostya to other users, - if you are using Exchange Push, for a better operation, it is important to set the number of days to sync as opposed to number of messages. (And a certain number of messages, say 250, to cache.)  You'd need to let it do the first sync after that, - which can take some time, and then the rest will be much faster (and hence will consume much less battery).

openyoureyes

  • Newbie
  • *
  • Posts: 11
Re: Push is causing massive battery drain
« Reply #8 on: April 28, 2017, 10:55:38 am »
I am not using one, but from what I see written by Kostya to other users, - if you are using Exchange Push, for a better operation, it is important to set the number of days to sync as opposed to number of messages. (And a certain number of messages, say 250, to cache.)  You'd need to let it do the first sync after that, - which can take some time, and then the rest will be much faster (and hence will consume much less battery).

I upgraded to the Pro-Version yesterday evening:

- Exchange Push isn't working (after some time the option in the account settings says something like "your server is blocking Push" - manual and timed sync are working)
- the battery usage is as bad as before: with 2 accounts Push and one 15 min sync i'm getting around 30% battery usage

Maybe its a problem with Push and mobile connection (i know there is an option for Push only with wifi), but to be honest - there are so much different possibilities. Turning Push on Hotmail and Google off is ok for me, but Exchange Push is important ... so maybe anyone has an idea whats the problem with Exchange Push?

« Last Edit: April 28, 2017, 10:59:16 am by openyoureyes »

openyoureyes

  • Newbie
  • *
  • Posts: 11
Re: Push is causing massive battery drain
« Reply #9 on: April 28, 2017, 03:54:06 pm »
I made some more tests today:

Outlook --> Hotmail Push, Gmail Push, Exchange Push
Nine --> Hotmail Push, Exchange Push
Aqua --> Hotmail Push, Gmail Push, Exchange 15 min sync (Aqua says server is blocking push ...)

Push in the Outlook app is perfect. Hotmail, Gmail, Exchange everything is working with Push. Mails are coming nearly instantly. However the look and feel is bad (always have to click on the account, then inbox -> no fast account changing). There are  hardly any customization options. If you can stand the look and feel and want Push for Hotmail, Exchange and Gmail its the best.

Concerning Push Nine is pretty the same, but cannot work with Gmail. There are more options, but not nearly as much as in Aqua.

Aqua is by far the prettiest, but by far the one with the most (with Push around 30%, without push around 10-15 % --> Outlook is WITH push only around 5%!) battery usage. The mails are a bit slower (only a few seconds), but to be honest thats not the problem.

It seems that Aqua Push (EWS?) is much much more battery intense than Active Sync on Outlook or Nine.
« Last Edit: April 28, 2017, 03:56:22 pm by openyoureyes »

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Push is causing massive battery drain
« Reply #10 on: April 28, 2017, 04:20:41 pm »
I am sure Kostya will address your questions related to Exchange Push.

In the mean time, if you are trying to figure out the issue of battery usage by IMAP Push in Aquamail on your phone, - I'd recommend performing a definitive test:

Configuration:
0) In Aquamail: disable Push for your Hotmail account for the entire duration of the test. -
1) Charge your phone to 100%
With IMAP-Push disabled for now in Gmail:
Let it sit for an hour without turning on the screen and using other apps.
Look at how much the total battery charge has decreased over that time.
2) Charge your phone again to 100%
Now, enable IMAP-Push in Gmail.
Let it sit for an hour without turning on the screen and using other apps.
Look at how much the total battery charge has decreased over that time.

Compare those two numbers.

This way you will exclude the potentially problematic Hotmail servers from the analysis.
GMail servers seem to work well. By looking at the overall battery charge consumption you would exclude the potential bug in Android related to reporting of the per-app battery use.
Hopefully, over this time, the rest of your app will not have any out-of-ordinary activity, so that their battery consumption would be statistically similar in both runs. Perform both tests while using the same type of connectivity (either Wi-Fi or mobile) to minimize the difference.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Push is causing massive battery drain
« Reply #11 on: April 28, 2017, 08:48:45 pm »
Re: I have around 15.000 unread mails (mostly spam) on the Hotmail account.

Please go into web mail and mark all old unread messages as read.

This will make Aqua's mail sync algorithms more efficient and should improve battery use somewhat.

#2:

Hotmail is indeed right now experiencing massive slowness. Slow - higher battery use. Simple as that.

Downloading attachments also often fails (server side network errors), but before it does, it "hangs" for some 30 seconds. Battery drain again.

This is all their IMAP servers, I don't think other protocols are affected.

And therefore:

#3:

I'd also try removing the Hotmail account from Aqua Mail and adding it back as "Exchange" account type.

Should be better and we do support push for Exchange (in the Pro version which is what I think you have).
« Last Edit: April 28, 2017, 09:05:57 pm by Kostya Vasilyev, Aqua Mail »
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

openyoureyes

  • Newbie
  • *
  • Posts: 11
Re: Push is causing massive battery drain
« Reply #12 on: May 02, 2017, 08:58:49 am »
Hello,

i did all the things mentioned in the post before and the battery usage seems very ok now. The main solution seems to use Exchange instead of Hotmail for the Hotmail-Account. Additionally my phone (Huawei P9) updated from B378 to B383 firmware (changelog: "battery optimization"). Thanks a lot!

But i have some questions/problems left:

For explaination: I have 3 accounts (Hotmail Push / Gmail Push / Work-Account on Exchange should be Push, but isn't working so its 10 min sync).

1.) Exchange Push isn't working (its working with the Hotmail-Account but not with my Work-Account). There is something like "your server is blocking Push" in the settings. What settings on the server are wrong here? What should i tell our admin to change?

2.) I turned off ALL automatic sync (sync settings, time sync off). In the special account settings of the Work-Account i did automatic sync 10 min (reason see above). So my expecation was that the 2 accounts with no automatic sync (they are Push only) are only syncing if they are getting Emails. But thats not true. They are syncing much more often. Gmail seems to sync around every 30 min, Hotmail a bit less, but most of the time they sync without getting new mails. Is there somehing like a serverside automatic syncing from Push, even if there are no new mails?

Best greetings,

openyoureyes

« Last Edit: May 02, 2017, 09:00:43 am by openyoureyes »

openyoureyes

  • Newbie
  • *
  • Posts: 11
Re: Push is causing massive battery drain
« Reply #13 on: May 02, 2017, 11:16:37 am »
How do you see that your account is syncing much more often? Syncing means: go fetch all new messages in all folders (including Sent, Deleted, Draft, etc.), and remove messages that are no longer on the server (in most cases).
Are you sure that your "syncing" does that?

The latest sync time is under every account name in the account list.

In the screenshot the Hotmail syncing was ok (sync time 9:32 / last mail 9:30), but not the Gmail (sync time 9:10 / last mail 7:28). It happens on all 2 accounts, most syncing is without a new mail (i'm only gettring around 5-10 mails/day on Hotmail/Gmail).




openyoureyes

  • Newbie
  • *
  • Posts: 11
Re: Push is causing massive battery drain
« Reply #14 on: May 02, 2017, 11:48:29 am »
Thanks for the explaination, but which operation could that be on the Gmail-Account at 9:10? The Gmail and the Hotmail are Push only and  there was no new mail at 9:10 on the Gmail. Is there something like "checking mails" even on Push? I always thought Push is only server sided and the client is only listening/waiting without any active checking.

Under settings / network there is an option for "Push mail - keep alive". Maybe the shown time under the account name has something to do with that? (new packet for keep alive sended?)

Beside that: Battery usage is more than ok now (around 15 mAh / hour) - i'm really happy with that!
« Last Edit: May 02, 2017, 11:54:46 am by openyoureyes »