KVM - VM 間スループット

Celeron G530 機上の KVM と VM でどの程度通信スループットが出るのか試してみました。

結果

  • 9Gbps 超: KVM-VM 間
  • 4Gbps 超: 同一 KVM 上の VM-VM 間

------"GbE の壁"------

  • 900Mbps 未満: KVM

構成

ゲストもホストも Ubuntu 12.04LTS

  • 参考にしたインストール記事へのリンクを本文の一番最後に添付
----------------------+
<iperf1><iperf2> # vm |
 |.7     |.11         |
 | +-----+            |
(br0).4          kvm01|
[eth0]----------------+
 |
GbE 10.5.255.0/16
 |
[eth0]----------------+
(br0).5               |
 |                    |
 |.12                 |
<iperf3> # vm    kvm02|
----------------------+

kvm01 と kvm02 は CPU、マザー、メモリ、電源、SSD 全て同じ構成

kvm01$ cat /proc/cpuinfo |grep CPU
model name      : Intel(R) Celeron(R) CPU G530 @ 2.40GHz
model name      : Intel(R) Celeron(R) CPU G530 @ 2.40GHz
kvm02$ cat /proc/cpuinfo |grep CPU
model name      : Intel(R) Celeron(R) CPU G530 @ 2.40GHz
model name      : Intel(R) Celeron(R) CPU G530 @ 2.40GHz

測定

異なる KVM 上の VM 間通信

iperf1 > iperf3 : 875Mbps

iperf1:~$ iperf -c 10.5.255.12
------------------------------------------------------------
Client connecting to 10.5.255.12, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.7 port 58488 connected with 10.5.255.12 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.02 GBytes   875 Mbits/sec
iperf1:~$ iperf -c 10.5.255.12
------------------------------------------------------------
Client connecting to 10.5.255.12, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.7 port 58489 connected with 10.5.255.12 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.02 GBytes   875 Mbits/sec
iperf1:~$ iperf -c 10.5.255.12
------------------------------------------------------------
Client connecting to 10.5.255.12, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.7 port 58490 connected with 10.5.255.12 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.02 GBytes   875 Mbits/sec
iperf1:~$

kvm01 上の VM 間通信

iperf1 > iperf2 : 4.6Gbps 前後

iperf1:~$ iperf -c 10.5.255.11
------------------------------------------------------------
Client connecting to 10.5.255.11, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.7 port 58255 connected with 10.5.255.11 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  5.41 GBytes  4.64 Gbits/sec
iperf1:~$ iperf -c 10.5.255.11
------------------------------------------------------------
Client connecting to 10.5.255.11, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.7 port 58256 connected with 10.5.255.11 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  5.39 GBytes  4.63 Gbits/sec
iperf1:~$ iperf -c 10.5.255.11
------------------------------------------------------------
Client connecting to 10.5.255.11, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.7 port 58257 connected with 10.5.255.11 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  5.29 GBytes  4.54 Gbits/sec
iperf1:~$

kvm01 上の KVM - VM 間通信

iperf1 > kvm01 : 9Gbps 超

iperf1:~$ iperf -c 10.5.255.4
------------------------------------------------------------
Client connecting to 10.5.255.4, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.7 port 43187 connected with 10.5.255.4 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  10.8 GBytes  9.25 Gbits/sec
iperf1:~$ iperf -c 10.5.255.4
------------------------------------------------------------
Client connecting to 10.5.255.4, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.7 port 43188 connected with 10.5.255.4 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  10.8 GBytes  9.27 Gbits/sec
atom@iperf1:~$ iperf -c 10.5.255.4
------------------------------------------------------------
Client connecting to 10.5.255.4, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.7 port 43189 connected with 10.5.255.4 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  10.8 GBytes  9.26 Gbits/sec
iperf1:~$

おまけ

kvm01 > kvm01 : 37Gbps

kvm01:~# iperf -c 10.5.255.4
------------------------------------------------------------
Client connecting to 10.5.255.4, TCP port 5001
TCP window size:  169 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.4 port 50566 connected with 10.5.255.4 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  43.4 GBytes  37.3 Gbits/sec
kvm01:~# iperf -c 10.5.255.4
------------------------------------------------------------
Client connecting to 10.5.255.4, TCP port 5001
TCP window size:  169 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.4 port 50567 connected with 10.5.255.4 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  43.2 GBytes  37.1 Gbits/sec
kvm01:~# iperf -c 10.5.255.4
------------------------------------------------------------
Client connecting to 10.5.255.4, TCP port 5001
TCP window size:  169 KByte (default)
------------------------------------------------------------
[  3] local 10.5.255.4 port 50568 connected with 10.5.255.4 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  42.1 GBytes  36.2 Gbits/sec
kvm01:~#

対ローカルホストはさておき、KVM-VM 間のスループットは VM 間の倍速いぞと。

参考

もし 12.04LTS にこだわりがなければ、12.10 版の記事が 1NIC 構成かつコピペでセットアップできるのでオススメ