免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 10978 | 回复: 8
打印 上一主题 下一主题

[VMware] 实测:虚拟网卡的选择对性能的影响 [复制链接]

论坛徽章:
3
白羊座
日期:2013-11-05 12:59:14子鼠
日期:2014-01-29 14:14:50戌狗
日期:2014-02-11 16:21:45
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-07-28 14:08 |只看该作者 |倒序浏览
本帖最后由 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.009448.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

论坛徽章:
0
2 [报告]
发表于 2010-07-28 14:42 |只看该作者
支持下,哪天我也测测

论坛徽章:
0
3 [报告]
发表于 2010-07-28 17:46 |只看该作者
支持支持

论坛徽章:
0
4 [报告]
发表于 2010-07-28 18:04 |只看该作者
按照vmware的vsphere培训手册中所讲,和楼主给出的内容是一样的,发布的越新的虚拟网卡,性能应该越高,不过需要你的guest OS支持才行。

论坛徽章:
0
5 [报告]
发表于 2010-07-29 08:59 |只看该作者
漫漫长路啊

论坛徽章:
3
白羊座
日期:2013-11-05 12:59:14子鼠
日期:2014-01-29 14:14:50戌狗
日期:2014-02-11 16:21:45
6 [报告]
发表于 2010-07-30 13:48 |只看该作者
自己补充一下:
今天又在Windows2003的虚拟机上测试了一下,发现用默认的E1000跟改用VMware网卡前后的传输速率并没有多大差别。
看来Windows版驱动的质量确实很高,再优化的余地已经很小了。

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-10-04 06:20:00
7 [报告]
发表于 2010-08-17 17:45 |只看该作者
回复 1# ahocat


    很好,很强大.

论坛徽章:
0
8 [报告]
发表于 2010-09-01 19:09 |只看该作者
确实很好……

论坛徽章:
0
9 [报告]
发表于 2010-09-02 15:13 |只看该作者
自己补充一下:
今天又在Windows2003的虚拟机上测试了一下,发现用默认的E1000跟改用VMware网卡前后的传输 ...
ahocat 发表于 2010-07-30 13:48



    呵呵,是不是ms对VMXnet的支持不好呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP