Even well-designed VMware networking will encounter virtualization-specific problems, like high packet loss in a virtual machine. Appropriate tweaks to the VMware network settings can
A normal Ethernet network connector should rarely let numerous packets drop – there should be no more than a few dropped packets for every 100,000 packets received or transmitted successfully (Figure 1). On a Linux virtual machine (VM), this statistic is easily monitored with the ifconfig command.
On a VM with a bursty network traffic pattern, significant packet loss may occur, requiring a fix within the VM's network settings. First, verify that the VM uses the VMXNET3 driver for the virtual network card. If this is the case, on a Linux host, high packet loss occurs when large data files are sent over high-bandwidth networks, and in certain other situations. Remediate the situation by disabling receive and transmit checksums. You'll add risk, as these checksums normally close out erroneous packets. Since errors on a typical Ethernet network card are below one on a million, the risk level is low.
Use the Linux ethtool utility to switch off receive and transmit checksums in the VMware network settings, starting with ethtool as root from the command line. To switch these checksum features off for the network card eth0, for example, the command would read ethtool --offload eth0 rx off tx off. If this works, open the configuration file for your network card -- /etc/sysconfig/network/ifcfg-eth0 on SUSE or /etc/sysconfig/network-scripts/ifcfg-eth0 on Red Hat -- and change the ETHTOOL_OPTIONS parameter to ETHTOOL_OPTIONS='--offload eth0 rx off tx off'.
If you're still troubleshooting packet loss, try increasing the receive ring buffer size via the ethtool utility. By default, this buffer is set to 256, but the maximum you can use is 4096. Reset the ring buffer size to 512, using ethtool -G eth0 512. If this doesn't give you the required result, try a higher value.
High packet loss on a Windows VM calls for a change to network settings on the VMXNET3 driver. From Device Manager, right click the VMXNET3 driver and select Properties. The Advanced tab has two parameters: Small RX Buffers and RX Ring #1 Size. Increase the value of these parameters a bit and test whether this yields any improvement. Incrementally increase the value until you resolve the loss.
In most cases, these fixes will decrease the number of packets dropped in virtual machines. If adjusting the network settings fails, you're probably facing another problem caused by other performance-related factors in the VM, not the VMware network settings between the VM and ESXi platform. Consult an expert in the guest operating system, as there are many parameters that you can tune for performance. Beware of tuning the wrong parameters, which could have a strong negative impact on the VM.
This was first published in April 2013