Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


wireguard vpn slow download speed fast upload speed
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

wireguard vpn slow download speed fast upload speed

xonkeyxonkey Member
edited May 2020 in Help

installed wireguard on a server hosted on DO 2 weeks ago and so far for the past 2 weeks its has been working fine getting a decent speed but recently the download is so slow 300kbps while the upload speed is still good at 50mbps+.wireguard was installed using this https://github.com/Nyr/wireguard-install on a ubuntu 18.04 version server.Installed again on a Virmach vps but have the same results.Ran a speed test on the DO server using speedtest-cli,download speed is 1168 mbps while upload is 4.17mbps.My internet speed without VPN is 300mbps.Does anyone knows how to fix this issue?

Comments

  • Have you set your MTU?

  • xonkeyxonkey Member

    @king8654 said:
    Have you set your MTU?

    did ifconfig and current mtu for wg0 is 1420 and for eth0 its 1500.

  • king8654king8654 Member
    edited May 2020

    "The default MTU of WireGuard is 1420, compared with other devices where the usual size is 1492 or 1500.

    This will cause any device that thinks that it is sending a full packet to the WireGuard, to actually send more than one WireGuard packet because the packet will be broken into two, the second one almost empty.

    As the dominant factor in TCP/IP is the number of packets, because each requires synchronization and acknowledgement, this will slow down all communication.

    The solution is to set the WireGuard to an MTU size that is the same as the rest of the network."

    From one of first Google results, try changing wg0 mtu to 1500 and restarting service

  • xonkeyxonkey Member

    @king8654 said:
    "The default MTU of WireGuard is 1420, compared with other devices where the usual size is 1492 or 1500.

    This will cause any device that thinks that it is sending a full packet to the WireGuard, to actually send more than one WireGuard packet because the packet will be broken into two, the second one almost empty.

    As the dominant factor in TCP/IP is the number of packets, because each requires synchronization and acknowledgement, this will slow down all communication.

    The solution is to set the WireGuard to an MTU size that is the same as the rest of the network."

    From one of first Google results, try changing wg0 mtu to 1500 and restarting service

    thanks for this info but i tried changing mtu before and it does not work managed to solve this by changing the dns server

  • jackbjackb Member, Host Rep
    edited May 2020

    @king8654 said:
    From one of first Google results, try changing wg0 mtu to 1500 and restarting service

    This will mean you're sending packets over the size of the MTU on eth0. Not guaranteed to fail, but not a good idea in my opinion.

    I have my personal wireguard server set to the default MTU and have no problem maxing my connection at home.

  • xonkeyxonkey Member

    anybody else have any more idea on how to fix this?speed starting to go to kbps again after awhile

  • debaserdebaser Member

    The speedtest-cli app is broken, try iperf(3) instead.

  • check iperf3 speedtest with udp first

  • xonkeyxonkey Member
    edited May 2020

    results i got from setting my vps as server and own machine as client
    local machine
    [ ID] Interval Transfer Bandwidth
    [ 4] 0.00-1.00 sec 256 KBytes 2.09 Mbits/sec
    [ 4] 1.00-2.00 sec 1.00 MBytes 8.39 Mbits/sec
    [ 4] 2.00-3.00 sec 1.12 MBytes 9.43 Mbits/sec
    [ 4] 3.00-4.00 sec 1.25 MBytes 10.5 Mbits/sec
    [ 4] 4.00-5.00 sec 1.00 MBytes 8.39 Mbits/sec
    [ 4] 5.00-6.00 sec 1.25 MBytes 10.5 Mbits/sec
    [ 4] 6.00-7.00 sec 1.12 MBytes 9.44 Mbits/sec
    [ 4] 7.00-8.00 sec 1.25 MBytes 10.5 Mbits/sec
    [ 4] 8.00-9.00 sec 1.12 MBytes 9.42 Mbits/sec
    [ 4] 9.00-10.00 sec 1.00 MBytes 8.40 Mbits/sec


    [ ID] Interval Transfer Bandwidth
    [ 4] 0.00-10.00 sec 10.4 MBytes 8.70 Mbits/sec sender
    [ 4] 0.00-10.00 sec 10.4 MBytes 8.70 Mbits/sec receiver

    Linux vps
    [ 5] 0.00-1.00 sec 99.8 KBytes 817 Kbits/sec
    [ 5] 1.00-2.00 sec 1.28 MBytes 10.7 Mbits/sec
    [ 5] 2.00-3.00 sec 1.25 MBytes 10.5 Mbits/sec
    [ 5] 3.00-4.00 sec 1.25 MBytes 10.5 Mbits/sec
    [ 5] 4.00-5.00 sec 1.25 MBytes 10.5 Mbits/sec
    [ 5] 5.00-6.00 sec 1.25 MBytes 10.5 Mbits/sec
    [ 5] 6.00-7.00 sec 1.12 MBytes 9.44 Mbits/sec
    [ 5] 7.00-8.00 sec 1.12 MBytes 9.44 Mbits/sec
    [ 5] 8.00-9.00 sec 1.25 MBytes 10.5 Mbits/sec
    [ 5] 9.00-10.00 sec 1.12 MBytes 9.44 Mbits/sec
    [ 5] 10.00-10.20 sec 128 KBytes 5.32 Mbits/sec


    [ ID] Interval Transfer Bandwidth
    [ 5] 0.00-10.20 sec 0.00 Bytes 0.00 bits/sec sender
    [ 5] 0.00-10.20 sec 11.1 MBytes 9.15 Mbits/sec receiver

    I do not know how to get only the speed for just the vps alone...
    lmk if i did anything wrongly

  • debaserdebaser Member
    edited May 2020

    It looks like you just have a 10 Mbps connection at home... But with just 10MB it doesn’t give you a decent idea of the speeds.

    You can also try directly from your VPS from/to a remote server.

    Try iperf3 -c bouygues.iperf.fr -P 10 -4

  • xonkeyxonkey Member

    @debaser said:
    It looks like you just have a 10 Mbps connection at home... But with just 10MB it doesn’t give you a decent idea of the speeds.

    You can also try directly from your VPS from/to a remote server.

    Try iperf3 -c bouygues.iperf.fr -P 10 -4

    theres many lines but this is one of the many i got from running the command line u gave on my linux vps
    [ 4] 9.00-10.00 sec 22.6 MBytes 189 Mbits/sec 0 3.78 MBytes
    [ 6] 9.00-10.00 sec 21.9 MBytes 183 Mbits/sec 0 3.53 MBytes
    [ 8] 9.00-10.00 sec 16.8 MBytes 140 Mbits/sec 0 2.45 MBytes
    [ 10] 9.00-10.00 sec 25.3 MBytes 212 Mbits/sec 0 4.68 MBytes
    [ 12] 9.00-10.00 sec 10.5 MBytes 88.0 Mbits/sec 0 1.57 MBytes
    [ 14] 9.00-10.00 sec 8.76 MBytes 73.4 Mbits/sec 0 1.26 MBytes
    [ 16] 9.00-10.00 sec 21.4 MBytes 179 Mbits/sec 0 7.97 MBytes
    [ 18] 9.00-10.00 sec 22.9 MBytes 192 Mbits/sec 0 9.03 MBytes
    [ 20] 9.00-10.00 sec 11.1 MBytes 93.2 Mbits/sec 0 1.59 MBytes
    [ 22] 9.00-10.00 sec 21.9 MBytes 184 Mbits/sec 0 3.55 MBytes
    [SUM] 9.00-10.00 sec 183 MBytes 1.53 Gbits/sec 0
    its kinda impossible for my home to have a 10 Mbps connection, this is the results i got from speedtest.net DOWNLOAD Mbps 244.14 UPLOAD Mbps 424.64

  • debaserdebaser Member

    So on your VM you get 1,5 GBPs throughput. The problem isn’t on your VM.

    Now try the same run but with your home ip as the server. And afterwards put -R at the end to see the opposite results.

  • xonkeyxonkey Member
    edited May 2020

    @debaser said:
    So on your VM you get 1,5 GBPs throughput. The problem isn’t on your VM.

    Now try the same run but with your home ip as the server. And afterwards put -R at the end to see the opposite results.

    I tried to set my own ip as the server and on my vps iperf3 -c myip but nothing seems to be happening,this error came out on my vps machine afterr awhile iperf3: error - unable to connect to server: Connection timed out
    idk whats going on vpn server worked fine for 2 weeks until recently :neutral:

  • xonkeyxonkey Member
    edited May 2020

    accidentally typed this meant to edit above post...

  • debaserdebaser Member

    Do you run iperf3 on your home workstation? Based on an earlier message I thought you did.

    Anyway, the VPS seems fine.

    You can also connect your workstation with the VPN and try a site like nperf.com

  • xonkeyxonkey Member

    @debaser said:
    Do you run iperf3 on your home workstation? Based on an earlier message I thought you did.

    Anyway, the VPS seems fine.

    You can also connect your workstation with the VPN and try a site like nperf.com

    i tried to set my home computer as server and vps as client but my vps is unable to iperf3 -c my home computer it says unable to connect to server

  • naturalnatural Member

    try nordvpn . their wireguard (nordlynx) is quite fast .

  • drakuladrakula Member

    @king8654 said:
    "The default MTU of WireGuard is 1420, compared with other devices where the usual size is 1492 or 1500.

    This will cause any device that thinks that it is sending a full packet to the WireGuard, to actually send more than one WireGuard packet because the packet will be broken into two, the second one almost empty.

    As the dominant factor in TCP/IP is the number of packets, because each requires synchronization and acknowledgement, this will slow down all communication.

    The solution is to set the WireGuard to an MTU size that is the same as the rest of the network."

    From one of first Google results, try changing wg0 mtu to 1500 and restarting service

    is this only for the server or both server and client?

  • debaserdebaser Member

    @xonkey said:

    @debaser said:
    Do you run iperf3 on your home workstation? Based on an earlier message I thought you did.

    Anyway, the VPS seems fine.

    You can also connect your workstation with the VPN and try a site like nperf.com

    i tried to set my home computer as server and vps as client but my vps is unable to iperf3 -c my home computer it says unable to connect to server

    You could also try to use your workstation as a client, but it won’t measure your upload that way.

  • RedSoxRedSox Member

    Country? Some providers shape the traffic. WG has no obfuscation, so...

  • xonkeyxonkey Member

    @RedSox said:
    Country? Some providers shape the traffic. WG has no obfuscation, so...

    vps is usa

  • @debaser said:

    @xonkey said:

    @debaser said:
    Do you run iperf3 on your home workstation? Based on an earlier message I thought you did.

    Anyway, the VPS seems fine.

    You can also connect your workstation with the VPN and try a site like nperf.com

    i tried to set my home computer as server and vps as client but my vps is unable to iperf3 -c my home computer it says unable to connect to server

    You could also try to use your workstation as a client, but it won’t measure your upload that way.

    "-R --get-server-output"

    His issue is likely port forwarding in his home router or firewall on his PC. It's really, quite doable to test that way.

  • xonkeyxonkey Member

    @TimboJones said:

    @debaser said:

    @xonkey said:

    @debaser said:
    Do you run iperf3 on your home workstation? Based on an earlier message I thought you did.

    Anyway, the VPS seems fine.

    You can also connect your workstation with the VPN and try a site like nperf.com

    i tried to set my home computer as server and vps as client but my vps is unable to iperf3 -c my home computer it says unable to connect to server

    You could also try to use your workstation as a client, but it won’t measure your upload that way.

    "-R --get-server-output"

    His issue is likely port forwarding in his home router or firewall on his PC. It's really, quite doable to test that way.

    Its probably my router issue but how do i determine the issue and fix it?weird thing is vpn has been working fine for 2 weeks but now its fine sometimes and sometimes its so bad running at 100-300 kbps speeds

  • TimboJonesTimboJones Member
    edited June 2020

    @xonkey said:

    @TimboJones said:

    @debaser said:

    @xonkey said:

    @debaser said:
    Do you run iperf3 on your home workstation? Based on an earlier message I thought you did.

    Anyway, the VPS seems fine.

    You can also connect your workstation with the VPN and try a site like nperf.com

    i tried to set my home computer as server and vps as client but my vps is unable to iperf3 -c my home computer it says unable to connect to server

    You could also try to use your workstation as a client, but it won’t measure your upload that way.

    "-R --get-server-output"

    His issue is likely port forwarding in his home router or firewall on his PC. It's really, quite doable to test that way.

    Its probably my router issue but how do i determine the issue and fix it?weird thing is vpn has been working fine for 2 weeks but now its fine sometimes and sometimes its so bad running at 100-300 kbps speeds

    Well, when you run iperf3 in server mode at home, it'll tell you the port it's listening on. You need your PC's firewall to allow that port. You also need to configure your router to forward that port to our PC.

    When you have the problem, you need to be testing your VPS and home connection against a "known good connection". IOW, it's getting more complicated as that's just a start...

  • xonkeyxonkey Member

    based on my understanding of the results
    Upload speed from iperf server(vps) to iperf client(own com) is
    [ 5] 0.00-10.19 sec 9.08 MBytes 7.48 Mbits/sec 40 sender

  • xonkeyxonkey Member

    @TimboJones said:

    @xonkey said:

    @TimboJones said:

    @debaser said:

    @xonkey said:

    @debaser said:
    Do you run iperf3 on your home workstation? Based on an earlier message I thought you did.

    Anyway, the VPS seems fine.

    You can also connect your workstation with the VPN and try a site like nperf.com

    i tried to set my home computer as server and vps as client but my vps is unable to iperf3 -c my home computer it says unable to connect to server

    You could also try to use your workstation as a client, but it won’t measure your upload that way.

    "-R --get-server-output"

    His issue is likely port forwarding in his home router or firewall on his PC. It's really, quite doable to test that way.

    Its probably my router issue but how do i determine the issue and fix it?weird thing is vpn has been working fine for 2 weeks but now its fine sometimes and sometimes its so bad running at 100-300 kbps speeds

    Well, when you run iperf3 in server mode at home, it'll tell you the port it's listening on. You need your PC's firewall to allow that port. You also need to configure your router to forward that port to our PC.

    When you have the problem, you need to be testing your VPS and home connection against a "known good connection". IOW, it's getting more complicated as that's just a start...

    alright thanks for the tips will try this later when i am free.

  • xonkeyxonkey Member

    @natural said:
    try nordvpn . their wireguard (nordlynx) is quite fast .

    I need a static and private vpn so setting 1 up myself seems to be the cheapest way

  • @xonkey said:
    based on my understanding of the results
    Upload speed from iperf server(vps) to iperf client(own com) is
    [ 5] 0.00-10.19 sec 9.08 MBytes 7.48 Mbits/sec 40 sender

    This is just one thread though, what doe the lines with [SUM] in front of them say?

    And what happens if you test with bouygues.iperf.fr at home? Both directly and with the VPN turned on.

  • xonkeyxonkey Member

    @debaser said:

    @xonkey said:
    based on my understanding of the results
    Upload speed from iperf server(vps) to iperf client(own com) is
    [ 5] 0.00-10.19 sec 9.08 MBytes 7.48 Mbits/sec 40 sender

    This is just one thread though, what doe the lines with [SUM] in front of them say?

    And what happens if you test with bouygues.iperf.fr at home? Both directly and with the VPN turned on.

    its doing well now laggy in the morning now its fine gotta wait for the network to be bad again before i can do test

Sign In or Register to comment.