????Netperf?????????????????????????????TCP??UDP?????Netperf????????????????в?????????????????????????????????(bulk data transfer)????/?????(request/response)????Netperf???????????????????????????????????????????????????????????????????????????????
????Netperf??????client/server?????????server????netserver??????????????client????????client????netperf????????server??????????????client??server???????????????????????????й?????????????????????????????????????????????????????????client??server????????????????????????????????????????????????????????????
????1.????
????????????http://www.netperf.org/netperf/
???????????????°汾?????????????????
???????????????????netperf-2.6.0.tar
????2.???
????$ tar -xvf netperf-2.6.0.tar
????3.???
????$ cd netperf-2.6.0
????$ ./configure
????$ make
????$ make install
????4.?????????????????
????$ netserver
????5.???п????
????$ netperf -H host -l testlen -t  testname
?????????????
????-H host:  ??????????netserver??server ip???
????-l testlen: ????????????????
????-t testname: ??????е?????????????TCP_STREAM?? UDP_STREAM?? TCP_RR??UDP_RR?? TCP_CRR
????6. ???????
????(1)??????????У???ip: 10.10.11.208??

 

[root@phpc1 netperf-2.6.0]# netserver
Starting netserver with host 'IN(6)ADDR_ANY' port '12865' and family AF_UNSPEC
[root@phpc1 netperf-2.6.0]#

????(2)?????????

 

[root@phpc2 netperf-2.6.0]# netperf -H 10.10.11.208 -l 60 -t TCP_STREAM
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.10.11.208 () port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec
87380  16384  16384    60.03     [root@phpc2 netperf-2.6.0]# netperf -H 10.10.11.208 -l 60 -t TCP_STREAM
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.10.11.208 () port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec
87380  16384  16384    60.03     937.04

??????netperf?????????????????????????????
????(a) ?????(??server)????С?87380????socket?????????
????(b)??????(??client)????С?16384????socket?????????
????(c)???????????????????С?16384???
????(d)?????????????60??
????(e)??????????????  937.04 ??10^6bits/sec
????????????£?netperf????????????С?????????????socket????????С
????TCP_STREAM?????????????????????????????
??????s size?????????????socket?????????????С
??????S size:  ???????????socket?????????????С
??????m size?? ?????????????????????С
??????M size:  ?????????????????????С
??????D: ??????????????socket????TCP_NODELAY???I/O?????
???????????????????????? dbs?? iperf?? pathrate?? nettest?? netlogger?? tcptrace?? ntop.
????7.???????????
????(1)TCP????????
????????TCPЭ???????????????????????????????????ó?????á????????????????????????????TCPЭ?鱣????????????罨?????????????????????????????????????????????????
????netperf???????????????????tcp????????
????(a)????TCP???????????bulk??????????????
????(b)????TCP?????client????/server??????
????(c)???TCP?????????????????????/????
????(2)UDP????????
????UDP??н?????????????????udp???????????????????????udp???????????и???????????????飬????????????飬netperf???????????udp????????
????(a) ??client??server?????????????
????(b)????/????
????????udp?????????????????netperf????????????????????С????????????????С??????????????netperf??????????????????????????????????????????????????????????????ó??????