Network adapter type and virtual network performance optimization in VMware and virtualbox

Source: Internet
Author: User
Tags virtual environment vmware server
Document directory
  • Network Type
  • Kernel Driver

Recently, I found that the network performance of the virtual machine has encountered a bottleneck, so I want to find out that I have ignored this knowledge, so I took a note.

1. VirtualBox

Eshizhan is commonly used in VirtualBox, hereinafter referred to as Vbox. Start with it:

Network Adapter

According to the official documentation, five network adapters can be simulated in Vbox,

  • AMD PCNet pci ii (Am79C970A );

  • AMD PCNet fast iii (Am79C973,Default);

  • Intel PRO/1000 MT Desktop (82540EM );

  • Intel PRO/1000 T Server (82543GC );

  • Intel PRO/1000 MT Server (82545EM );

  • Paravirtualized network adapter (virtio-net ).

In terms of compatibility, AMD PCNet series have good compatibility and are also relatively old. Intel PRO/100 series are relatively new NIC, virtio-net will talk about it later.

In terms of performance, the new Intel PRO/1000 series have better performance than the old AMD PCNet series, and virtio-net is better than the previous two, virtio-net is designed for virtual machines and has been optimized a lot. It seems to be from Redhat, but this NIC is virtual and has relatively new features. Therefore, most operating systems do not have drivers, it must be used with the driver in Guest Addition. After a rough test, virtio-net is about 20% more effective than AMD PCNet by default. Virtio-net is relatively new and will be greatly improved in the future.

Network Type

Next, let's talk about the network type in Vbox. This is a common topic, especially for kids who are new to virtual machines and are not familiar with the network. I suggest you take a look at the network knowledge, especially the topology, I will be able to understand it soon. Eshizhan only introduces the performance here.

Bridged (bridging), Internal, and Host-only have almost the same performance. Network Address Translation (NAT) has the worst performance, because the functions are the most complex. In addition to the Bridged and NAT modes, it is not easy to access the Internet. Therefore, the Bridged (BRIDGE) mode is recommended.

Kernel Driver

This part mainly needs to enable the segmentation offloading function of the NIC in Guest. It is enabled by default and can be viewed using ethtool.

2. VMware

VMware is the leader in the virtual machine industry. In recent years, various commercial solutions have emerged.

Network Adapter

After checking the official documents, you can find the following types ,:

Vlance: AMD PCNet series. The model is AMD 79C970 PCnet32-lance nic.
VMXNET: Virtual NIC developed by VMware for Virtual Environments
Flexible: The best NIC In the first two options,Default
E1000: Intel 82545EM Gigabit Ethernet NIC
E1000e: Intel 82574 Gigabit Ethernet NIC
VMXNET 2 (Enhanced): VMXNET Ultimate Edition
VMXNET 3: VMXNET2 Ultimate Edition

There is no doubt that the VMXNET series is the best, and of course Guest needs the support of Vmware Tools. In addition, the network adapter type is only available for Vmware Server-level products such as ESX, such as Vmware Palyer, or even common VMware Workstation products, however, you can modify. the vmx configuration file achieves the same purpose,

Open the. vmx file and add

Ethernet0. VirtualDev = "vmxnet3"

Value is "vlance" or "e1000" or "vmxnet" or "vmxnet3"
The network type and kernel driver of VMware are the same as those of Vbox. In the same Vbox configuration parameter. In the vmx file, you can use a series of parameters to fine-tune your virtual NIC, such as the buffer size:Ethernet0. NumRecvBuffers = 128
Ethernet0. NumXmitBuffers = 64 3. Summary

Virtual Machine network adapters rely on the CPU to simulate, there is no similar to the use of hardware acceleration technology as the graphics card, so on the one hand by using the virtual environment specially optimized Paravirtualized (quasi virtualization) hardware drivers, on the other hand, use the Bridged (bridging) mode, configure optimization parameters, and other methods to deliver most of the network I/O to the physical NIC, reduce CPU interruptions, and achieve the goal of optimizing the virtual network environment.

 

P.S.

Eshizhan test found that a large number of concurrent network I/O operations, although each package is not large, may involve too many interruptions, resulting in a significant reduction in virtual network performance, can only reach 30% to 40% of the physical NIC, even lower. If you have similar experience, you can advise.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.