3 ms·
I think it's the encryption overhead that burns the CPU cycles in turn affecting battery life. Other than that, it could be a bug (not releasing wakelocks, or w
by ignoramous 7y ago
I think it's the encryption overhead that burns the CPU cycles in turn affecting battery life. Other than that, it could be a bug (not releasing wakelocks, or waking up too frequently, or generally doing too many battery intensive tasks) in the VPN client that drains battery.
I think, on Android at least, IPSec is impl in kernel space so technically a VPN based on that should be more efficient. Wireguard is being upstreamed into Linux, so there's a chance Android picks it up and the efficiency improves.
- wahern 7y agoIPSec tends to use AES, which can be 2x to 4x more performant than ChaCha20 thanks to hardware acceleration. And the power savings may be even greater than the throughput differences.
- microcolonel 7y agoShould be added that this is highly dependent on the specific hardware. AES is cripplingly slow where accelerators are misconfigured or otherwise unavailable. If you have a brain larger than your leg, you should consider configuring an IPSec endpoint to save power on your phone.
- jeroenhd 7y agoWhen I used OpenVPN, the VPN had to keep sending keepalives and periodic key renegotiations to keep the session open. This is fine on a PC, but it keeps waking up the radio hardware on a mobile device which is a real battery drain. It's the same as running an app on the background that constantly polls for data, something Android spent a lot of time on fighting to gain better battery time. I wouldn't hold my breath for official WireGuard support in the manufacturer Android kernels until some big corporations start relying on it but custom ROMs are able to use kernel modules already[1]. Encryption itself should not be much overhead. WireGuard cryptography is based on ChaCha20. While I haven't encountered any hardware support for ChaCha, it's performance is quite good, so good even that Google is requiring manufacturers of very low power Android devices (running Android 10+ Go) to implement ChaCha-based encryption on budget devices [2]. [1]: https://git.zx2c4.com/android_kernel_wireguard/about/ https://git.zx2c4.com/android_kernel_wireguard/about/ [2]: https://security.googleblog.com/2019/02/introducing-adiantum-encryption-for.html https://security.googleblog.com/2019/02/introducing-adiantum...