[WireGuard] News about MIPS and ARM optimized code?

René van Dorst opensource at vdorst.com
Wed Sep 14 09:16:54 CEST 2016


An update of my current findings.

Most improvements I have seen at the moment is writing and optimize  
poly1305_generic_blocks function.
This gives a improvement of more than 1%.
I also noticed that the ping time does not change.

Improvement at the moment is around UDP: ~1.47% TCP: ~1.68% on large  
transfers like iperf.

Wireguard mix of Asm and C variant:  
https://github.com/vDorst/wireguard/commit/6f9187c325ee883b1f2b9f9da3deb0a61655b504

root at lede:~# iperf3 -c 10.0.0.1 -i 10 -u -b 1G -t 60
Connecting to host 10.0.0.1, port 5201
[  4] local 10.0.0.2 port 47996 connected to 10.0.0.1 port 5201
[ ID] Interval           Transfer     Bandwidth       Total Datagrams
[  4]   0.00-10.00  sec  57.5 MBytes  48.2 Mbits/sec  7354
[  4]  10.00-20.00  sec  57.4 MBytes  48.2 Mbits/sec  7350
[  4]  20.00-30.00  sec  57.4 MBytes  48.2 Mbits/sec  7353
[  4]  30.00-40.00  sec  57.5 MBytes  48.2 Mbits/sec  7356
[  4]  40.00-50.00  sec  57.5 MBytes  48.2 Mbits/sec  7357
[  4]  50.00-60.00  sec  57.5 MBytes  48.2 Mbits/sec  7358
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Jitter     
Lost/Total Datag                                        rams
[  4]   0.00-60.00  sec   345 MBytes  48.2 Mbits/sec  0.037 ms  0/44128 (0%)
[  4] Sent 44128 datagrams

root at lede:~# iperf3 -c 10.0.0.1 -i 10-b 1G -t 60
Connecting to host 10.0.0.1, port 5201
[  4] local 10.0.0.2 port 37950 connected to 10.0.0.1 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-10.14  sec  52.5 MBytes  43.4 Mbits/sec    0    147 KBytes
[  4]  10.14-20.02  sec  51.2 MBytes  43.5 Mbits/sec    0    147 KBytes
[  4]  20.02-30.14  sec  52.5 MBytes  43.5 Mbits/sec    0    147 KBytes
[  4]  30.14-40.01  sec  51.2 MBytes  43.5 Mbits/sec    0    147 KBytes
[  4]  40.01-50.16  sec  52.5 MBytes  43.4 Mbits/sec    0    220 KBytes
[  4]  50.16-60.01  sec  42.5 MBytes  36.2 Mbits/sec    0    220 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-60.01  sec   302 MBytes  42.3 Mbits/sec    0             sender
[  4]   0.00-60.01  sec   302 MBytes  42.3 Mbits/sec                  receiver


Wireguard C variant:  
https://github.com/vDorst/wireguard/commit/13fae657624aac6b9c1f411aa6472a91aae7fcc3

root at lede:~# iperf3 -c 10.0.0.1 -i 10 -u -b 1G -t 60
Connecting to host 10.0.0.1, port 5201
[  4] local 10.0.0.2 port 40439 connected to 10.0.0.1 port 5201
[ ID] Interval           Transfer     Bandwidth       Total Datagrams
[  4]   0.00-10.00  sec  56.6 MBytes  47.5 Mbits/sec  7246
[  4]  10.00-20.00  sec  56.6 MBytes  47.5 Mbits/sec  7243
[  4]  20.00-30.00  sec  56.6 MBytes  47.5 Mbits/sec  7244
[  4]  30.00-40.00  sec  56.6 MBytes  47.5 Mbits/sec  7245
[  4]  40.00-50.00  sec  56.6 MBytes  47.5 Mbits/sec  7245
[  4]  50.00-60.00  sec  56.6 MBytes  47.5 Mbits/sec  7247
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Jitter     
Lost/Total Datagrams
[  4]   0.00-60.00  sec   340 MBytes  47.5 Mbits/sec  0.039 ms  0/43470 (0%)
[  4] Sent 43470 datagrams

root at lede:~# iperf3 -c 10.0.0.1 -i 10 -b 1G -t 60
Connecting to host 10.0.0.1, port 5201
[  4] local 10.0.0.2 port 37956 connected to 10.0.0.1 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-10.02  sec  49.6 MBytes  41.5 Mbits/sec    0    137 KBytes
[  4]  10.02-20.00  sec  49.6 MBytes  41.7 Mbits/sec    0    209 KBytes
[  4]  20.00-30.02  sec  49.6 MBytes  41.6 Mbits/sec    0    209 KBytes
[  4]  30.02-40.01  sec  49.2 MBytes  41.3 Mbits/sec    0    209 KBytes
[  4]  40.01-50.02  sec  49.6 MBytes  41.6 Mbits/sec    0    209 KBytes
[  4]  50.02-60.02  sec  49.6 MBytes  41.6 Mbits/sec    0    209 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-60.02  sec   297 MBytes  41.6 Mbits/sec    0             sender
[  4]   0.00-60.02  sec   297 MBytes  41.6 Mbits/sec                  receiver


Greats,

René van Dorst.



More information about the WireGuard mailing list