xpenguin

holypsycho.egloos.com

포토로그

 


Netperf 설치 & 사용법 benchmarks

ref1: http://kan2.net/zboard/view.php?id=kan2_study_linux&no=296


network 관련 benchmark
network bandwidth를 측정해준다.

1. 다운로드
http://www.netperf.org/netperf/ 에서 최신 버전을 확인해보자.

2.4.5를 다운로드하려면
# wget ftp://ftp.netperf.org/netperf/netperf-2.4.5.tar.gz


2. 설치
# tar xvfz netperf-2.4.5.tar.gz
# cd netperf-2.4.5
# ./configure --prefix=/usr/local/netperf
# make
# make install
이러면
/usr/loca/netperf/bin 에
netserver, netperf
두 가지 실행파일이 생긴다.


3. 사용
먼저 server가 실행되어 있어야 한다. workload를 실행하는 서버가 아는 다른 곳으로 해두면 된다.
# /usr/local/netperf/bin/netserver
Starting netserver at port 12865
Starting netserver at hostname 0.0.0.0 port 12865 and family AF_UNSPEC

test할 컴퓨터에서는 다음과 같이 하면 된다.
# /usr/local/netperf/bin/netperf -t UDP_STREAM -l 10 -n 1 -H 192.169.1.1
각 OPTION들에 대해서는 아래에서.


4. OPTION들
자세한 것은 아래 Man page를 참고하면 된다. 써본 것들 위주로 설명한다.

1) -t
TCP_STREAM, UDP_STREAM이 있다.
TCP_STREAM은 CPU 점유율도 높게 되므로, (특히 XEN 환경에서는 DOM0 점유율이 높아진다.) network에만 stress를 주고 싶으면 IDP_STREAM을 사용하면 된다.

2) -l
workload를 실행할 시간 설정. 초단위. 위의 예시 같은 경우에는 10초 동안 실행된다.

3) -n
network packet을 보낼 thread 개수. 실험 결과 이 숫자가 높다고 bandwidth가 쉽게 증가되진 않는다. network card를 그렇게 좋은 걸 쓰는 게 아니라서 그럴 수도. 어쨌든 이 숫자가 높으면 CPU utilization이 증가한다.

4) -H
host server IP address. 즉, netserver를 실행시킨 컴퓨터의 IP address 이다.


5. Man page
##### netperf man page #####
netperf(1) netperf(1)

NAME
netperf - a network performance benchmark

SYNOPSIS
netperf [global options] -- [test specific options]

DESCRIPTION
Netperf is a benchmark that can be used to measure various aspects of networking
performance. Currently, its focus is on bulk data transfer and request/response
performance using either TCP or UDP, and the Berkeley Sockets interface. In
addition, tests for DLPI, and Unix Domain Sockets, tests for IPv6 may be condi-
tionally compiled-in.

GLOBAL OPTIONS
-a sizespec
Alter the send and receive buffer alignments on the local system. This
defaults to 8 bytes.

-A sizespec
As -a, but for the remote system.

-c [rate]
Request CPU utilization and service demand calculations for the local
system. If the optional rate parameter is specified, netperf will use
that instead of calculating the rate itself.

-C [rate]
As -c, but for the remote system.

-d Increase the quantity of debugging output displayed during a test (possi-
bly at the expense of performance).

-f GMKgmk
Change the units of measure for *_STREAM tests. Capital letters are pow-
ers of two, lowercase are powers of ten.

-F fill_file
Pre-fill the send buffers with data from the named file. This is intended
to provide a means for avoiding buffers that are filled with data which
is trivially easy to compress. A good choice for a file that should be
present on any system is this manpage - netperf.man. Other files may be
provided as part of the distribution.

-h Display a usage string, and exit.

-H remote_host,local_host
Set the hostname (or IP address) of the remote system. Passing a single
name with no comma will only set remote_host and will leave selection of
local IP address for the control connection to the stack. Specifying
",local_host" will only set local_host and will leave remote_host at the
default.

-i max,min
Set the maximum and minimum number of iterations when trying to reach
certain confidence levels.

-I lvl,[,intvl]
Specify the confidence level (either 95 or 99 - 99 is the default) and
the width of the confidence interval as a percentage (default 10)

-l testlen
Specify the length of the test (default 10 seconds). A negative value
sets the number of request/response transactions, or the number of bytes
for a stream test.

-n numcpus
Specify the number of CPUs in the system on those systems for which net-
perf has no way to find the number of CPUs programatically.

-o sizespec
Set an offset from the alignment specified with -a.

-O sizespec
As -o, but for the remote system.

-p portnum,locport
Connect to a listening on the specified port, rather than using /etc/ser-
vices. If ",locport" is specified the control connection will be estab-
lished from that local port number. Specifying a single port number with
no comma will specify only the remote port number and will leave local
port number selection to the stack.

-P 0|1 Show (1) or suppress (0) the test banner.

-t testname
Specify the test to perform. Valid testnames are (but not always com-
piled-in):
TCP_STREAM
TCP_MAERTS
TCP_RR
TCP_CRR
UDP_STREAM
UDP_RR
TCPIPV6_STREAM
TCPIPV6_RR
TCPIPV6_CRR
UDPIPV6_STREAM
UDPIPV6_RR
DLCO_STREAM
DLCO_RR
DLCL_STREAM
DLCL_RR
STREAM_STREAM
STREAM_RR
DG_STREAM
DG_RR
LOC_CPU
REM_CPU

-v verbosity
Set the verbosity level for the test (only with -P).

-V Enable the copy-avoidance features (HP-UX 9.0 and later only).

TEST SPECIFIC OPTIONS
-h Display a usage string based on the test name set with -t, and exit.

Please consult the netperf manual Netperf: A Network Performance Bench-
mark (netperf.ps) for more information. Or you can join and mail to net-
perf-talk@netperf.org.

BUGS
There is a fairly large list of known defects and misfeatures in the manual. If
you think you have found a bug, please send email to Rick Jones
.

SEE ALSO
Netperf: A Network Performance Benchmark
http://www.netperf.org/

AUTHORS
HP Information Networks Division - Networking Performance Team.
Rick Jones
Karen Choy HP IND
Dave Shield (man pages)
Others too numerous to mention here - see the ACKNWLDGMNTS file


덧글

댓글 입력 영역