Chinaunix

标题: porting netperf to 0015 target board [打印本页]

作者: edwinrong    时间: 2008-05-06 16:10
标题: porting netperf to 0015 target board

porting netperf to 0015 target board
System Development Department
By Edwin Rong
Last update: May. 6, 2008
1.       About netperf
Netperf is a benchmark that can be use to measure various aspect of networking performance. The primary foci are bulk (aka unidirectional) data transfer and request/response performance using either TCP or UDP and the Berkeley Sockets interface. As of this writing, the tests available either unconditionally or conditionally include:
TCP and UDP unidirectional transfer and request/response over IPv4 and IPv6 using the Sockets interface.
TCP and UDP unidirectional transfer and request/response over IPv4 using the XTI interface.
Link-level unidirectional transfer and request/response using the DLPI interface.
Unix domain sockets
SCTP unidirectional transfer and request/response over IPv4 and IPv6 using the sockets interface.
—netperf offical site
2.       Download netperf
google “netperf-2.4.0.tar.gz” on the Internet.
3.       Cross compile netperf-2.4.0.tar.gz
./configure CC=arm-linux-gcc --includedir=/opt/montavista/pro/devkit/arm/v5t_le/include/ --libdir=/opt/montavista/pro/devkit/arm/v5t_le/lib/ --host=arm-linux --prefix=/work/nfs_filesystem/target/work/tools/netperf_install

Error:
checking whether setpgrp takes no argument... configure: error: cannot check setpgrp when cross compiling

Solve it:
vim configure
line: 6091   ignore  exit(1)
      
/configure CC=arm-linux-gcc --includedir=/opt/montavista/pro/devkit/arm/v5t_le/include/ --libdir=/opt/montavista/pro/devkit/arm/v5t_le/lib/ --host=arm-linux --prefix=/work/nfs_filesystem/target/work/tools/netperf_install
make
make install

then, netperf and netserver are installed under directory “/work/tools/netperf_install” on the target filesystem.

4.       Profiling networking performance.
4.1 with loopback
root@192.168.167.133:/work/tools/netperf_install/bin#./netserver   //boot netperf server daemon
Starting netserver at port 12865
set_up_server could not establish a listen endpoint for  port 12865 with family AF_UNSPEC

root@192.168.167.133:/work/tools/netperf_install/bin#./netperf
Starting netserver at port 12865
set_up_server could not establish a listen endpoint for  port 12865 with family AF_UNSPEC
root@192.168.167.133:/work/tools/netperf_install/bin# ./netperf
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) 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    10.01      85.69

4.2 without lookback
Subsequently, profile the performace of transmission through TCP, the following command will transmit TCP packages to remotehost 192.168.167.131 for 10 seconds.
./netperf -H 192.168.167.131
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.167.131 (192.168.167.131) 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    10.02       7.60


Make measurement for UDP Stream transmition performance
./netperf -H 192.168.167.131 -t UDP_STREAM -- -m 1024
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.167.131 (192.168.167.131) port 0 AF_INET
Socket  Message  Elapsed      Messages
Size    Size     Time         Okay Errors   Throughput
bytes   bytes    secs            #      #   10^6bits/sec

103424    1024   10.01       11514      0       9.42
110592           10.01       11514              9.42

note:
netperf tool must be setup on the host:192.168.167.131 in advace.


Reference:
[1] http://pccluster.nchc.org.tw/xoops/modules/newbb/viewtopic.php?topic_id=846&forum
=1



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/43047/showart_677862.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2