wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* iOS WG Battery Life
@ 2019-02-28 12:07 kolargol
  2019-03-01 10:08 ` Kalin KOZHUHAROV
  2019-03-06 10:32 ` kolargol
  0 siblings, 2 replies; 10+ messages in thread
From: kolargol @ 2019-02-28 12:07 UTC (permalink / raw)
  To: wireguard


[-- Attachment #1.1: Type: text/plain, Size: 555 bytes --]

Hi

Thanks for great work with Wireguard, it's fresh breeze of air compared on years spend on OpenVPN...

I am testing WG on varius OSes and devices and I have noted severe battery drain on iOS (12.2, iPhone 8). Typically battery drops 40% during night-time (that is 7 hours of inactivity on the phone) when WireGuard is engaged.
Is this some kind of known issue? I did not had chance to test previous iOS version without SIMD ChaCha20 support so i cannot tell if it is becouse of the last update.

Anything i can do to track issue here?

thanks,
kolargol

[-- Attachment #1.2: Type: text/html, Size: 711 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: iOS WG Battery Life
  2019-02-28 12:07 iOS WG Battery Life kolargol
@ 2019-03-01 10:08 ` Kalin KOZHUHAROV
  2019-03-02  0:30   ` Mark Finzel
  2019-03-02  7:29   ` kolargol
  2019-03-06 10:32 ` kolargol
  1 sibling, 2 replies; 10+ messages in thread
From: Kalin KOZHUHAROV @ 2019-03-01 10:08 UTC (permalink / raw)
  To: kolargol; +Cc: wireguard

On Fri, Mar 1, 2019 at 11:03 AM kolargol <kolargol@protonmail.com> wrote:
> I am testing WG on varius OSes and devices and I have noted severe battery drain on iOS (12.2, iPhone 8). Typically battery drops 40% during night-time (that is 7 hours of inactivity on the phone) when WireGuard is engaged.
>
Compared to how much during night without activated WireGuard?

> Is this some kind of known issue? I did not had chance to test previous iOS version without SIMD ChaCha20 support so i cannot tell if it is becouse of the last update.
>
> Anything i can do to track issue here?
>
Is there anything using the interface, or just wg keep-alive?
May be try to change the keep-alive to a longer period.
Also (and I have 0 experience with iOS), a keep-alive packet my wake
up the phone, and let it stay awake for some longer-than-needed
interval (e.g. 5 minutes).
Try to have a look at what actually eats the battery: CPU, radio, screen?

Cheers,
Kalin.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: iOS WG Battery Life
  2019-03-01 10:08 ` Kalin KOZHUHAROV
@ 2019-03-02  0:30   ` Mark Finzel
  2019-03-02  7:29   ` kolargol
  1 sibling, 0 replies; 10+ messages in thread
From: Mark Finzel @ 2019-03-02  0:30 UTC (permalink / raw)
  To: Kalin KOZHUHAROV, kolargol; +Cc: wireguard


[-- Attachment #1.1: Type: text/plain, Size: 1393 bytes --]

FWIW, I haven’t noticed a difference in battery life on iOS. I’m using an iPhone XS, iOS 12.1.4, VPN is always on. So maybe something in your setup?

Sent from ProtonMail Mobile

On Fri, Mar 1, 2019 at 3:08 AM, Kalin KOZHUHAROV <me.kalin@gmail.com> wrote:

> On Fri, Mar 1, 2019 at 11:03 AM kolargol <kolargol@protonmail.com> wrote:
>> I am testing WG on varius OSes and devices and I have noted severe battery drain on iOS (12.2, iPhone 8). Typically battery drops 40% during night-time (that is 7 hours of inactivity on the phone) when WireGuard is engaged.
>>
> Compared to how much during night without activated WireGuard?
>
>> Is this some kind of known issue? I did not had chance to test previous iOS version without SIMD ChaCha20 support so i cannot tell if it is becouse of the last update.
>>
>> Anything i can do to track issue here?
>>
> Is there anything using the interface, or just wg keep-alive?
> May be try to change the keep-alive to a longer period.
> Also (and I have 0 experience with iOS), a keep-alive packet my wake
> up the phone, and let it stay awake for some longer-than-needed
> interval (e.g. 5 minutes).
> Try to have a look at what actually eats the battery: CPU, radio, screen?
>
> Cheers,
> Kalin.
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard

[-- Attachment #1.2: Type: text/html, Size: 1701 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: iOS WG Battery Life
  2019-03-01 10:08 ` Kalin KOZHUHAROV
  2019-03-02  0:30   ` Mark Finzel
@ 2019-03-02  7:29   ` kolargol
       [not found]     ` <EA2CDA40-8988-4C4F-B848-B2F7C6D8716C@lonnie.abelbeck.com>
  1 sibling, 1 reply; 10+ messages in thread
From: kolargol @ 2019-03-02  7:29 UTC (permalink / raw)
  To: wireguard

I am comparing battery to OpenVPN (typical drop do not pass 10% in same conditions), or without VPN at all - max 7%

During nighttime there is no activity, also i have disabled keep-alives (PersistentKeepalive) - tried with and without - no big difference.


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, March 1, 2019 11:08 AM, Kalin KOZHUHAROV <me.kalin@gmail.com> wrote:

> On Fri, Mar 1, 2019 at 11:03 AM kolargol kolargol@protonmail.com wrote:
>
> > I am testing WG on varius OSes and devices and I have noted severe battery drain on iOS (12.2, iPhone 8). Typically battery drops 40% during night-time (that is 7 hours of inactivity on the phone) when WireGuard is engaged.
>
> Compared to how much during night without activated WireGuard?
>
> > Is this some kind of known issue? I did not had chance to test previous iOS version without SIMD ChaCha20 support so i cannot tell if it is becouse of the last update.
> > Anything i can do to track issue here?
>
> Is there anything using the interface, or just wg keep-alive?
> May be try to change the keep-alive to a longer period.
> Also (and I have 0 experience with iOS), a keep-alive packet my wake
> up the phone, and let it stay awake for some longer-than-needed
> interval (e.g. 5 minutes).
> Try to have a look at what actually eats the battery: CPU, radio, screen?
>
> Cheers,
> Kalin.


_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: iOS WG Battery Life
       [not found]     ` <EA2CDA40-8988-4C4F-B848-B2F7C6D8716C@lonnie.abelbeck.com>
@ 2019-03-02 19:54       ` kolargol
  2019-03-02 20:09         ` John
                           ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: kolargol @ 2019-03-02 19:54 UTC (permalink / raw)
  To: wireguard


> Possibly, is PersistentKeepalive defined at the "server" endpoint for your iOS peer ?
>
> I would expect a measurable additional battery usage if either peer endpoint had PersistentKeepalive defined (non-zero).

Both server and peer have PersistentKeepalive disabled, there is no fancy apps runnign in backgroud - and i am using exac same WiFi and VPN endpoint (for OpenVPN and WG comparision).
WiFI connection is stable and have strong signal, same with LTE.
The battery grap shows sharp down in the night as something continuesly draing battery (here wg)
How can i debug it ?

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: iOS WG Battery Life
  2019-03-02 19:54       ` kolargol
@ 2019-03-02 20:09         ` John
  2019-03-02 20:50         ` Mailing Lists
  2019-03-02 21:22         ` Lonnie Abelbeck
  2 siblings, 0 replies; 10+ messages in thread
From: John @ 2019-03-02 20:09 UTC (permalink / raw)
  To: kolargol; +Cc: wireguard

Does the iOS settings>battery show a consistent output for WG using
the CPU cycles?

On Sat, Mar 2, 2019 at 2:55 PM kolargol <kolargol@protonmail.com> wrote:
>
>
> > Possibly, is PersistentKeepalive defined at the "server" endpoint for your iOS peer ?
> >
> > I would expect a measurable additional battery usage if either peer endpoint had PersistentKeepalive defined (non-zero).
>
> Both server and peer have PersistentKeepalive disabled, there is no fancy apps runnign in backgroud - and i am using exac same WiFi and VPN endpoint (for OpenVPN and WG comparision).
> WiFI connection is stable and have strong signal, same with LTE.
> The battery grap shows sharp down in the night as something continuesly draing battery (here wg)
> How can i debug it ?
>
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: iOS WG Battery Life
  2019-03-02 19:54       ` kolargol
  2019-03-02 20:09         ` John
@ 2019-03-02 20:50         ` Mailing Lists
  2019-03-03 15:30           ` kolargol
  2019-03-02 21:22         ` Lonnie Abelbeck
  2 siblings, 1 reply; 10+ messages in thread
From: Mailing Lists @ 2019-03-02 20:50 UTC (permalink / raw)
  To: kolargol; +Cc: wireguard

what about uninstalling all vpns and try over night?

via Smartphone

> Am 02.03.2019 um 20:54 schrieb kolargol <kolargol@protonmail.com>:
> 
> 
>> Possibly, is PersistentKeepalive defined at the "server" endpoint for your iOS peer ?
>> 
>> I would expect a measurable additional battery usage if either peer endpoint had PersistentKeepalive defined (non-zero).
> 
> Both server and peer have PersistentKeepalive disabled, there is no fancy apps runnign in backgroud - and i am using exac same WiFi and VPN endpoint (for OpenVPN and WG comparision).
> WiFI connection is stable and have strong signal, same with LTE.
> The battery grap shows sharp down in the night as something continuesly draing battery (here wg)
> How can i debug it ?
> 
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: iOS WG Battery Life
  2019-03-02 19:54       ` kolargol
  2019-03-02 20:09         ` John
  2019-03-02 20:50         ` Mailing Lists
@ 2019-03-02 21:22         ` Lonnie Abelbeck
  2 siblings, 0 replies; 10+ messages in thread
From: Lonnie Abelbeck @ 2019-03-02 21:22 UTC (permalink / raw)
  To: kolargol; +Cc: wireguard

Kalin,

As a single data point test, I borrowed my wife's iPod Touch
--
iPod Touch (6th gen., A8 processor)
iOS WireGuard v1.0.3
iOS 12.1.4
--
* Charged to 100%
* Enable WiFi only (Bluetooth disabled, no LTE) and WireGuard enabled
* No PersistentKeepalive enabled at either WG endpoint
* Swiped-close all running apps
* Let sit idle
* After 6 hours, battery reads 99% charged

Monitoring WG traffic at the "server" end, over 6 hours the delta traffic is:
--
0.26 MiB received,  0.30 MiB sent
--
It appears iOS generates packets about every 20 minutes or so.

Lonnie


> On Mar 2, 2019, at 1:54 PM, kolargol <kolargol@protonmail.com> wrote:
> 
> 
>> Possibly, is PersistentKeepalive defined at the "server" endpoint for your iOS peer ?
>> 
>> I would expect a measurable additional battery usage if either peer endpoint had PersistentKeepalive defined (non-zero).
> 
> Both server and peer have PersistentKeepalive disabled, there is no fancy apps runnign in backgroud - and i am using exac same WiFi and VPN endpoint (for OpenVPN and WG comparision).
> WiFI connection is stable and have strong signal, same with LTE.
> The battery grap shows sharp down in the night as something continuesly draing battery (here wg)
> How can i debug it ?

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: iOS WG Battery Life
  2019-03-02 20:50         ` Mailing Lists
@ 2019-03-03 15:30           ` kolargol
  0 siblings, 0 replies; 10+ messages in thread
From: kolargol @ 2019-03-03 15:30 UTC (permalink / raw)
  To: wireguard

> what about uninstalling all vpns and try over night?

i will test that as well.

Meanwhile wile plumbing over iOS I have found possible reason of thos. Seems like Wireguard suffers from thread management problems:

Event:           wakeups
Action taken:    none
Wakeups:         45001 wakeups over the last 61 seconds (743 wakeups per second average), exceeding limit of 150 wakeups per second over 300 seconds
Wakeups limit:   45000
Limit duration:  300s
Wakeups caused:  45001
Duration:        30.33s
Steps:           2

quite a lot? bad for battery - there are multiple crashes due to this limit on my iOS. I can send full crash log to developers (just ping me).

Other then that i installde debug profiles for VPN and Networking on iOS, will try to dig tomorrow after another night test.

thanks,
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: iOS WG Battery Life
  2019-02-28 12:07 iOS WG Battery Life kolargol
  2019-03-01 10:08 ` Kalin KOZHUHAROV
@ 2019-03-06 10:32 ` kolargol
  1 sibling, 0 replies; 10+ messages in thread
From: kolargol @ 2019-03-06 10:32 UTC (permalink / raw)
  To: wireguard


[-- Attachment #1.1: Type: text/plain, Size: 1389 bytes --]

After few days of testing and digging i found nothing wrong with WireGuard... it turned out that for some reason after using WireGuard, WiFi Calling and/or VoLTE started to go crazy and eat up battery.
After disabling both features and with WG in Damand mode (always on) and 8h battery dropped shocking 2% ...

now, you/I can dismiss that report or try to find why Wi-Fi Calling and VoLTE going crazy with wireguard enabled. It might be bug in iOS, bug in T-Mobile implementation, bug in CFNetwork, or vpn extension, who knows. If you have ideas about that let me know.

thanks all for listening.
__
kolargol

Sent with [ProtonMail](https://protonmail.com) Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, February 28, 2019 1:07 PM, kolargol <kolargol@protonmail.com> wrote:

> Hi
>
> Thanks for great work with Wireguard, it's fresh breeze of air compared on years spend on OpenVPN...
>
> I am testing WG on varius OSes and devices and I have noted severe battery drain on iOS (12.2, iPhone 8). Typically battery drops 40% during night-time (that is 7 hours of inactivity on the phone) when WireGuard is engaged.
> Is this some kind of known issue? I did not had chance to test previous iOS version without SIMD ChaCha20 support so i cannot tell if it is becouse of the last update.
>
> Anything i can do to track issue here?
>
> thanks,
> kolargol

[-- Attachment #1.2: Type: text/html, Size: 1975 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-03-08 15:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-28 12:07 iOS WG Battery Life kolargol
2019-03-01 10:08 ` Kalin KOZHUHAROV
2019-03-02  0:30   ` Mark Finzel
2019-03-02  7:29   ` kolargol
     [not found]     ` <EA2CDA40-8988-4C4F-B848-B2F7C6D8716C@lonnie.abelbeck.com>
2019-03-02 19:54       ` kolargol
2019-03-02 20:09         ` John
2019-03-02 20:50         ` Mailing Lists
2019-03-03 15:30           ` kolargol
2019-03-02 21:22         ` Lonnie Abelbeck
2019-03-06 10:32 ` kolargol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).