トップ 差分 一覧 ソース 検索 ヘルプ PDF RSS ログイン

netperf

CentOS-6

インストール

CentOS-6 + RepoForge

  • yum repository インストール
# rpm -v --install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
  • インストール
# yum install netperf

FW設定

  • iptables 停止または iptables 設定+ポート指定

iptables 停止の場合

# service iptables stop

iptables 設定の場合

  • /etc/sysconfig/iptables 追加設定
-A INPUT -m state --state NEW -m tcp -p tcp --dport 12865:12866 -j ACCEPT
  • 標準 12865 ポートが制御用
  • 12866 ポートで試験するよう、netperf コマンドで指定
  • 指定がないと、ランダムに試験ポートが選ばれて iptables が拒否し失敗する。

失敗時

# netperf -H 192.168.61.6
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.61.6 (192.168.61.6) port 0 AF_INET
netperf: send_tcp_stream: data socket connect failed: No route to host
# /usr/sbin/tcpdump -i bond0 -n -s0 -vv host 192.168.61.5 and not port 12865
tcpdump: listening on bond0, link-type EN10MB (Ethernet), capture size 65535 bytes
02:08:07.920666 IP (tos 0x0, ttl 64, id 31669, offset 0, flags [DF], proto TCP (6), length 60)
   192.168.61.6.12867 > 192.168.61.5.37522: Flags [S], cksum 0xd4ba (correct), seq 4073764023, win 14600, options [mss 1460,sackOK,TS val 58773250 ecr 0,nop,wscale 7], length 0
02:08:07.920756 IP (tos 0xc0, ttl 64, id 40139, offset 0, flags [none], proto ICMP (1), length 88)
   192.168.61.5 > 192.168.61.6: ICMP host 192.168.61.5 unreachable - admin prohibited, length 68
       IP (tos 0x0, ttl 64, id 31669, offset 0, flags [DF], proto TCP (6), length 60)
   192.168.61.6.12867 > 192.168.61.5.37522: Flags [S], cksum 0xd4ba (correct), seq 4073764023, win 14600, options [mss 1460,sackOK,TS val 58773250 ecr 0,nop,wscale 7], length 0

利用

サーバ側

# netserver

クライアント側

# netperf -H 192.168.61.5 -- -P 12866

結果

if mode 転送速度(MBps)
eth0 --
bond0 0:balance-rr x3 2243.9
bond0 0:balance-rr x2 1708.0
bond0 1:active-standby x3 941.45
bond0 2:balance-xor x3 941.2
bond0 3:broadcast x3 268.8
bond0 4:802.3ad
bond0 5:balance-tlb 934.7
bond0 6:balance-alb 921.7
  • PC1 HP ML110G7, Xeon 1220, RAM32G, HDD250G, CentOS-6.3, NIC e1000 x3
  • ethernet SW: Netgear GS110T 1G x 8port
  • PC2 HP ML110G7, Xeon 1220, RAM32G, HDD250G, CentOS-6.3, NIC e1000 x3

active-standby 1G x3

  • mode=1 active-standby
  • e1000e x3
# netperf -H 192.168.61.5 -- -P 12866
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 12866 AF_INET to 192.168.61.5 (192.168.61.5) port 12866 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

87380  16384  16384    10.03     941.45
87380  16384  16384    10.03     941.44
87380  16384  16384    10.03     941.45

balance-rr 1G x3

  • mode=0 balance-rr
  • e1000e x3
[root@ml110b nonaka]# netperf -H 192.168.61.5 -- -P 12866
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 12866 AF_INET to 192.168.61.5 (192.168.61.5) port 12866 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

87380  16384  16384    10.00    2243.21
87380  16384  16384    10.00    2238.71
87380  16384  16384    10.00    2249.81

balance-rr 1G x2

  • mode=0 balance-rr
  • e1000 x2
[root@ml110b nonaka]# netperf -H 192.168.61.5 -- -P 12866
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 12866 AF_INET to 192.168.61.5 (192.168.61.5) port 12866 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec
87380  16384  16384    10.00    1712.52
87380  16384  16384    10.00    1704.04
87380  16384  16384    10.00    1707.50

balance-xor 1G x3

  • mode=2 balance-xor
  • e1000e x3
[root@ml110b nonaka]# netperf -H 192.168.61.5 -- -P 12866
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 12866 AF_INET to 192.168.61.5 (192.168.61.5) port 12866 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

87380  16384  16384    10.03     941.43
87380  16384  16384    10.03     941.03
87380  16384  16384    10.03     941.36

broadcast 1G x3

  • mode=3 broadcast
  • e1000e x3
[root@ml110b nonaka]# netperf -H 192.168.61.5 -- -P 12866
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 12866 AF_INET to 192.168.61.5 (192.168.61.5) port 12866 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

87380  16384  16384    10.01     269.27
87380  16384  16384    10.01     246.93
87380  16384  16384    10.01     290.17

1G x3 balance-tlb

  • mode=5 balance-tlb
  • e1000e x3
[root@ml110b nonaka]# netperf -H 192.168.61.5 -- -P 12866
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 12866 AF_INET to 192.168.61.5 (192.168.61.5) port 12866 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

87380  16384  16384    10.03     941.44
87380  16384  16384    10.03     922.08
87380  16384  16384    10.03     941.39

1G x3 balance-alb

  • mode=6 balance-alb
  • e1000e x3
[root@ml110b nonaka]# netperf -H 192.168.61.5 -- -P 12866
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 12866 AF_INET to 192.168.61.5 (192.168.61.5) port 12866 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

87380  16384  16384    10.03     921.68
87380  16384  16384    10.03     921.78
87380  16384  16384    10.03     921.68