LoginSignup
4
5

More than 5 years have passed since last update.

[vSphere/CentOS6.x]VMXNET3 & E1000のパフォーマンステスト

Last updated at Posted at 2015-05-05

VMXNET3 & E1000のパフォーマンステスト

VMware Toolsのyum installを試す関連でもうちょっと突っ込んで考えてみた。

vmxnet3とe1000でベンチマークを取ってみることに。

仮想マシンの準備

CentOS6.6 でvmxnet3とe1000のマシンをそれぞれ準備。

尚、Linux(CentOS6.6現在)に関しては、kernelにvmxnet3のドライバがすでに含まれている状態。
そのため、とりあえずvmxnet3を利用したいというだけであれば、仮想マシン作成時にNICでvmxnet3を選択してデプロイすればデフォルトでロードされる。

$ modinfo vmxnet3
filename:       /lib/modules/2.6.32-504.16.2.el6.x86_64/kernel/drivers/net/vmxnet3/vmxnet3.ko
version:        1.1.30.0-k
license:        GPL v2
description:    VMware vmxnet3 virtual NIC driver
author:         VMware, Inc.
srcversion:     502C6D11BE2EF75FC4A1B5F
alias:          pci:v000015ADd000007B0sv*sd*bc*sc*i*
depends:
vermagic:       2.6.32-504.16.2.el6.x86_64 SMP mod_unload modversions

ネットワークのベンチマークを取得

今回はiperf3でネットワークのベンチマークを取得してみる。

ソースコンパイルが面倒なので、EPELから配布されているRPMを利用する。
http://dl.fedoraproject.org/pub/epel/6/x86_64/repoview/iperf3.html

EPELレポジトリの導入

レポジトリを追加する。
CentOSの場合、Extrasパッケージからレポジトリをインストールすることが可能。

$ yum list | grep epel-release.noarch
epel-release.noarch                         6-8                         extras
$ sudo yum install -y epel-release.noarch

追加されたことを確認。
また、今回はあくまでiperf3をインストールするためだけに導入するので、デフォルトで "enabled = 0(無効)" にしておく。

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

パッケージを検索

"enabled = 0" にしているレポジトリは '--enablerepo' オプションを利用すると一時的に有効にすることが可能。

$ yum list --enablerepo=epel | grep -i iperf3
iperf3.i686                                3.0.10-1.el6                 epel
iperf3.x86_64                              3.0.10-1.el6                 epel
iperf3-devel.i686                          3.0.10-1.el6                 epel
iperf3-devel.x86_64                        3.0.10-1.el6                 epel

インストール

$ sudo yum install --enablerepo=epel iperf3

ベンチマーク構成

vmxnet3とe1000の仮想マシン及び異なるロケーションにあるサーバーにそれぞれiperf3をインストール。以下のように異なるモードで動作させる。
※図中のIPアドレスはダミーアドレス。

  • VM(vmxnet3/CentOS6.6) iperf Clientモード
  • VM(e1000/CentOS6.6)  iperf Clientモード
  • サーバー(今回はAmazon EC2を使用) iperf Serverモード

VM_iperf-NetworkDiagram20150501.png

iperf3の使い方

iperf2の後方互換性はないので注意が必要。
つまりiperf2がインストールされたマシンとiperf3がインストールされたマシン間の相互通信のテストが出来ない。iperfのバージョンは統一する必要がある。
基本的な使い方はiperf2も3も同じ(オプションに差異有り)
http://www.unix-power.net/linux/iperf.html
http://nextdeveloper.hatenablog.com/entry/2014/02/07/120719

実行結果

デフォルトで10秒間のトラフィックをテスト。

(※iperf Server側に出力されたレポート)

vm(E1000)
$ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from vm_IPADDR(E1000), port 41993
[  5] local 172.31.6.XX port 5201 connected to vm_IPADDR(E1000) port 41994
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec  20.9 MBytes   175 Mbits/sec
[  5]   1.00-2.00   sec  14.9 MBytes   125 Mbits/sec
[  5]   2.00-3.00   sec  12.4 MBytes   104 Mbits/sec
[  5]   3.00-4.00   sec  13.6 MBytes   114 Mbits/sec
[  5]   4.00-5.00   sec  14.3 MBytes   120 Mbits/sec
[  5]   5.00-6.00   sec  12.6 MBytes   106 Mbits/sec
[  5]   6.00-7.00   sec  14.5 MBytes   122 Mbits/sec
[  5]   7.00-8.00   sec  12.0 MBytes   101 Mbits/sec
[  5]   8.00-9.00   sec  9.32 MBytes  78.2 Mbits/sec
[  5]   9.00-10.00  sec  10.7 MBytes  89.6 Mbits/sec
[  5]  10.00-10.03  sec   239 KBytes  72.8 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-10.03  sec   138 MBytes   116 Mbits/sec   64             sender
[  5]   0.00-10.03  sec   136 MBytes   113 Mbits/sec                  receiver
vm(VMXNET3)
$ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from vm_IPADDR(VMXNET3), port 52894
[  5] local 172.31.6.XX port 5201 connected to vm_IPADDR(VMXNET3) port 52895
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec  27.6 MBytes   232 Mbits/sec
[  5]   1.00-2.00   sec  15.3 MBytes   128 Mbits/sec
[  5]   2.00-3.00   sec  16.4 MBytes   137 Mbits/sec
[  5]   3.00-4.00   sec  14.8 MBytes   124 Mbits/sec
[  5]   4.00-5.00   sec  15.4 MBytes   129 Mbits/sec
[  5]   5.00-6.00   sec  15.3 MBytes   128 Mbits/sec
[  5]   6.00-7.00   sec  13.6 MBytes   114 Mbits/sec
[  5]   7.00-8.00   sec  15.1 MBytes   127 Mbits/sec
[  5]   8.00-9.00   sec  16.6 MBytes   140 Mbits/sec
[  5]   9.00-10.00  sec  10.7 MBytes  89.6 Mbits/sec
[  5]  10.00-10.04  sec   426 KBytes  92.3 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-10.04  sec   165 MBytes   138 Mbits/sec   82             sender
[  5]   0.00-10.04  sec   161 MBytes   135 Mbits/sec                  receiver

このAverageだと若干VMXNET3のほうがトラフィックが出ているようにも・・・
1分間でテストを実施した結果は下記。

(※iperf Client側に出力されたレポート)

vm(E1000)
$ iperf3 -c remoteServer_IPADDR -V -t 60 -i 10
iperf 3.0.10
Linux vm-test3 2.6.32-504.16.2.el6.x86_64 #1 SMP Wed Apr 22 06:48:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Time: Fri, 01 May 2015 02:18:00 GMT
Connecting to host remoteServer_IPADDR, port 5201
      Cookie: vm-test3.1430446680.734558.68d0d84b1
      TCP MSS: 1448 (default)
[  4] local vm_IPADDR(E1000) port 42001 connected to remoteServer_IPADDR port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 60 second test
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-10.00  sec   217 MBytes   182 Mbits/sec   54    170 KBytes
[  4]  10.00-20.00  sec   181 MBytes   152 Mbits/sec   29    115 KBytes
[  4]  20.00-30.00  sec   168 MBytes   141 Mbits/sec   30    122 KBytes
[  4]  30.00-40.00  sec   181 MBytes   152 Mbits/sec   15    165 KBytes
[  4]  40.00-50.00  sec   192 MBytes   161 Mbits/sec   31    134 KBytes
[  4]  50.00-60.00  sec   132 MBytes   111 Mbits/sec   53    129 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-60.00  sec  1.05 GBytes   150 Mbits/sec  212             sender
[  4]   0.00-60.00  sec  1.04 GBytes   149 Mbits/sec                  receiver
CPU Utilization: local/sender 1.0% (0.0%u/1.0%s), remote/receiver 3.5% (0.0%u/3.5%s)

iperf Done.
vm(VMXNET3)
$ iperf3 -c remoteServer_IPADDR-V -t 60 -i 10
iperf 3.0.10
Linux vm-test4 2.6.32-504.16.2.el6.x86_64 #1 SMP Wed Apr 22 06:48:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Time: Fri, 01 May 2015 02:19:18 GMT
Connecting to host remoteServer_IPADDR, port 5201
      Cookie: vm-test4.1430446758.532814.39107b692
      TCP MSS: 1448 (default)
[  4] local vm_IPADDR(VMXNET3) port 52901 connected to remoteServer_IPADDR port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 60 second test
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-10.00  sec   158 MBytes   132 Mbits/sec   46    189 KBytes
[  4]  10.00-20.00  sec   158 MBytes   132 Mbits/sec   23    209 KBytes
[  4]  20.00-30.00  sec   202 MBytes   170 Mbits/sec   22    238 KBytes
[  4]  30.00-40.00  sec   204 MBytes   171 Mbits/sec   33    219 KBytes
[  4]  40.00-50.00  sec   179 MBytes   150 Mbits/sec   10    197 KBytes
[  4]  50.00-60.00  sec   196 MBytes   165 Mbits/sec   15    130 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-60.00  sec  1.07 GBytes   153 Mbits/sec  149             sender
[  4]   0.00-60.00  sec  1.07 GBytes   153 Mbits/sec                  receiver
CPU Utilization: local/sender 0.5% (0.0%u/0.5%s), remote/receiver 3.1% (0.9%u/2.2%s)

iperf Done.

1分間でAverage取るとそんなに大差ない。
同一クラスタ配下のVM同士だと問題ないけど、Externalの通信だと安定しないのが気になる(*´∩ω・`)゚+.゚

結果をふまえて

通信経路上でボトルネックになってるところあるだろうし厳密なパフォーマンスの測定にはならないが、極端な差はないので好みなんだろうな。
でもkernelに含まれているのであればvmxnet3で良い気がする。
今回はCentOS6.Xでしか比較してないので、Windows系だとまた違うかも。

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5