Virtualbox pfsense slow
-
Pfsense on hyper-V is fast, the same as from WAN host:
Pfsense on Vmware is slower:
Pfsense on Virtualbox is very slow:
This is Vmware network config:
This is Virtualbox network config:
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 OffloadingIperf 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 )
LAN VM ---> 1.5gbit ---> LAN Physical --- ( directly )
WAN VM ---> 600mbits ---> WAN Physical --- ( directly )
I also tried to install iperf on pfsense and here are the results:
WAN pfsense ---> 80mbits ---> WAN Physical
LAN pfsense ---> 80mbits ---> LAN Physical
For some reason I am unable to use Hyper-V. How let pfsense work faster on vmware or virtualbox? -
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
-
Those results from pfSense itself seem suspiciously close to 100M. Check the links speeds of all the NICs in the path.
-
@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.
@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. -
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. -
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:Steve
-
In fact that was with VBox NATing to the host network. With a bridged NIC it gets line rate:
-
@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
-
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.
-
But LAN to WAN throug pfsense is still slow
@aldar -
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?
-
@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. -
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.