Hello I hope one of you can help point me in the right direction.

I have a VPS with a static IP and a wireguard tunnel from VPS to home network (no bridging in the router, just point-to-point with specific devices).

I found an abysmal connection speed with bandwidth on the order of 50-100 kbps tested via iperf. Connection between the same devices outside the wireguard tunnel is 10-20 mbps, which is 100-400 times slower, which I don’t understand since wireguard usually has very little overhead.

I have tried different MTU settings on both VPS and devices on my home network (both cabled and via wi-fi) in the range from 1360 to 1460, and above speeds are the best I have reached with MTU 1420 and 1440. I have tried both with and without iptables rules setting the mss correspondingly.

The above speeds are acceptable for incremental backups and document synchronization, but completely unsuitable for media streaming.

Where would I start diagnosing the bottleneck?

Thanks in advance.

  • stavefajl@feddit.dkOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    I am currently running mtr from multiple devices:

    • in wireguard tunnel: single hop 10.1.1.1, loss% 0,1, avg ping 27.4 ms
    • outside wg between same devices:
      • ISP supplied modem/router 55% loss, avg ping 1.6 ms
      • multiple hops without loss, avg ping 16-20 ms
      • random intermediary 30 % loss, avg ping 20 ms
      • endpoint, 5% loss, avg ping 25 ms

    It looks like across the board my ISP modem / router is dropping 50-80 % of packets, and that packet loss is ramping up from 4% to 80 percent after a few minutes of running mtr.
    It also looks like my VPS endpoint climbs to 20% packet loss over time (5-15 minutes of testing).

    Can I use this information to probe further into the devices I have access to (ISP modem and VPS)?

    • Brkdncr@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Some devices will drop icmp packets. Does iperf show the same amount of loss?

      Can you try a different internet connection such as mobile hotspot just to see if you have similar results? That could help identify it as a vps issue.

      • stavefajl@feddit.dkOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        I had to borrow a phone to set up a mobile hotspot.
        It has the same speeds inside the wireguard tunnel as when I tested from my wired connection (250 kbps TCP, 170 kbps UDP).
        The loss reported by iperf is dependent on the bandwidth that i test with. But as I increase bandwidth from the client the loss grows towards 100%.

        I tried testing in reverse (sending from VPS to devices on different networks) with surprising results:

        • TCP, wireguard: 5-10 mbps
        • UDP, wireguard: 50 mbps
        • TCP, no wireguard: 45 mbps
        • UDP, no wireguard: 250 mbps (saturates download speed on client when compared to speedtest.net)