- 论坛徽章:
- 3
|
本帖最后由 ahocat 于 2010-07-28 15:05 编辑
前些天在论坛里发了个帖子询问VMware虚拟机上虚拟网卡型号的选择,似乎没有得到确切的答案。于是自己做了一点简单测试:
测试环境
1. 虚拟机平台:VMware ESXi 4.1
2. 虚拟OS:FreeBSD 8.1
安装FreeBSD时VMware默认给的网卡是E1000,即模拟Intel的千兆网卡;从一台Windows客户端向FreeBSD上传一个200MB的Zip文件。
然后在FreeBSD上安装VMware Tools,改用VMware提供的VMXNET2的虚拟网卡;再次上传该文件。
测试结果如下:
网卡型号 | E1000(Intel) | VMXNET 2 | 上传文件耗时(秒) | 39.78 | 22.39 | 传输速率(KB/s) | 5318.00 | 9448.18 |
为了避免缓存之类的原因影响测试的准确性,两次上传前,两端的机器都是重新启动过的。
可以看出,用了VMware提供的VMXNET 2虚拟网卡后,传输速率足足提高了将近80%,性能优势十分明显。看来VMXNET系列的网卡是在性能上有优化,在虚拟机上选用VMXNET系列的网卡是十分有价值的。
后来在VMware知识库中找到了以下信息,证实了这点:
Choosing a network adapter for your virtual machine Solution
Available Network Adapters
Only those network adapters that are appropriate for the virtual machine you are creating, are available configuration options in the Choose Networks window.
Vlance — An emulated version of the AMD 79C970 PCnet32 LANCE NIC, an older 10 Mbps NIC with drivers available in most 32bit guest operating systems except Windows Vista and later. A virtual machine configured with this network adapter can use its network immediately.
VMXNET — The VMXNET virtual network adapter has no physical counterpart. VMXNET is optimized for performance in a virtual machine. Because operating system vendors do not provide built-in drivers for this card, you must install VMware Tools to have a driver for the VMXNET network adapter available.
Flexible — The Flexible network adapter identifies itself as a Vlance adapter when a virtual machine boots, but initializes itself and functions as either a Vlance or a VMXNET adapter, depending on which driver initializes it. With VMware Tools installed, the VMXNET driver changes the Vlance adapter to the higher performance VMXNET adapter.
E1000 — An emulated version of the Intel 82545EM Gigabit Ethernet NIC. A driver for this NIC is not included with all guest operating systems. Typically Linux versions 2.4.19 and later, Windows XP Professional x64 Edition and later, and Windows Server 2003 (32-bit) and later include the E1000 driver.
VMXNET 2 (Enhanced) — The VMXNET 2 adapter is based on the VMXNET adapter but provides some high-performance features commonly used on modern networks, such as jumbo frames and hardware offloads. This virtual network adapter is available only for some guest operating systems on ESX/ESXi 3.5 and later.
VMXNET 2 is supported only for a limited set of guest operating systems:
32 and 64bit versions of Microsoft Windows 2003 (Enterprise and Datacenter Editions).
Note: You can use enhanced VMXNET adapters with other versions of the Microsoft Windows 2003 operating system, but a workaround is required to enable the option in VMware Infrastructure (VI) Client or vSphere Client. See Enabling enhanced vmxnet adapters for Microsoft Windows Server 2003 (1007195) if Enhanced VMXNET is not offered as an option.
32bit version of Microsoft Windows XP Professional
32 and 64bit versions of Red Hat Enterprise Linux 5.0
32 and 64bit versions of SUSE Linux Enterprise Server 10
64bit versions of Red Hat Enterprise Linux 4.0
64bit versions of Ubuntu Linux
VMXNET 3 — The VMXNET 3 adapter is the next generation of a paravirtualized NIC designed for performance, and is not related to VMXNET or VMXNET 2. It offers all the features available in VMXNET 2, and adds several new features like multiqueue support (also known as Receive Side Scaling in Windows), IPv6 offloads, and MSI/MSI-X interrupt delivery.
VMXNET 3 is supported only for virtual machines version 7 and later, with a limited set of guest operating systems:
32 and 64bit versions of Microsoft Windows XP, 2003, and 2008
32 and 64bit versions of Red Hat Enterprise Linux 5.0 and later
32 and 64bit versions of SUSE Linux Enterprise Server 10 and later
32 and 64bit versions of Asianux 3 and later
32 and 64bit versions of Debian 4/Ubuntu 7.04 and later
32 and 64bit versions of Sun Solaris 10 U4 and later
32 and 64bit versions of Ubuntu |
|