VIFのlocking-modeに関してはマニュアルに書いてある通り。
端的にいうと、VIF側で利用できるIPアドレスを制限しちゃおうという機能。
試験環境
Dom0:XS62SP1(patch:-5)
PM:CentOS6.4からVM:CentOSのApache上の1MBファイルをabで取得する。
VIF状態
[root@txs01 ~]# xe vif-param-list uuid=61694e93-42d6-465e-3fc0-2f214b973884abの結果(設定前)
uuid ( RO) : 61694e93-42d6-465e-3fc0-2f214b973884
vm-uuid ( RO): 7aa322f7-b272-c936-f4e4-55b522c7eec1
vm-name-label ( RO): CentOS-130-Apache
allowed-operations (SRO): attach; unplug
current-operations (SRO):
device ( RO): 1
MAC ( RO): 06:06:3e:45:cb:70
MAC-autogenerated ( RO): true
MTU ( RO): 1500
currently-attached ( RO): true
qos_algorithm_type ( RW):
qos_algorithm_params (MRW): kbps: 1000
qos_supported_algorithms (SRO):
other-config (MRW):
network-uuid ( RO): 1deba6e0-7167-8287-b428-0f142baa8a85
network-name-label ( RO): VLAN901
io_read_kbs ( RO): 0.000
io_write_kbs ( RO): 0.000
locking-mode ( RW): network_default
ipv4-allowed (SRW):
ipv6-allowed (SRW):
Server Software: Apache/2.2.3
Server Hostname: 10.0.1.130
Server Port: 80
Document Path: /index.html
Document Length: 1024000 bytes
Concurrency Level: 100
Time taken for tests: 8.759 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 1026769248 bytes
HTML transferred: 1026498438 bytes
Requests per second: 114.16 [#/sec] (mean)
Time per request: 875.935 [ms] (mean)
Time per request: 8.759 [ms] (mean, across all concurrent requests)
Transfer rate: 114472.43 [Kbytes/sec] received
<SNAP>
Total transferred: 1026800112 bytes
HTML transferred: 1026529302 bytes
Requests per second: 113.86 [#/sec] (mean)
Time per request: 878.284 [ms] (mean)
Time per request: 8.783 [ms] (mean, across all concurrent requests)
Transfer rate: 114169.77 [Kbytes/sec] received
<SNAP>
Total transferred: 1024270000 bytes
HTML transferred: 1024000000 bytes
Requests per second: 114.43 [#/sec] (mean)
Time per request: 873.907 [ms] (mean)
Time per request: 8.739 [ms] (mean, across all concurrent requests)
Transfer rate: 114458.81 [Kbytes/sec] received
DEVTYPE=bridge: Rx=0.948 Gbit/s, Tx=0.006 Gbit/s
|- netback/0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif3.0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/1: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif3.1: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/2: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif12.0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/3: Rx=0.948 Gbit/s, Tx=0.006 Gbit/s
| |- vif12.1: Rx=0.948 Gbit/s, Tx=0.006 Gbit/s
DEVTYPE=bridge: Rx=0.949 Gbit/s, Tx=0.006 Gbit/s
|- netback/0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif3.0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/1: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif3.1: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/2: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif12.0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/3: Rx=0.949 Gbit/s, Tx=0.006 Gbit/s
| |- vif12.1: Rx=0.949 Gbit/s, Tx=0.006 Gbit/s
DEVTYPE=bridge: Rx=0.947 Gbit/s, Tx=0.006 Gbit/s
|- netback/0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif3.0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/1: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif3.1: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/2: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif12.0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/3: Rx=0.947 Gbit/s, Tx=0.006 Gbit/s
| |- vif12.1: Rx=0.947 Gbit/s, Tx=0.006 Gbit/s
1GbpsNIC環境ならこんなもんですね。
設定変更
まず、ipvX-allowedを指定せずに locking-mode を locked に変更[root@xs01 ~]# xe vif-param-set uuid=61694e93-42d6-465e-3fc0-2f214b973884 locking-mode=locked
[root@xs01 ~]# xe vif-param-list uuid=61694e93-42d6-465e-3fc0-2f214b973884
uuid ( RO) : 61694e93-42d6-465e-3fc0-2f214b973884
vm-uuid ( RO): 7aa322f7-b272-c936-f4e4-55b522c7eec1
vm-name-label ( RO): CentOS
allowed-operations (SRO): attach; unplug
current-operations (SRO):
device ( RO): 1
MAC ( RO): 06:06:3e:45:cb:70
MAC-autogenerated ( RO): true
MTU ( RO): 1500
currently-attached ( RO): true
qos_algorithm_type ( RW):
qos_algorithm_params (MRW): kbps: 1000
qos_supported_algorithms (SRO):
other-config (MRW):
network-uuid ( RO): 1deba6e0-7167-8287-b428-0f142baa8a85
network-name-label ( RO): VLAN01
io_read_kbs ( RO): 0.000
io_write_kbs ( RO): 0.000
locking-mode ( RW): locked
ipv4-allowed (SRW):
ipv6-allowed (SRW):
外部(PM)からPINGが飛ばなくなった。
次に、IPを設定してやる。
[root@xs01 ~]# xe vif-param-set uuid=61694e93-42d6-465e-3fc0-2f214b973884 ipv4-allowed=10.0.1.130 ipv6-allowed=fe80::406:3eff:fe45:cb70
[root@xs01 ~]# xe vif-param-list uuid=61694e93-42d6-465e-3fc0-2f214b973884
uuid ( RO) : 61694e93-42d6-465e-3fc0-2f214b973884
vm-uuid ( RO): 7aa322f7-b272-c936-f4e4-55b522c7eec1
vm-name-label ( RO): CentOS
allowed-operations (SRO): attach; unplug
current-operations (SRO):
device ( RO): 1
MAC ( RO): 06:06:3e:45:cb:70
MAC-autogenerated ( RO): true
MTU ( RO): 1500
currently-attached ( RO): true
qos_algorithm_type ( RW):
qos_algorithm_params (MRW): kbps: 1000
qos_supported_algorithms (SRO):
other-config (MRW):
network-uuid ( RO): 1deba6e0-7167-8287-b428-0f142baa8a85
network-name-label ( RO): VLAN01
io_read_kbs ( RO): 0.084
io_write_kbs ( RO): 0.056
locking-mode ( RW): locked
ipv4-allowed (SRW): 10.0.1.130
ipv6-allowed (SRW): fe80::406:3eff:fe45:cb70
PINGが飛ぶようになった。
レスポンスは
DEVTYPE=bridge: Rx=0.947 Gbit/s, Tx=0.006 Gbit/s
|- netback/0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif3.0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/1: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif3.1: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/2: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif16.0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/3: Rx=0.947 Gbit/s, Tx=0.006 Gbit/s
| |- vif16.1: Rx=0.947 Gbit/s, Tx=0.006 Gbit/s
DEVTYPE=bridge: Rx=0.947 Gbit/s, Tx=0.006 Gbit/s
|- netback/0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif3.0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/1: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif3.1: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/2: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
| |- vif16.0: Rx=0.000 Gbit/s, Tx=0.000 Gbit/s
|- netback/3: Rx=0.947 Gbit/s, Tx=0.006 Gbit/s
| |- vif16.1: Rx=0.947 Gbit/s, Tx=0.006 Gbit/s
Total transferred: 1026134032 bytes
HTML transferred: 1025863492 bytes
Requests per second: 114.22 [#/sec] (mean)
Time per request: 875.518 [ms] (mean)
Time per request: 8.755 [ms] (mean, across all concurrent requests)
Transfer rate: 114456.18 [Kbytes/sec] received
locking-modeを利用しても、1GbpsNICの環境では特に劣化は見られなかった。
なお、複数IPを許可したい場合には、単純に複数記述してやればよい。
参考)
vif-param-add
http://discussions.citrix.com/topic/351462-vif-param-add/
0 件のコメント:
コメントを投稿