IBM REDP-4285-00 User Manual

Page of 170
4285ch02.fm
Draft Document for Review May 4, 2007 11:35 am
74
 
Linux Performance and Tuning Guidelines
netserver
, generates network traffic, gets the result from 
netserver
 via a control connection 
which is separated from the actual benchmark traffic connection. During the benchmarking, 
no communication occurs on the control connection so it does not have any effect on the 
result. The netperf benchmark tool also has a reporting capability including a CPU utilization 
report. The current stable version is 2.4.3 at the time of writing.
netperf
 can generate several types of traffic. Basically these fall into the two categories: bulk 
data transfer traffic and request/response type traffic. One thing you should keep in mind is 
netperf uses only one socket at a time. The next version of netperf (netperf4) will fully support 
benchmarking for concurrent session. At this time, we can perform multiple session 
benchmarking as described below.
򐂰
Bulk data transfer
Bulk data transfer is most commonly measured factor when it comes to network 
benchmarking. The bulk data transfer is measured by the amount of data transferred in 
one second. It simulates large file transfer such as multimedia streaming, FTP data 
transfer.
򐂰
Request/response type
This simulate request/response type traffic which is measured by the number of 
transactions exchanged in one second. Request/response traffic type is typical for online 
transaction application such as web server, database server, mail server, file server which 
serves small or medium files and directory server. In real environment, session 
establishment and termination should be performed as well as data exchange. To simulate 
this, TCP_CRR type was introduced.
򐂰
Concurrent session
netperf
 does not have real support for concurrent multiple session benchmarking in the 
current stable version, but we can perform some benchmarking by just issuing multiple 
instances of netperf as follows:
for i in ‘seq 1 10‘; do netperf -t TCP_CRR -H target.example.com -i 10 -P 0 
&; done
We’ll take a brief look at some useful and interesting options.
Global options:
-A
Change send and receive buffer alignment on remote system
-b
Burst of packet in stream test
-H
 <remotehost>
Remote host
-t
 <testname>
Test traffic type
TCP_STREAM
Bulk data transfer benchmark
TCP_MAERTS
Similar to TCP_STREAM except direction of stream is opposite.
TCP_SENDFILE
Similar to TCP_STREAM except using sendfile() instead of 
send()
. It causes a zero-copy operation.
UDP_STREAM
Same as TCP_STREAM except UDP is used.
TCP_RR
Request/response type traffic benchmark
TCP_CC
TCP connect/close benchmark. No request and response packet is 
exchanged.
TCP_CRR
Performs connect/request/response/close operation. It’s very much 
like HTTP1.0/1.1 session with HTTP keepalive disabled.
UDP_RR
Same as TCP_RR except UDP is used.