iperf-检测网络带宽工具

今天X淘上入手了一个千兆交换机,于是找来iperf工具来检测交换机性能如何

https://code.google.com/p/iperf/wiki/ManPage

设备:1笔记本、1台式机都是千兆网卡,连上交换机,千兆指示灯亮起,说明设备都正常

开始测试:

1、选定台式机作为server

D:\TDDOWNLOAD\jperf-2.0.0\bin>iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 8.00 KByte (default)
------------------------------------------------------------

 2、选定笔记本作为client

C:\cdown\jperf-2.0.0\bin>iperf -c 10.12.12.46 -t 60
------------------------------------------------------------
Client connecting to 10.12.12.46, TCP port 5001
TCP window size: 8.00 KByte (default)
------------------------------------------------------------
[128] local 10.12.12.48 port 61429 connected with 10.12.12.46 port 5001
[ ID] Interval       Transfer     Bandwidth
[128]  0.0-60.0 sec  1.75 GBytes   250 Mbits/sec

测试结果:31.25MB

3、每隔2s输出一次,增加参数-i 2,结果也差不多

C:\cdown\jperf-2.0.0\bin>iperf -c 10.12.12.46 -t 60 -i 2
------------------------------------------------------------
Client connecting to 10.12.12.46, TCP port 5001
TCP window size: 8.00 KByte (default)
------------------------------------------------------------
[128] local 10.12.12.48 port 61453 connected with 10.12.12.46 port 5001
[ ID] Interval       Transfer     Bandwidth
[128]  0.0- 2.0 sec  57.3 MBytes   240 Mbits/sec
[128]  2.0- 4.0 sec  60.1 MBytes   252 Mbits/sec
[128]  4.0- 6.0 sec  57.1 MBytes   240 Mbits/sec
[128]  6.0- 8.0 sec  53.3 MBytes   223 Mbits/sec
[128]  8.0-10.0 sec  59.9 MBytes   251 Mbits/sec
[128] 10.0-12.0 sec  60.6 MBytes   254 Mbits/sec

4、总结:1000Mbps理论上应该有1000Mbps/8=125MB,但实际只有31M,看来价格便宜确实质量一般啊,实际在传输文件时,最大也可以达到50M,但和理论值相差甚远,不过比百兆比起快多了哈!

------------------------------------------------------------------------------------

5、补充:

-l:缓冲区大小,默认8KB

-w:tcp窗口,默认8KB

-d:同时双向传输测试

修改之后,测试结果和之前相差还蛮大的

D:\TDDOWNLOAD\jperf-2.0.0\bin>iperf -s -w 1M -l 1M
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 1.00 MByte
------------------------------------------------------------

 

C:\cdown\jperf-2.0.0\bin>iperf -c 10.12.12.46 -t 60 -i 2 -w 1M
------------------------------------------------------------
Client connecting to 10.12.12.46, TCP port 5001
TCP window size: 1.00 MByte
------------------------------------------------------------
[128] local 10.12.12.48 port 62200 connected with 10.12.12.46 port 5001
[ ID] Interval       Transfer     Bandwidth
[128]  0.0- 2.0 sec   136 MBytes   569 Mbits/sec
[128]  2.0- 4.0 sec   134 MBytes   561 Mbits/sec
[128]  4.0- 6.0 sec   136 MBytes   571 Mbits/sec
[128]  6.0- 8.0 sec   136 MBytes   571 Mbits/sec
[128]  8.0-10.0 sec   136 MBytes   571 Mbits/sec
[128]  0.0-10.3 sec   695 MBytes   568 Mbits/sec

 

C:\cdown\jperf-2.0.0\bin>iperf -c 10.12.12.46 -t 60 -i 2 -w 1M -d
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 1.00 MByte
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 10.12.12.46, TCP port 5001
TCP window size: 1.00 MByte
------------------------------------------------------------
[136] local 10.12.12.48 port 62224 connected with 10.12.12.46 port 5001
[160] local 10.12.12.48 port 5001 connected with 10.12.12.46 port 51787
[ ID] Interval       Transfer     Bandwidth
[136]  0.0- 2.0 sec  95.9 MBytes   402 Mbits/sec
[160]  0.0- 2.0 sec   182 MBytes   765 Mbits/sec
[136]  2.0- 4.0 sec   130 MBytes   544 Mbits/sec
[160]  2.0- 4.0 sec  98.0 MBytes   411 Mbits/sec
[136]  4.0- 6.0 sec   131 MBytes   548 Mbits/sec
[160]  4.0- 6.0 sec   113 MBytes   475 Mbits/sec
[136]  6.0- 8.0 sec   124 MBytes   521 Mbits/sec
[160]  6.0- 8.0 sec   155 MBytes   651 Mbits/sec

 

参考

1)http://blog.chinaunix.net/uid-14730816-id-136436.html

2)http://blog.csdn.net/miss_acha/article/details/7988885

猜你喜欢

转载自mingren135.iteye.com/blog/1889363
今日推荐