TunSafe Forum

Welcome to the TunSafe Community Forum. This is open for discussions related to TunSafe and the WireGuard protocol.

You are not logged in.

#1 2019-05-24 13:44:23

mikefallen
Member
Registered: 2019-05-24
Posts: 1

Very Slow Performance In one direction

So my setup is:

Home: TunSafe windows client - 1Gbit FTTH

Remote: Azure Ubuntu 18.04 w/ kernel modules installed about 3ms RTT between home and azure DC

iperf3 over the internet =  700Mbit home------->remote      250Mbit remote-------->home

iperf3 over openVPN =  ~100Mbit  home-------->remote    100Mbit remote---------->home

iperf3 over wireguard = 550Mbit home------->remote         50-60Mbit remote------->home


As you can see I am getting really bad performance from remote to my home over wireguard any ideas why?

[img=iperf3]https://imgur.com/a/U62WWOg[/img]

Offline

#2 2019-06-01 12:39:03

wiggo
Administrator
Registered: 2018-03-09
Posts: 98

Re: Very Slow Performance In one direction

This is probably because Azure's network hardware misinterpret the UDP packets as a DDoS attack and throw away packets. Your last test had 864 lost packets.

The standard tcp flow-control algorithm is very sensitive to packet loss, and it always overreact and lower the dramatically even if there are very few lost packets.

Run following to check which speed you have when using UDP instead of TCP.
iiperf3 -u -b 900M -c x.x.x.x -i 1

I await your response

Regards
Viktor

Offline

#3 2019-06-04 18:53:56

mikefallen1
Member
Registered: 2019-06-04
Posts: 1

Re: Very Slow Performance In one direction

wiggo wrote:

This is probably because Azure's network hardware misinterpret the UDP packets as a DDoS attack and throw away packets. Your last test had 864 lost packets.

The standard tcp flow-control algorithm is very sensitive to packet loss, and it always overreact and lower the dramatically even if there are very few lost packets.

Run following to check which speed you have when using UDP instead of TCP.
iiperf3 -u -b 900M -c x.x.x.x -i 1

I await your response

Regards
Viktor

https://imgur.com/a/FWBTdDR


is that to be expected?

Offline

#4 2019-06-10 23:54:38

wiggo
Administrator
Registered: 2018-03-09
Posts: 98

Re: Very Slow Performance In one direction

Normally, it is very rare that packets are reordered, so your logs show an abnormal behavior. The TCP flow control algorithm reduce the speed when it detect reordered packets.

Is it the official WireGuard kernel version you run on the server, and is it the latest? Is it only when using your
Azure VPS this happens, or can you replicate the behavior on another VPS?

The error is that WireGuard or a router in between doesn't send packets in the same order they are received. This will happen when processing packets on multiple threads without taking in account that a thread may process a packet faster than another thread. Try and run TunSafe on your Azire VPS instead of the WireGuard kernel module and see if the problem persist.

Regards
Viktor

Offline

Board footer

Powered by FluxBB