Slow Speeds with OPENVPN

  • I setup a remote access OPENVPN server on my device, and I noticed that when I login remotely, if I tryto download a file from my server to my home, I am only getting 3Mbps at MAX. I have 100Mbps upload and download with my service, and I have tested and verified that. Is there something in the configuration that it limiting my bandwidth. Or is there anything I can do to fix this? All help is appreciated.

  • @mttpfsenseadmin

    What's the bandwidth at the other end? Your download will be limited by the upload rate at the other end.

  • LAYER 8 Global Moderator

    How are you moving the file exactly.. SMB, SFTP, Webdav? NFS?

    Keep in mind that SMB for example can be horrible once the latency goes over a few ms

    Also keep in mind that vpn adds overhead.. Are you doing udp or tcp? I would suggest you prob take a look at the recent scaling vpn document put out by netgate.

    The reason I mentioned so many things - as there are a lot of moving parts in vpn access that many users do not take into account. And they think oh well I have X speed at both client and server I should be able to move file at X speed..

    And just because it comes up so often... and wrong B is used.. Your saying your moving files at 3Mbits per second, or 3MBytes per second?

    What is the latency between your client and server is it 10ms, or 100ms for example? This can be a huge issue if your just trying to use windows file copy (smb).. And what version 1, 2, 3 - the chattiness has gotten better in current versions.. Chatty protocols and longer RTT means slowness..

    edit: Exactly as JKnott mentions.. I took it that both ends are 100/100 but is really X/Y and A/B where X and A or download, and Y,B are upload..

  • @JKnott The speed of the PFsense device is 100Mbps up and down, the speed at my residence is 940Mbps down and 880Mbps up.

  • LAYER 8 Rebel Alliance

    Like johnpoz said, there is no "Speed" button you can just push.
    Provide more information, so maybe we can help.


  • @johnpoz I am using NFS for file transferring. I am doing UDP for my connection. The file transfer says 355KBps. When I look at the traffic monitor for the OPENVPN connection, the max bandwidth it reaches is 3Mbps. I am only getting 4ms to 5ms of latency from my home to the server.

  • LAYER 8 Global Moderator

    4 to 5 ms... Wow your server hosted by the same ISP across the street from you? I don't even get that to my isp gateway ;)

    I would look to tweaking your NFS setup... Its known issue that NFS over wan is horrible, etc..

    Can you use say webdav or something to move your data?

  • LAYER 8 Rebel Alliance

    @johnpoz said in Slow Speeds with OPENVPN:

    I don't even get that to my isp gateway ;)


    PING ( 56 data bytes
    64 bytes from icmp_seq=0 ttl=57 time=4.863 ms
    64 bytes from icmp_seq=1 ttl=57 time=4.199 ms
    64 bytes from icmp_seq=2 ttl=57 time=4.266 ms
    --- ping statistics ---
    3 packets transmitted, 3 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 4.199/4.443/4.863/0.298 ms


  • @mttpfsenseadmin

    One thing to bear in mind is there's no throttling with UDP in the way there is with TCP. This means you have a significant of lost packets, due to a fast connection over running a slower one. UDP is bandwidth constrained by some applications, such as VoIP, but if you're doing file transfers over UDP, I'd expect a lot of lost packets. OpenVPN, while using UDP for the transfer protocol, is limited by TCP in the traffic it carries.

  • LAYER 8 Global Moderator

    4ms to google - that pretty slick ;)

    [2.4.4-RELEASE][admin@sg4860.local.lan]/root: ping
    PING ( 56 data bytes
    64 bytes from icmp_seq=0 ttl=54 time=12.904 ms
    64 bytes from icmp_seq=1 ttl=54 time=14.759 ms
    64 bytes from icmp_seq=2 ttl=54 time=12.974 ms
    64 bytes from icmp_seq=3 ttl=54 time=20.279 ms
    64 bytes from icmp_seq=4 ttl=54 time=16.124 ms
    64 bytes from icmp_seq=5 ttl=54 time=12.191 ms
    64 bytes from icmp_seq=6 ttl=54 time=11.919 ms
    64 bytes from icmp_seq=7 ttl=54 time=36.262 ms
    --- ping statistics ---
    8 packets transmitted, 8 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 11.919/17.176/36.262/7.659 ms

Log in to reply