Jump to content

OPNSense under VM (NAT) extremely slow

I build a Host with very capable Hardware, Core i7 3770K with 8GB of RAM and 120GB SSD Host, 120GB SSD VM, 2TB Cache

As diagram below:

jz75azm.png

 

before I put online, I was testing OPNSense NAT performance under VM, I found I couldn't achieve at least 350Mbps,

I assign 2 vCPU for OPNSense alone, during iperf Test, OPNSense max out 100% CPU Usage.

 

Currently I doing separate machine, I thought using VM can save some electricity, but performance are not satisfied

My PC Specification: https://valid.x86.fr/qsznp0

Link to comment
Share on other sites

Link to post
Share on other sites

To get better performance on the NIC you might prefer to use virtio+the virtio driver as oppose to like the default e1000. Then use bridged as oppose to NAT.

 

Alternatively you could pass-though a whole NIC to the VM. That should help greatly too.

 

Really though I wouldn't run your router/firewall in a VM if it controls your entire network. It's one of the things that's not a great idea to virtualize as a functional deployment.

Link to comment
Share on other sites

Link to post
Share on other sites

46 minutes ago, Windows7ge said:

Really though I wouldn't run your router/firewall in a VM if it controls your entire network. It's one of the things that's not a great idea to virtualize as a functional deployment.

I see, I'll stick OPNSense on Real Hardware.

As Pi-Hole and LANCache, safe in VM since Pi-Hole not require CPU power

My PC Specification: https://valid.x86.fr/qsznp0

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, Anime4000 said:

I see, I'll stick OPNSense on Real Hardware.

As Pi-Hole and LANCache, safe in VM since Pi-Hole not require CPU power

So long as your Router is handing out a secondary or tertiary DNS that your clients can use when the pi-hole VM is down (which will happen) then yes that should be fine.

 

LanCache is for Steam games correct? I can't really comment on that as I don't use it myself.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×