a brief guide to netperf.

| | Comments (0)
Today I installed netperf.  I'm not sure about putting it in the book directly -- the package feels like there's some bit rot.  I only mind that a little, but in the book context, everything's got to continue to work for a while at least after it gets published.

I don't know.  It's worked up until now; rationally, that would suggest it'll keep working in the future.  Reason often leads us to conclusions which are untrue, I guess.

Anyway, here's an install procedure:

First, download netperf from http://netperf.org/netperf/DownloadNetperf.html .  We picked up version 2.4.4 .

 # wget ftp://ftp.netperf.org/netperf/netperf-2.4.4.tar.bz2

Untar it and enter the netperf directory.

# tar xjvf netperf-2.4.4.tar.bz2
# cd netperf-2.4.4

Configure, build, and install netperf.  (Note that these directions are a bit at variance with the documentation -- the documentation claims that /opt/netperf is the hard-coded install prefix, whereas it seems to install in /usr/local for me.)

# ./configure
# make
# su

# make install

In the standard configuration, netserver would run under inetd; however, inetd is obsolete.  Many distros don't even include it by default.  Besides, you probably don't want to leave the benchmark server running all the time.

Instead of configuring inetd, therefore, run netserver in standalone mode:

# /usr/local/bin/netserver
Starting netserver at port 12865
Starting netserver at hostname 0.0.0.0 port 12865 and family AF_UNSPEC

(On my system, for some reason, there was no /etc/hosts file.  I populated /etc/hosts with a localhost entry to make the next step work.  I'm hoping your system is better-configured.)

# netperf
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost (127.0.0.1) port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    10.01    10516.33

Okay, looks good.  Now I'll test from the dom0 to this domU:

# netperf -H 216.218.223.74,ipv4
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 216.218.223.74 (216.218.223.74) port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    10.00     638.59

Cool.  Not as fast, obviously, but that's kind of to be expected.  Now from another dom0 to this machine:

# netperf -H  216.218.223.74
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 216.218.223.74 (216.218.223.74) port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    10.12      93.66

Ouch.  Well, so how much of that is Xen, and how much is the network we're going through?

#  netperf -H  216.218.223.66
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 216.218.223.66 (216.218.223.66) port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    10.25      87.72

Huh.  Could be worse, I guess.  Of course, other tests, with varying, for example, packet sizes, might tell us more.  But that's a start for our performance measure.

Leave a comment

About this Entry

This page contains a single entry by chris t published on July 7, 2008 4:28 PM.

try to avoid looking like a moron. was the previous entry in this blog.

divided into three parts. is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.