diff --git a/CHANGELOG.md b/CHANGELOG.md index 08e074e..3631368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ This project follows [semantic versioning](http://semver.org). +### UNRELEASED + +- [added] Script for performance measurements +- [changed] Using display format for addresses +- [changed] Updated dependencies +- [changed] New measurements + ### v0.4.3 (2016-02-02) - [changed] Updated libsodium to 1.0.8 diff --git a/perf.sh b/perf.sh new file mode 100755 index 0000000..4c3e1ac --- /dev/null +++ b/perf.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +DST=$1 + +echo +echo "----------" +echo "Throughput" +echo "----------" +for i in 0 1 2; do + iperf -c $DST -t 30 +done + +for size in 100 500 1000; do + echo + echo "--------------------" + echo "Latency ($size Bytes)" + echo "--------------------" + for i in 0 1 2 3 4; do + ping $DST -c 30000 -i 0.001 -s $size -U -q + done +done diff --git a/performance.md b/performance.md index b50a3b5..5f945b3 100644 --- a/performance.md +++ b/performance.md @@ -15,7 +15,7 @@ Receiver node: * Realtek RTL8111/8168/8411 Gigabit Network * Ubuntu 14.04 (Kernel 3.13.0-63-generic) -VpnCloud version: `VpnCloud v0.3.1, protocol version 1, libsodium 1.0.7 (AES256: true)` +VpnCloud version: `VpnCloud v0.4.3, protocol version 1, libsodium 1.0.8 (AES256: true)` The sender runs the following command: @@ -35,13 +35,14 @@ $> top For encrypted tests, `--shared-key test --crypto METHOD` is appended. +For increased MTU tests `mtu 7000` is used in `--ifup`. ### Throughput The throughput is measured with the following command: ``` -$> iperf -c DST -t 60 +$> iperf -c DST -t 30 ``` The test is run in 3 steps: @@ -50,19 +51,21 @@ The test is run in 3 steps: * Encrypted throughput via VpnCloud (`DST` is `10.2.1.2`) -| Throughput test | Bandwidth | CPU usage (one core) | -| ----------------------------- | ------------- | -------------------- | -| Without VpnCloud | 920 Mbits/sec | - | -| Unencrypted VpnCloud | 883 Mbits/sec | 80% / 75% | -| Encrypted VpnCloud (ChaCha20) | 814 Mbits/sec | 90% / 90% | -| Encrypted VpnCloud (AES256) | 821 Mbits/sec | 85% / 85% | - +| Throughput test | Bandwidth | CPU usage (one core) | +| --------------------------------------- | ------------- | -------------------- | +| Without VpnCloud | 920 Mbits/sec | - | +| Unencrypted VpnCloud | 882 Mbits/sec | 80% / 95% | +| Encrypted VpnCloud (ChaCha20) | 787 Mbits/sec | 90% / 90% | +| Encrypted VpnCloud (AES256) | 838 Mbits/sec | 85% / 85% | +| Unencrypted VpnCloud (MTU 7000) | 923 Mbits/sec | 75% / 75% | +| Encrypted VpnCloud (ChaCha20, MTU 7000) | 919 Mbits/sec | 75% / 75% | +| Encrypted VpnCloud (AES256, MTU 7000) | 926 Mbits/sec | 75% / 75% | ### Latency The latency is measured with the following command: ``` -$> ping DST -c 100000 -i 0.001 -s SIZE -U -q +$> ping DST -c 30000 -i 0.001 -s SIZE -U -q ``` For all the test, the best average RTT out of 3 runs is selected. The latency is @@ -71,15 +74,16 @@ assumed to be half of the RTT. | Payload size | 100 bytes | 500 bytes | 1000 bytes | | ----------------------------- | --------------- | --------------- | --------------- | -| Without VpnCloud | 156 µs | 164 µs | 171 µs | -| Unencrypted VpnCloud | 205 µs (+50 µs) | 220 µs (+61 µs) | 236 µs (+65 µs) | -| Encrypted VpnCloud (ChaCha20) | 222 µs (+17 µs) | 242 µs (+22 µs) | 258 µs (+22 µs) | -| Encrypted VpnCloud (AES256) | 216 µs (+15 µs) | 232 µs (+12 µs) | 250 µs (+14 µs) | +| Without VpnCloud | 159 µs | 166 µs | 174 µs | +| Unencrypted VpnCloud | 221 µs (+62 µs) | 231 µs (+65 µs) | 242 µs (+68 µs) | +| Encrypted VpnCloud (ChaCha20) | 235 µs (+14 µs) | 248 µs (+17 µs) | 262 µs (+20 µs) | +| Encrypted VpnCloud (AES256) | 227 µs ( +6 µs) | 238 µs ( +7 µs) | 255 µs (+13 µs) | ### Conclusion * VpnCloud achieves over 850 MBit/s with default MTU settings. * In encrypted mode, VpnCloud reaches over 800 MBit/s with default MTU settings. +* With increased MTU, VpnCloud reaches over 900 Mbit/s, encrypted and unencrypted. * VpnCloud adds about 70µs to the latency. * Encryption adds an additional latency up to 20µs.