Introduction netperf is a powerful tool for testing network bandwidth and latency. it can test the performance of TCP and UDP. Installation environment Operating system: CentOS5.6 kernel: 2.6.18 network: Gigabit Ethernet compilation, installation source code: ftp://ftp.netperf.org/netperf/netperf-2.5.0.tar.gzcompilation installation :tarzxvfnetpe introduction
Netperf is a powerful tool for testing network bandwidth and latency. it can test the performance of TCP and UDP.
Installation environment
Operating system: CentOS 5.6
Kernel: 2.6.18
Network: Gigabit Ethernet
Compile and install source code
: Ftp://ftp.netperf.org/netperf/netperf-2.5.0.tar.gz
Compile and install:
tar zxvf netperf-2.5.0.tar.gzcd netperf-2.5.0./configuremakemake install
Main netperf parameters
- -H: server address
- -L: test time (seconds)
- -P: listening port
- -T: test type, including TCP_STREAM, UDP_STREAM, TCP_RR, TCP_CRR, and UDP_RR. If no type is specified, the default value is TCP_STREAM.
- TCP_STREAM: transmits batch data through a single TCP connection
- UDP_STREAM: Batch data transmission through UDP
- TCP_RR: send a request/response through a single TCP connection
- TCP_CRR: Send requests/responses through multiple TCP connections
- UDP_RR: send a request/response through UDP
Test
The test is mainly divided into two parts: the server and the client. the server runs netserver on one host, and the server runs on the other ?? Run the client netperf and start the test. The following describes how to test the transmission of batch data through a single TCP connection.
Start the server:
netserver -D -p 4444
The server opens port 4444 for listening.
Start the client:
netperf -H server -p 4444 -l 60
The client connects to port 4444 of the server. the test time is 60 seconds.
The test results are as follows:
Recv Send SendSocket Socket Message ElapsedSize Size Size Time Throughputbytes bytes bytes secs. 10^6bits/sec 87380 16384 16384 60.03 881.21
The test result shows that the throughput is 881.21 Mb/s, which is about 110 MB/s.