瀏覽單個文章
cmwang
Elite Member
 

加入日期: May 2002
您的住址: 板橋
文章: 5,106
鵝來貼個linux下的測試結果好了...BTW,測試環境是以約2m的CAT5e直接對接,client是S754的Sempron2500+1GB DDR400+PCI-E 88E8053,server是AM2的Sempron3000+2GB DDRII667+MCP51內建的GbE(PHY也是Marvell的),沒開Jumbo Frame(因為linux不知為何沒辦法開off loading及Jumbo Frame等功能)....

只開一個connection,88E8053 default有開offloading時

root@lab01:~# ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp segmentation offload: on
root@lab01:~# time iperf -c 192.168.1.115
------------------------------------------------------------
Client connecting to 192.168.1.115, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 5] local 192.168.1.110 port 56285 connected with 192.168.1.115 port 5001
[ 5] 0.0-10.0 sec 1.09 GBytes 938 Mbits/sec

real 0m10.035s
user 0m0.064s
sys 0m2.008s

throughput約938Mbps,CPU loading約20%....

同上,關閉所有off loading....

root@lab01:~# ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: off
tx-checksumming: off
scatter-gather: off
tcp segmentation offload: off
root@lab01:~# time iperf -c 192.168.1.115
------------------------------------------------------------
Client connecting to 192.168.1.115, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 5] local 192.168.1.110 port 56286 connected with 192.168.1.115 port 5001
[ 5] 0.0-10.0 sec 998 MBytes 837 Mbits/sec

real 0m10.020s
user 0m0.044s
sys 0m3.308s

throughput下降約10%,CPU loading由20%上升到33%(約60%)....

重新打開所有off loading,開10個connection....

root@lab01:~# ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp segmentation offload: on
root@lab01:~# time iperf -c 192.168.1.115 -P10
------------------------------------------------------------
Client connecting to 192.168.1.115, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 5] local 192.168.1.110 port 36511 connected with 192.168.1.115 port 5001
[ 6] local 192.168.1.110 port 36512 connected with 192.168.1.115 port 5001
[ 7] local 192.168.1.110 port 36513 connected with 192.168.1.115 port 5001
[ 8] local 192.168.1.110 port 36514 connected with 192.168.1.115 port 5001
[ 9] local 192.168.1.110 port 36515 connected with 192.168.1.115 port 5001
[ 14] local 192.168.1.110 port 36520 connected with 192.168.1.115 port 5001
[ 10] local 192.168.1.110 port 36516 connected with 192.168.1.115 port 5001
[ 11] local 192.168.1.110 port 36517 connected with 192.168.1.115 port 5001
[ 12] local 192.168.1.110 port 36518 connected with 192.168.1.115 port 5001
[ 13] local 192.168.1.110 port 36519 connected with 192.168.1.115 port 5001
[ 5] 0.0-10.0 sec 113 MBytes 94.8 Mbits/sec
[ 6] 0.0-10.0 sec 113 MBytes 94.7 Mbits/sec
[ 7] 0.0-10.0 sec 113 MBytes 94.7 Mbits/sec
[ 9] 0.0-10.0 sec 112 MBytes 94.3 Mbits/sec
[ 10] 0.0-10.0 sec 112 MBytes 93.7 Mbits/sec
[ 8] 0.0-10.0 sec 113 MBytes 94.6 Mbits/sec
[ 14] 0.0-10.0 sec 112 MBytes 94.0 Mbits/sec
[ 11] 0.0-10.0 sec 112 MBytes 93.9 Mbits/sec
[ 13] 0.0-10.0 sec 112 MBytes 93.8 Mbits/sec
[ 12] 0.0-10.0 sec 112 MBytes 93.8 Mbits/sec
[SUM] 0.0-10.0 sec 1.10 GBytes 939 Mbits/sec

real 0m10.086s
user 0m0.080s
sys 0m2.044s

CPU loading及throughput都與開一個connection時約略相當....

同上,關閉所有off loading....

root@lab01:~# ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: off
tx-checksumming: off
scatter-gather: off
tcp segmentation offload: off
root@lab01:~# time iperf -c 192.168.1.115 -P10
------------------------------------------------------------
Client connecting to 192.168.1.115, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 14] local 192.168.1.110 port 58168 connected with 192.168.1.115 port 5001
[ 5] local 192.168.1.110 port 58159 connected with 192.168.1.115 port 5001
[ 6] local 192.168.1.110 port 58160 connected with 192.168.1.115 port 5001
[ 7] local 192.168.1.110 port 58161 connected with 192.168.1.115 port 5001
[ 8] local 192.168.1.110 port 58162 connected with 192.168.1.115 port 5001
[ 9] local 192.168.1.110 port 58163 connected with 192.168.1.115 port 5001
[ 10] local 192.168.1.110 port 58164 connected with 192.168.1.115 port 5001
[ 11] local 192.168.1.110 port 58165 connected with 192.168.1.115 port 5001
[ 12] local 192.168.1.110 port 58166 connected with 192.168.1.115 port 5001
[ 13] local 192.168.1.110 port 58167 connected with 192.168.1.115 port 5001
[ 6] 0.0- 7.0 sec 71.8 MBytes 86.0 Mbits/sec
[ 9] 0.0- 7.0 sec 71.3 MBytes 85.4 Mbits/sec
[ 11] 0.0- 7.0 sec 69.8 MBytes 83.7 Mbits/sec
[ 12] 0.0- 7.0 sec 69.8 MBytes 83.6 Mbits/sec
[ 5] 0.0- 7.0 sec 71.5 MBytes 85.6 Mbits/sec
[ 7] 0.0- 7.0 sec 71.7 MBytes 85.8 Mbits/sec
[ 8] 0.0- 7.0 sec 70.2 MBytes 83.9 Mbits/sec
[ 10] 0.0- 7.0 sec 71.5 MBytes 85.5 Mbits/sec
[ 13] 0.0- 7.0 sec 71.1 MBytes 85.1 Mbits/sec
[ 14] 0.0-10.0 sec 372 MBytes 312 Mbits/sec
[SUM] 0.0-10.0 sec 1010 MBytes 847 Mbits/sec

real 0m13.027s
user 0m0.068s
sys 0m3.960s

throughput約略與只開一個connection關off loading時相當,CPU loading由33%上升至40%(約20%)....

總結看來還不錯(吃CPU沒想像中的兇)....BTW,鵝發現iperf在M$ Win中開的buffer(TCP win)有點小---default只有8k,不知是否是iperf win32版binary版本較舊所致,若調大時(i.e. -w 64k)對throughput有不小的助益,測試結果不理想者可以試試....
__________________
士大夫之無恥,是謂國恥....
舊 2006-09-16, 09:06 PM #48
回應時引用此文章
cmwang現在在線上