HP-UX TCP/IP Performance White Paper, March 2008

39
6.3.1 Measuring Throughput with Netperf Bulk Data transfer
Using the netperf bulk data transfer feature is useful for verifying the throughput between two hosts and
measure available bandwidth between two hosts.
On remote host B, start the netserver:
# netserver
Starting netserver at port 12865
Run netperf from host A:
# netperf -H hpipxprlan2 -l 60 -t TCP_STREAM -- -m 32768
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to hpipxprlan2
(192.168.138.160) port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
32768 32768 32768 60.01 94.48
The default socket buffer size at the receiving side is 32768 bytes. The default socket buffer size at the
sending side is 32768 bytes. The message size is 32768, specified using -m option. The elapsed time is
60.01 seconds specified using -l option. The throughput obtained is 94.48 M bits/s.
6.3.2 Measuring Transaction Rate with Netperf request/response:
Request/response (RR) performance is often overlooked, yet it is just as important as bulk-transfer
performance. Netperf request/response traffic will be useful to simulate bursty types of network traffic such
as OLTP and short web transactions.
While a bulk-transfer test reports its results in units of bits or bytes transferred per second, an RR test reports
transactions per second where a transaction is defined as the completed exchange of a request and a
response. One can invert the transaction rate to arrive at the average round-trip latency.
Here is a sample of netperf request/response collected on host A:
# netperf -H hpipxprlan2 -l 60 -t TCP_RR -- -r 128,1024
TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
hpipxprlan2 (192.168.138.160) port 0 AF_INET
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
32768 32768 128 1024 60.01 4998.65
32768 32768
The default socket buffer size at the receiving side is 32768 bytes. The default socket buffer size at the send
side is 32768 bytes. The request size is 128 bytes as specified by -r option. The response size is 1024
bytes as specified by the -r option. The elapsed time is 60.01 seconds specified using -l option. The
transaction rate obtained is 4998.65 transactions per second.