Slow Linux router performance with VMware VMXNET3 adapter

I have a Linux guest under VMware ESXi 4.1 that runs OpenVPN and therefore acts as a gateway/router into the network. For weeks I was troubled with network slowness and weirdness. I knew OpenVPN wasn’t the problem because it’s fairly easy to configure and I’ve done dozens of similar deployments without any issues. Then I started reading some posts on the VMware forums about people complaining their Linux routers are basically unusable when using VMXNET 3.

I did happen to be using the VMXNET 3 adapter on this guest. It turns out this is a documented issue. The workaround suggests to set a module parameter option for “disable_lro=1″. I tried to do it using this guide but it didn’t seem to help me. For me, the solution was reverting back to using the more compatible E1000 adapter.

Read more about the issue in the vSphere 4.1 Release Notes:

Poor TCP performance can occur in traffic-forwarding virtual machines with LRO enabled

Some Linux modules cannot handle LRO-generated packets. As a result, having LRO enabled on a VMXNET 2 or VMXNET 3 device in a traffic forwarding virtual machine running a Linux guest operating system can cause poor TCP performance. LRO is enabled by default on these devices.

Workaround: In traffic-forwarding virtual machines running Linux guests, set the module load time parameter for the VMXNET 2 or VMXNET 3 Linux driver to include disable_lro=1.