wireguard-install icon indicating copy to clipboard operation
wireguard-install copied to clipboard

Massive loss in speed!

Open wyntrson opened this issue 1 year ago • 11 comments

Hello,

I have a gigabit connection, and this is my speed test results with the VPS provider: Screenshot 2023-08-13 033232

The server is fairly close (neighbor country) Distance: 250 mi (400 km) Ping: 27

My server connection speed: Screenshot 2023-08-13 033356

And my speed with Wireguard VPN on: Screenshot 2023-08-13 034200

Here's the problem, I know a bit of drop is OK and normal, and a lot of factors might be slowing down the connection. But 50% loss it is not normal, and 70% on upload speed is just a disappointment. I tested wireguard config from protonvpn free servers and I lose 10%. I tried another datacenter and provider, and the results were same even though it was a local datacenter 10 miles away. I also, checked the server load, and there's barely anything going on.

Another thing I noticed is that after installing the script the speed test shows only 15% loss of speed, but once I restart the VPS, everthing goes to 50/70% loss of speed.

wyntrson avatar Aug 13 '23 00:08 wyntrson

try to measure cpu load during benchmarks, you may be surprised. also make sure to use kernel module for wireguard

digim-s15 avatar Aug 15 '23 15:08 digim-s15

@digim-s15

Try to measure CPU load during benchmarks, you may be surprised.

It maxes at 45% using both of my devices at the same time.

also make sure to use kernel module for wireguard

I don't know even what that is! Doesn't this script do it automatically?

wyntrson avatar Aug 17 '23 13:08 wyntrson

what i OS you use and System arch, Debian/Ubuntu with arm64 arch loss many connection's and depend you VPS config more loss connection

Sirherobrine23 avatar Aug 17 '23 13:08 Sirherobrine23

@Sirherobrine23 Ubuntu 22.04 and Ubuntu 20.04 amd64 2 vCPU (NOT SHARED) 3.5 Ghz 1.5 GB RAM

Client: Single user 2 devices Fiber to the premises ethernet Cat.7 2023 PC parts (Windows OS).

No other factor can cause this, both client and server are in the most optimal conditions, I would not bother opening an issue otherwise.

wyntrson avatar Aug 17 '23 17:08 wyntrson

@wyntrson Wireguard windows client will have a loss of connection because it is not a direct connection by the kernel, in windows it is fully operated by the Windows userland, in this it will have a significant loss

Sirherobrine23 avatar Aug 17 '23 18:08 Sirherobrine23

@wyntrson Wireguard windows client will have a loss of connection because it is not a direct connection by the kernel, in windows it is fully operated by the Windows userland, in this it will have a significant loss

@Sirherobrine23 Other WireGuard connections deliver 95% of speed 5% loss on my windows machines.

wyntrson avatar Aug 17 '23 18:08 wyntrson

@wyntrson Have you tried using iperf to test a direct connection to your machines without going through wireguard?

Sirherobrine23 avatar Aug 17 '23 19:08 Sirherobrine23

Direct conenction:

image

With Wireguard connection:

image

Config: 4vCPUs (arm64), 24Gb Ram, Ubuntu 22.00.

htop:

HTOP

My conenction with wireguard and direct not loss connection download and upload, recommend check vps config.

Sirherobrine23 avatar Aug 17 '23 23:08 Sirherobrine23

@Sirherobrine23 I did the same with iperf3 and got the same results as you. Almost no loss. What VPS config do you have in mind? Why when you use a wireguard connection from NordVPN, SurfShark, ProtonVPN the speeds have no overhead, almost the same speed as the connection?

wyntrson avatar Aug 25 '23 11:08 wyntrson

@wyntrson something that happens a lot is the latency between connections, so you send the request to the server foo and foo will have to connect to the bar to get a return, in addition, Wireguard uses UDP to transfer data, which is a Of the various factors for connection and packet loss, other vpn protocols use TCP for their connections. i have considerable packet degradation

Sirherobrine23 avatar Aug 25 '23 11:08 Sirherobrine23

My config is Oracle Cloud 4VCPUs with 24Gb of Ram, 24 Clients

My house to Server locations is 230~300 Km (São Bernardo to São Paulo)

Sirherobrine23 avatar Aug 25 '23 11:08 Sirherobrine23