Battery Drain with VPN
I'm currently running Jolla 1 with SFOS 2.1.2.3 and OpenVPN connection. Works fine! However, I notice significant battery drain when the VPN is enabled. Usually, it does not help disabling the VPN connection on temporary base, the OS is only idling properly, when I do a restart of the phone, without auto reconnect of the VPN. I could not really enumerate any extra cpu cycles with a particular process, but Battery Log Tool indicates additional power consumption when the VPN connection is enabled, around 340 mA. Without the VPN, in the same conditions, the phone is idling at approx. 150mA. Needless to say, I don't have any background applications running that are frequently polling - generating network traffic.
Anybody experience the same?
Not as much as I expected - battery lasts more than 24h still. Please note that an instanciated vpn connection has a steady keepalive data flow (about every 10s). This may block deep sleeeping of the device and the radio will drain the battery a bit more.
cy8aer ( 2017-10-27 21:57:46 +0300 )editThanks. It would be great if Jolla could work on improving idling behavior, particularity when turning off the VPN connection. Also, I can think of an option that the tunnel gets disconnected when the automatic device lock kicks in, when unlocking the phone, the VPN connection would be reconnected. In my case I could easily live with that, as the VPN connects quickly.
tomorrow ( 2017-10-28 09:35:58 +0300 )editThis idling thing is a problem of the tunnel definition and there are some older discussions about it (http://talk.maemo.org/showthread.php?t=65454, also for android...).
You can increase the keepalive in the openvpn configurations (on both - server and client). But this will have infliuences on the tunnel stability. If you are moving and the keepalive is too long the tunnel will not reinitialize on inter radio cell roaming.
Another thing: What communication protocol is your tunnel doing? udp or tcp? Tcp will increase the communication. This is because tcp in tcp tunneled you have twice the packages for Syn/Ack communication if packages are lost (syn/ack communication of the tunnel and syn/ack communication of the payload stream). The more packages are sent the more energy is needed.
Today's devices are way better in saving energy on radio communication (like with the n900) but such effects will increase the consumption...
cy8aer ( 2017-10-28 13:36:25 +0300 )editOn my OpenVPN server 2.4.2, I'll leave it with the settings for now. I have default UDP as protocol.
tomorrow ( 2017-10-29 16:19:42 +0300 )edit