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

    Virtualbox pfsense slow

    Scheduled Pinned Locked Moved General pfSense Questions
    13 Posts 3 Posters 1.5k 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.
    • A
      aldar
      last edited by

      Pfsense on hyper-V is fast, the same as from WAN host: 4ad2b707-7a29-47e2-aed1-fe92a6f1044e-image.png
      Pfsense on Vmware is slower:7f470e2a-4638-43b6-956d-d7e45426949e-image.png
      Pfsense on Virtualbox is very slow:
      e84a00bb-61eb-4b92-b4d1-d481819f4e5d-image.png

      This is Vmware network config:
      688ff13b-004a-432f-b73d-7147e5bd3a57-image.png
      This is Virtualbox network config:
      2915c43d-cce6-4b84-b3b1-f6cfa882702b-image.png
      646f7ca7-728e-447d-9a20-4fae81a722a8-image.png

      PFsense is vanilla with no modules and no additional config, just assigned ip addresses with startup wizard.
      Already played with System -> Advanced -> Networking paramaters
      Hardware Checksum Offloading
      Hardware TCP Segmentation Offloading
      Hardware Large Receive Offloading

      Iperf shows the same result.
      I tested iperf with virtualbox:
      Client VM in LAN network makes connection to WAN network host through pfsense, and it is very slow. And the issue is not exactly with virtualbox network, cause virtualbox VM connects to other host on network with higher speed. Let me illustrate:

      LAN VM ---> 13mbits ---> WAN Physical --- ( via pfsense )
      b543f6cf-d10c-4234-a474-56e07990d451-image.png
      LAN VM ---> 1.5gbit ---> LAN Physical --- ( directly )
      e6cb404a-15b1-4aa9-9c59-791302cdd385-image.png
      WAN VM ---> 600mbits ---> WAN Physical --- ( directly )
      b6dfa64d-7db7-4ec9-ba7d-2aeb123becff-image.png
      I also tried to install iperf on pfsense and here are the results:
      WAN pfsense ---> 80mbits ---> WAN Physical
      4515ead3-ff60-4ee3-afb8-329e2c464b10-image.png
      LAN pfsense ---> 80mbits ---> LAN Physical
      01e7899a-0d3e-4a3b-b176-30f5e49e74ba-image.png
      For some reason I am unable to use Hyper-V. How let pfsense work faster on vmware or virtualbox?

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @aldar
        last edited by

        @aldar

        There is no such thing as "use another driver and things get faster".
        The VM exposes 'hardware' to the OS (FreeBSD) and the OS doesn't even know it's running on a virtual device.

        What you want to know : pfSense runs slow. What about a native FreeBSD ? Probably, the same ....
        Btw : not a long time ago, Hyper-V - network speed, at least, was running very slow for pfSense.
        Microsoft, the one that makes Hyper-V, solved it.

        What you can do on your side : good VM hardware support starts by ditching bad NICs : You'll be better of not using Realtek

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        A 1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Those results from pfSense itself seem suspiciously close to 100M. Check the links speeds of all the NICs in the path.

          1 Reply Last reply Reply Quote 0
          • A
            aldar @Gertjan
            last edited by

            @gertjan
            I put Intel network card. And here are the results:
            Linux machine on the same network shows 600mbits, while pfsense show 10 times less.
            Both of them iperf to the exact same machine.
            8459a56b-f503-40a1-8ecb-b35cfc495ae0-image.png
            @stephenw10
            I checked all the link speeds, everywhere it's 1000 full duplex. As you may see on the screenshot above, linux machine overspeeds 100mbits.

            A 1 Reply Last reply Reply Quote 0
            • A
              aldar @aldar
              last edited by

              I also tried Freebsd x64 -> and it's 150 mbits.
              A little bit better than pfsense, but still slow.
              Seems like virtualbox and freebsd don't like each other.

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                How many CPU cores is it? What CPU?

                FreeBSD without pf running will be quicker so that looks about right. I would try running top -HaSP at the cli while while testing and see if it's CPU limited for some reason.
                VBox is not normally limited in that way:

                Screenshot from 2023-03-24 14-18-48.png

                Steve

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  In fact that was with VBox NATing to the host network. With a bridged NIC it gets line rate:

                  Screenshot from 2023-03-24 14-24-09.png

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    aldar @stephenw10
                    last edited by

                    @stephenw10
                    Wow, it works for you. On what host OS do you run? Do you have hyperthreading enabled?
                    I use Windows 11, asus tuf b450m-pro s, with ryzen 7 3700X.
                    I gave 4 CPU threads to VM. This is my top -HaSP while running iperf command
                    e247a336-1a38-4ca7-8967-d0999e0d45c3-image.png

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      aldar @aldar
                      last edited by

                      Reinstalled host windows with newest version, enabled Secure boot and TPM. Now pfsense works. It slower than freebsd still. But 600mbits is more than enough.
                      516a2ca9-a266-4742-b44b-c87160b97de1-image.png

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        aldar @aldar
                        last edited by

                        But LAN to WAN throug pfsense is still slow
                        e4f5c244-e386-4b6f-bc56-8ec5c9d85c50-image.png @aldar

                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          What about from that VM to pfSense directly so only using the LAN? Is it still slow?

                          My VBox host is Linux Mint but that's with only one CPU core.

                          Do you have VBox NATing or bridged from the host NIC?

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            aldar @stephenw10
                            last edited by

                            @stephenw10
                            From VM Lan --> to Pfsense LAN is fast. It was around 400mbits.
                            I use vbox bridged. I think pfsense below NAT is nonsense --> too much NATs.

                            1 Reply Last reply Reply Quote 0
                            • stephenw10S
                              stephenw10 Netgate Administrator
                              last edited by

                              I agree, it should almost always be bridged if you're running VBox in any sort of permanent way.

                              400Mbps between VMs is pretty slow though. That seems like it must be a problem in the VBox config somehow. Though it's been many years since I ran in Windows.

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