Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Is this performance to be expected?

    Scheduled Pinned Locked Moved OpenVPN
    openvpn problembandwidth slow
    16 Posts 4 Posters 3.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      s1l3nce
      last edited by

      @michmoor Yep. That's why there are 2 entries from both sender and receiver and a SUM. I used -P2.

      1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott @s1l3nce
        last edited by

        @s1l3nce said in Is this performance to be expected?:

        But when I do file transfers through smb

        That's the problem. SMB is lousy for anything other than the local LAN.
        Your own testing shows that

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        S 1 Reply Last reply Reply Quote 0
        • S
          s1l3nce @JKnott
          last edited by

          @jknott Yep, I'm aware ๐Ÿ˜“ But why do you think the Synology NAS deals with it much better? What could be causing that difference in performance, even when the NAS has a weaker processor?

          1 Reply Last reply Reply Quote 0
          • S
            SteveITS Galactic Empire @s1l3nce
            last edited by

            @s1l3nce Looks like it has 4 cores so 15% would be less than one. OpenVPN is single threaded as I recall. You could verify usage with "top" during the test.

            I didn't dig through your settings but did you review
            https://docs.netgate.com/pfsense/en/latest/recipes/index.html#openvpn

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote ๐Ÿ‘ helpful posts!

            S 1 Reply Last reply Reply Quote 0
            • S
              s1l3nce @SteveITS
              last edited by

              Sorry for my ignorance guys. I've just launched iperf with -P4 (4 threads) instead of -P2 and now I'm getting nearly 300 mbps (which is the connection cap) and 25% CPU usage, which means that I'm maxing out one core.

              So that's definitely a relief but now I need to figure out why my smb transfers are so bad. If you have any tips on that, I'm all ears ๐Ÿ™

              @steveits said in Is this performance to be expected?:

              https://docs.netgate.com/pfsense/en/latest/recipes/index.html#openvpn

              Yep, I did ๐Ÿ˜…

              M 1 Reply Last reply Reply Quote 0
              • M
                michmoor LAYER 8 Rebel Alliance @s1l3nce
                last edited by

                @s1l3nce said in Is this performance to be expected?:

                So that's definitely a relief but now I need to figure out why my smb transfers are so bad. If you have any tips on that, I'm all ears

                I would avoid SMB transfers period.
                What is the latency between the client and the server?

                Firewall: NetGate,Palo Alto-VM,Juniper SRX
                Routing: Juniper, Arista, Cisco
                Switching: Juniper, Arista, Cisco
                Wireless: Unifi, Aruba IAP
                JNCIP,CCNP Enterprise

                S 1 Reply Last reply Reply Quote 0
                • S
                  s1l3nce @michmoor
                  last edited by s1l3nce

                  @michmoor said in Is this performance to be expected?:

                  What is the latency between the client and the server?

                  20ms and very stable.

                  I've just found something very interesting. When I do smb transfers between server and client, this happens:

                  • Client downloading a file from OpenVPN server
                    5434d0353fd5795e7cef14575605ad5c[1].png

                  • Client uploading a file to OpenVPN server
                    f9603d5520619dfcd2bb01164de1f4ab[1].png

                  I've also tried using WireGuard and the downloading was even worse than OpenVPN but the upload was the same; network capped.

                  • Client downloading a file from WireGuard server
                    f4f693a257deba66646412ebe171e249[1].png

                  • Client uploading a file to WireGuard server
                    cd15d09115104fb1b3562c66d758e404[1].png

                  I think I'm very close to finding the culprit. Thanks for the help and all the interest ๐Ÿ™ Sharing all this stuff with you is helping me a lot.

                  Btw, just to clarify, this is a speed test on the network where the NAS is hosted. I said 500/500 mpbs in the op because it's in my contract but for some reason I'm receiving 100 extra mbps. Not complaining ๐Ÿ˜‚
                  9b47a44f-f5c1-4f06-87d7-e88ff401fa80-image.png

                  And just to be sure that the NAS is not causing this issue, I've also downloaded files from a Windows machine inside the same network to the machine with the openVPN client and the download speeds where the same as from the NAS (around 15 Megabytes/s).

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    s1l3nce @s1l3nce
                    last edited by s1l3nce

                    Tomorrow I will try to do the same test but with a client from a different network that also has a 600/600 mbps connection, because I'm starting to think that it could be an issue on the receiving end, meaning that maybe the client that I'm using right now has some issue with VPN downloads. I doubt this is the case but who knows...

                    I will update this post tomorrow with the results.

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      s1l3nce @s1l3nce
                      last edited by

                      Ok, I've done some testing from this other client and the results are pretty much the same: uploads are great (400 mbps, which is the maximum that I can expect from my firewall's processor with AES-NI) and downloads are still poor (average of 150 mbps).

                      I've also tested doing FTP file transfers through VPN and I got the same results as with smb. So smb is not the issue.

                      So these are my findings so far:

                      • OpenVPN does not seem to be the problem: I've got even worse server upload with WireGuard.
                      • SMB is not the problem: FTP through VPN gives similar results.
                      • My server upload is not the problem: direct SFTP uploads (bypassing the VPN) are just fine.
                      • My firewall processor is not the problem: the CPU caps at 25% (one core at full usage) when the upload reaches about 400 mbps.

                      I'm really out of ideas now but at least I've discarded loads of things ๐Ÿ˜…

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        s1l3nce @s1l3nce
                        last edited by s1l3nce

                        I still haven't figured out why this is happening. The only update I have is that I've also tested this on macOS using the official openVPN client and I had the same results: perfect upload speeds (to the server) and terrible download speeds (from the server).

                        I don't know what else to try at this point.

                        1 Reply Last reply Reply Quote 0
                        • S
                          s1l3nce
                          last edited by

                          I know this topic is quite old but I just want to give a small update.

                          I ended up changing from OpenVPN to Wireguard. I managed to reach my maximum upload/download server speeds through Wireguard. So, even though it is more painful to configure each client, the performance increase makes a huge difference.

                          S 1 Reply Last reply Reply Quote 0
                          • S
                            s1l3nce @s1l3nce
                            last edited by s1l3nce

                            Here is my transfer performance using Wireguard

                            DOWNLOADING FROM SERVER (Server upload performance)
                            fa6458705745c2fe12cf2ee4b989de6b[1].png

                            UPLOADING TO SERVER (Server download performance)
                            cbd266b143cfdf96762c54a44e8b5656[1].png
                            I'm very happy with these results.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.