Add Wireguard performance section

Quentin McGaw (desktop)
2021-09-14 09:21:07 -04:00
parent 3a42f68224
commit b9f692013e
+40
@@ -3,3 +3,43 @@
Wireguard is implemented using imported packages from [git.zx2c4.com/wireguard-go](https://git.zx2c4.com/wireguard-go).
It should be using the Kernel wireguard module if it is present and fallback to a Go user space Wireguard implementation otherwise, to maximize compatibility and performance.
## Performance
Wireguard is often known as *so much faster* than OpenVPN. Let's find out!
- Gluetun `v3.24.0` is used
- The Mullvad VPN service provider is used
- Gluetun is connected to the closest VPN server. This is to better measure the performance of the protocol, instead of the various bandwidth bottlenecks on a further away server.
- The following command is used to measure bandwidth performance:
```sh
docker run -it --rm --network=container:gluetun alpine:3.14 /bin/sh -c "apk add speedtest-cli && speedtest-cli"
```
- Two machines were tested:
1. Docker Desktop on WSL2 on a Windows host
- 24 threads cpu (amd 5900x)
- Running on Docker desktop with wsl2 on a windows host
2. Linux host
- 12 threads cpu (amd 2600x)
- Running on an Arch Linux host with recent kernel
Here comes the disappointment bomb...
| Machine | Protocol | Download | Upload | Download diff vs other protocol |
| --- | --- | --- | --- | --- |
| Windows host | OpenVPN | `299.24` | `463.69` | +0.23% |
| Windows host | Wireguard | `298.55` | `493.49` | -0.23% |
| Linux host | OpenVPN | `645.91` | `481.25` | -4% |
| Linux host | Wireguard | `673.37` | `561.28` | +4.2% |
Conclusions:
- Docker desktop on Windows sucks network performance wise 😆
- Wireguard is only up to 4.2% faster than OpenVPN.
Further investigations:
- [ ] Does Wireguard have a bigger impact on low power devices such as Raspberry Pis?
- [ ] Does Wireguard have a bigger impact on many cores and low single thread performance CPUs?