Lately I am trying to optimize the OpenVPN transfer performance of my VM router inside PVE.
I have a 2-port NIC (Intel X550-T2, but the infrastructures are 1 Gbps) and they act as the WAN (port1) and LAN (port2) for my router VM (running ClearOS, a CentOS variant).
I tried two configurations:
1. Creating two Linux bridges, and assign the port1 and port2 to each bridge respectively. Then these two bridges are added as network interfaces (using Virtio driver) to the router VM. Finally, the LAN port connects to a physical switch and other computers in the LAN network.
This is what I read from the pfsense virtualized router guide.
2. Passing the 2-port NIC directly to the router VM and have the same configuration as above. I also created a Linux bridge with no port attached, this
In particular, I am interested in the performance with OpenVPN of the router VM. So with two other computers within LAN, I connect one computer to the OpenVPN server setup by the router VM, and have all traffic routed through it.
Then I setup a iperf3 server on a LAN computer A, and try to connect from the other computer B whose traffic goes through the OpenVPN server.
First of all, for some reason, with either of the above configurations I could only get 260 Mbps of throughput (maybe bottleneck by the CPU of the client). Then I try to observe the CPU utilization of the router VM using htop within the VM. As OpenVPN is a single-threaded application, I can see it clearly by checking how much a single core is being utilized.
With config 1, I am seeing 78% utilization with the above throughput.
With config 2, I am seeing only 35% utilization with the same throughput as config 1.
Is this normal to have such a big difference? Or is there any thing I can do further with config 1 to optimize the performance? Thanks.
I have a 2-port NIC (Intel X550-T2, but the infrastructures are 1 Gbps) and they act as the WAN (port1) and LAN (port2) for my router VM (running ClearOS, a CentOS variant).
I tried two configurations:
1. Creating two Linux bridges, and assign the port1 and port2 to each bridge respectively. Then these two bridges are added as network interfaces (using Virtio driver) to the router VM. Finally, the LAN port connects to a physical switch and other computers in the LAN network.
This is what I read from the pfsense virtualized router guide.
2. Passing the 2-port NIC directly to the router VM and have the same configuration as above. I also created a Linux bridge with no port attached, this
In particular, I am interested in the performance with OpenVPN of the router VM. So with two other computers within LAN, I connect one computer to the OpenVPN server setup by the router VM, and have all traffic routed through it.
Then I setup a iperf3 server on a LAN computer A, and try to connect from the other computer B whose traffic goes through the OpenVPN server.
First of all, for some reason, with either of the above configurations I could only get 260 Mbps of throughput (maybe bottleneck by the CPU of the client). Then I try to observe the CPU utilization of the router VM using htop within the VM. As OpenVPN is a single-threaded application, I can see it clearly by checking how much a single core is being utilized.
With config 1, I am seeing 78% utilization with the above throughput.
With config 2, I am seeing only 35% utilization with the same throughput as config 1.
Is this normal to have such a big difference? Or is there any thing I can do further with config 1 to optimize the performance? Thanks.