Sungkyunkwan University
NetPerf
2006. 04. 19
Lee, Sang Ho
[email protected]
Copyright 2006 Networking Laboratory
Contents

Introduction

Features

Installation

Configuration

Result

Reference sites
PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 2/17
Introduction

Netperf is a benchmark that can be used to measure various aspects of
networking performance.

supported by the IND Networking Performance Team.

Netperf is designed around the basic client-server model
Client
PERFORMANCE TCP/IP NETWORKING
Network Topology
Server
Networking Laboratory 3/17
Features

To measure various aspects of networking performance
Bulk data transfer performance
 Request / response performance


can measure of networking performance of TCP and UDP

with various command line option
PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 4/17
Installation

Download
http://www.netperf.org
 ftp://ftp.cup.hp.com (with ID anonymous)



dist / networking / benchmarks
Install
 OS : Linux

File name
• Server : netserver
• Client : netperf (only copied)
 Compile
command : #make install
 be compiled and copied into (/user path…/) netperf/

PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 5/17
Configuration

File edit
 Add this line to the /etc/services file
 netperf
12865/tcp
 Add this line to the /etc/xinetd.conf file (for a consecutive launch)

service netperf {
socket_type
protocol
wait
user
server
server_arg
= stream
= tcp
= no
= root
= /opt/netperf/netserver
= netserver
}
PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 6/17
User manual

1/4
TCP Stream Performance

#./netperf –H remotehost –t TCP_STREAM
The TCP stream test can be invoked with netperf though the use of the –t option
with an argument of TCP_STREAM.
 will perform a 10 sec test between the local and remote systems.

 Option
 -s sizespec
-S sizespec
 -m sizespec

-M sizespec
 -l sizespec
 -D

PERFORMANCE TCP/IP NETWORKING
: set local send and receive socket buffer sizes
(Default: system default socket buffer sizes)
: which behaves just like –s for the remote system
: set the local send size to value bytes
(Default: local socket buffer size)
: set the receive size for the remote system, like –m option
: set the test length to value seconds, |value |
: set the TCP_NODELAY option to true on both systems
Networking Laboratory 7/17
User manual

2/4
UDP Stream Performance

#./netperf –H remotehost –t UDP_STREAM –m 1024
The UDP stream test can be invoked with netperf though the use of the –t option
with an argument of UDP_STREAM.
 will perform a 10 sec test between the local and remote systems.

 Option
 -s sizespec





: set local send and receive socket buffer sizes
(Default: system default socket buffer sizes)
-S sizespec
: which behaves just like –s for the remote system
-m sizespec
: set the local send size to value bytes
(Default: local socket buffer size)
-M sizespec
: set the receive size for the remote system, like –m option
-l sizespec
: set the test length to value seconds, |value |
-D(meaningless) : set the TCP_NODELAY option to true on both systems
PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 8/17
User manual

3/4
TCP Request/Response Performance

#./netperf –H remotehost –t TCP_RR

The TCP request/response test can be invoked with netperf
though the use of the –t option with an argument of TCP_RR.
 Option
 -r sizespec
 -l value
 -s sizespec
-S sizespec
 -D

PERFORMANCE TCP/IP NETWORKING
: set the request or response sizes
: set the test duration based on value
: set the local send and receive socket buffer sizes
(Default: system default socket buffer sizes)
: set the remote system send and receive socket buffer sizes
: set the TCP_NODELAY option to true on both systems
Networking Laboratory 9/17
User manual

4/4
UDP Request/Response Performance

#./netperf –H remotehost –t UDP_RR

The TCP request/response test can be invoked with netperf
though the use of the –t option with an argument of UDP_RR.
 Option
 -r sizespec
 -l value
 -s sizespec
: set the request or response sizes
: set the test duration based on value
: set the local send and receive socket buffer sizes
(Default: system default socket buffer sizes)
 -S sizespec
: set the remote system send and receive socket buffer sizes
 -D(meaningless) : set the TCP_NODELAY option to true on both systems
PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 10/17
Test environment

System spec : Client
 CPU
 OS
 NIC

1/2
: Pentium IV 2.6G
: Linux kernel 2.4.20-8
: Realtek RTL8139
System spec : Server
 CPU
 OS
 NIC
: Pentium 4 2.4G
: Linux kernel 2.4.20-8smp
: Realtek RTL8139
PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 11/17
Test environment

2/2
Network Topology
Throughput, RTT
switching hub
NetPerf Client
PERFORMANCE TCP/IP NETWORKING
Router
switching hub
NetPerf Server
Networking Laboratory 12/17
Result

1/4
TCP stream performance
send socket buffer size on the local system
receive socket buffer size on the remote system
PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 13/17
Result

2/4
UDP stream performance
send performance
receive performance
message size
receive socket size on remote
PERFORMANCE TCP/IP NETWORKING
Failed send calls(ENOBUFS)
successful calls to send
successful calls to receive
Networking Laboratory 14/17
Result

3/4
TCP Request/Response Performance
local send socket size
local receive socket size
remote receive socket size
remote send socket size
PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 15/17
Result

4/4
UDP Request/Response Performance
PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 16/17
Reference sites

http://www.netperf.org/netperf/NetperfNew.html
PERFORMANCE TCP/IP NETWORKING
Networking Laboratory 17/17