Permission is granted to copy, distribute and/or modify this document
per the terms of the netperf source licence, a copy of which can be
found in the file COPYING of the basic netperf distribution.
Introduction: An introduction to netperf - what it
is and what it is not.
Netperf is a benchmark that can be use to measure various aspect of
networking performance. The primary foci are bulk (aka
unidirectional) data transfer and request/response performance using
either TCP or UDP and the Berkeley Sockets interface. As of this
writing, the tests available either unconditionally or conditionally
include:
TCP and UDP unidirectional transfer and request/response over IPv4 and
IPv6 using the Sockets interface.
TCP and UDP unidirectional transfer and request/response over IPv4
using the XTI interface.
Link-level unidirectional transfer and request/response using the DLPI
interface.
Unix domain sockets
SCTP unidirectional transfer and request/response over IPv4 and IPv6
using the sockets interface.
While not every revision of netperf will work on every platform
listed, the intention is that at least some version of netperf will
work on the following platforms:
Unix - at least all the major variants.
Linux
Windows
Others
Netperf is maintained and informally supported primarily by Rick
Jones, who can perhaps be best described as Netperf Contributing
Editor. Non-trivial and very appreciated assistance comes from others
in the network performance community, who are too numerous to mention
here. While it is often used by them, netperf is NOT supported via any
of the formal Hewlett-Packard support channels. You should feel free
to make enhancements and modifications to netperf to suit your
nefarious porpoises, so long as you stay within the guidelines of the
netperf copyright. If you feel so inclined, you can send your changes
to
netperf-feedback for possible
inclusion into subsequent versions of netperf.
It is the Contributing Editor's belief that the netperf license walks
like open source and talks like open source. However, the license was
never submitted for “certification” as an open source license. If
you would prefer to make contributions to a networking benchmark using
a certified open source license, please consider netperf4, which is
distributed under the terms of the GPLv2.
The netperf-talk mailing list is
available to discuss the care and feeding of netperf with others who
share your interest in network performance benchmarking. The
netperf-talk mailing list is a closed list (to deal with spam) and you
must first subscribe by sending email to
netperf-talk-request.
A sizespec is a one or two item, comma-separated list used as an
argument to a command-line option that can set one or two, related
netperf parameters. If you wish to set both parameters to separate
values, items should be separated by a comma:
parameter1,parameter2
If you wish to set the first parameter without altering the value of
the second from its default, you should follow the first item with a
comma:
parameter1,
Likewise, precede the item with a comma if you wish to set only the
second parameter:
,parameter2
An item with no commas:
parameter1and2
will set both parameters to the same value. This last mode is one of
the most frequently used.
There is another variant of the comma-separated, two-item list called
a optionspec which is like a sizespec with the exception that a
single item with no comma:
parameter1
will only set the value of the first parameter and will leave the
second parameter at its default value.
Netperf has two types of command-line options. The first are global
command line options. They are essentially any option not tied to a
particular test or group of tests. An example of a global
command-line option is the one which sets the test type - -t.
The second type of options are test-specific options. These are
options which are only applicable to a particular test or set of
tests. An example of a test-specific option would be the send socket
buffer size for a TCP_STREAM test.
Global command-line options are specified first with test-specific
options following after a -- as in:
Netperf's primary form of distribution is source code. This allows
installation on systems other than those to which the authors have
ready access and thus the ability to create binaries. There are two
styles of netperf installation. The first runs the netperf server
program - netserver - as a child of inetd. This requires the
installer to have sufficient privileges to edit the files
/etc/services and /etc/inetd.conf or their
platform-specific equivalents.
The second style is to run netserver as a standalone daemon. This
second method does not require edit privileges on /etc/services
and /etc/inetd.conf but does mean you must remember to run the
netserver program explicitly after every system reboot.
This manual assumes that those wishing to measure networking
performance already know how to use anonymous FTP and/or a web
browser. It is also expected that you have at least a passing
familiarity with the networking protocols and interfaces involved. In
all honesty, if you do not have such familiarity, likely as not you
have some experience to gain before attempting network performance
measurements. The excellent texts by authors such as Stevens, Fenner
and Rudoff and/or Stallings would be good starting points. There are
likely other excellent sources out there as well.
Gzipped tar files of netperf sources can be retrieved via
anonymous FTP
for “released” versions of the bits. Pre-release versions of the
bits can be retrieved via anonymous FTP from the
experimental subdirectory.
For convenience and ease of remembering, a link to the download site
is provided via the
NetperfPage
The bits corresponding to each discrete release of netperf are
tagged for retrieval
via subversion. For example, there is a tag for the first version
corresponding to this version of the manual -
netperf 2.5.0. Those wishing to be on the bleeding edge of netperf
development can use subversion to grab the
top of trunk. When
fixing bugs or making enhancements, patches against the top-of-trunk
are preferred.
There are likely other places around the Internet from which one can
download netperf bits. These may be simple mirrors of the main
netperf site, or they may be local variants on netperf. As with
anything one downloads from the Internet, take care to make sure it is
what you really wanted and isn't some malicious Trojan or whatnot.
Caveat downloader.
As a general rule, binaries of netperf and netserver are not
distributed from ftp.netperf.org. From time to time a kind soul or
souls has packaged netperf as a Debian package available via the
apt-get mechanism or as an RPM. I would be most interested in
learning how to enhance the makefiles to make that easier for people.
Once you have downloaded the tar file of netperf sources onto your
system(s), it is necessary to unpack the tar file, cd to the netperf
directory, run configure and then make. Most of the time it should be
sufficient to just:
gzcat netperf-<version>.tar.gz | tar xf -
cd netperf-<version>
./configure
make
make install
Most of the “usual” configure script options should be present
dealing with where to install binaries and whatnot.
./configure --help
should list all of those and more. You may find the --prefix
option helpful in deciding where the binaries and such will be put
during the make install.
If the netperf configure script does not know how to automagically
detect which CPU utilization mechanism to use on your platform you may
want to add a --enable-cpuutil=mumble option to the configure
command. If you have knowledge and/or experience to contribute to
that area, feel free to contact netperf-feedback@netperf.org.
Similarly, if you want tests using the XTI interface, Unix Domain
Sockets, DLPI or SCTP it will be necessary to add one or more
--enable-[xti|unixdomain|dlpi|sctp]=yes options to the configure
command. As of this writing, the configure script will not include
those tests automagically.
Starting with version 2.5.0, netperf is migrating most of the
“classic” netperf tests found in src/nettest_bsd.c to the
so-called “omni” tests (aka “two routines to run them all”) found
in src/nettest_omni.c. This migration enables a number of new
features such as greater control over what output is included, and new
things to output. The “omni” test is enabled by default in 2.5.0
and a number of the classic tests are migrated - you can tell if a
test has been migrated
from the presence of MIGRATED in the test banner. If you
encounter problems with either the omni or migrated tests, please
first attempt to obtain resolution via
netperf-talk@netperf.org or
netperf-feedback@netperf.org. If that is unsuccessful, you
can add a --enable-omni=no to the configure command and the
omni tests will not be compiled-in and the classic tests will not be
migrated.
Starting with version 2.5.0, netperf will include the “burst mode”
functionality in a default compilation of the bits. If you encounter
problems with this, please first attempt to obtain help via
netperf-talk@netperf.org or
netperf-feedback@netperf.org. If that is unsuccessful, you
can add a --enable-burst=no to the configure command and the
burst mode functionality will nt be compiled-in.
On some platforms, it may be necessary to precede the configure
command with a CFLAGS and/or LIBS variable as the netperf configure
script is not yet smart enough to set them itself. Whenever possible,
these requirements will be found in README.platform files.
Expertise and assistance in making that more automagical in the
configure script would be most welcome.
Other optional configure-time settings include
--enable-intervals=yes to give netperf the ability to “pace”
its _STREAM tests and --enable-histogram=yes to have netperf
keep a histogram of interesting times. Each of these will have some
effect on the measured result. If your system supports
gethrtime() the effect of the histogram measurement should be
minimized but probably still measurable. For example, the histogram
of a netperf TCP_RR test will be of the individual transaction times:
The histogram you see above is basically a base-10 log histogram where
we can see that most of the transaction times were on the order of one
hundred to one-hundred, ninety-nine microseconds, but they were
occasionally as long as ten to nineteen milliseconds
The --enable-demo=yes configure option will cause code to be
included to report interim results during a test run. The rate at
which interim results are reported can then be controlled via the
global -D option. Here is an example of -D output:
$ src/netperf -D 1.35 -H tardy.hpl.hp.com -f M
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to tardy.hpl.hp.com (15.9.116.144) port 0 AF_INET : demo
Interim result: 5.41 MBytes/s over 1.35 seconds ending at 1308789765.848
Interim result: 11.07 MBytes/s over 1.36 seconds ending at 1308789767.206
Interim result: 16.00 MBytes/s over 1.36 seconds ending at 1308789768.566
Interim result: 20.66 MBytes/s over 1.36 seconds ending at 1308789769.922
Interim result: 22.74 MBytes/s over 1.36 seconds ending at 1308789771.285
Interim result: 23.07 MBytes/s over 1.36 seconds ending at 1308789772.647
Interim result: 23.77 MBytes/s over 1.37 seconds ending at 1308789774.016
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. MBytes/sec
87380 16384 16384 10.06 17.81
Notice how the units of the interim result track that requested by the
-f option. Also notice that sometimes the interval will be
longer than the value specified in the -D option. This is
normal and stems from how demo mode is implemented not by relying on
interval timers or frequent calls to get the current time, but by
calculating how many units of work must be performed to take at least
the desired interval.
Those familiar with this option in earlier versions of netperf will
note the addition of the “ending at” text. This is the time as
reported by a gettimeofday() call (or its emulation) with a
NULL timezone pointer. This addition is intended to make it
easier to insert interim results into an
rrdtool
Round-Robin Database (RRD). A likely bug-riddled example of doing so
can be found in doc/examples/netperf_interim_to_rrd.sh. The
time is reported out to milliseconds rather than microseconds because
that is the most rrdtool understands as of the time of this writing.
As of this writing, a make install will not actually update the
files /etc/services and/or /etc/inetd.conf or their
platform-specific equivalents. It remains necessary to perform that
bit of installation magic by hand. Patches to the makefile sources to
effect an automagic editing of the necessary files to have netperf
installed as a child of inetd would be most welcome.
Starting the netserver as a standalone daemon should be as easy as:
$ netserver
Starting netserver at port 12865
Starting netserver at hostname 0.0.0.0 port 12865 and family 0
Over time the specifics of the messages netserver prints to the screen
may change but the gist will remain the same.
If the compilation of netperf or netserver happens to fail, feel free
to contact netperf-feedback@netperf.org or join and ask in
netperf-talk@netperf.org. However, it is quite important
that you include the actual compilation errors and perhaps even the
configure log in your email. Otherwise, it will be that much more
difficult for someone to assist you.
Netperf is designed around a basic client-server model. There are
two executables - netperf and netserver. Generally you will only
execute the netperf program, with the netserver program being invoked
by the remote system's inetd or having been previously started as its
own standalone daemon.
When you execute netperf it will establish a “control connection” to
the remote system. This connection will be used to pass test
configuration information and results to and from the remote system.
Regardless of the type of test to be run, the control connection will
be a TCP connection using BSD sockets. The control connection can use
either IPv4 or IPv6.
Once the control connection is up and the configuration information
has been passed, a separate “data” connection will be opened for the
measurement itself using the API's and protocols appropriate for the
specified test. When the test is completed, the data connection will
be torn-down and results from the netserver will be passed-back via the
control connection and combined with netperf's result for display to
the user.
Netperf places no traffic on the control connection while a test is in
progress. Certain TCP options, such as SO_KEEPALIVE, if set as your
systems' default, may put packets out on the control connection while
a test is in progress. Generally speaking this will have no effect on
the results.
CPU utilization is an important, and alas all-too infrequently
reported component of networking performance. Unfortunately, it can
be one of the most difficult metrics to measure accurately and
portably. Netperf will do its level best to report accurate
CPU utilization figures, but some combinations of processor, OS and
configuration may make that difficult.
CPU utilization in netperf is reported as a value between 0 and 100%
regardless of the number of CPUs involved. In addition to CPU
utilization, netperf will report a metric called a service
demand. The service demand is the normalization of CPU utilization
and work performed. For a _STREAM test it is the microseconds of CPU
time consumed to transfer on KB (K == 1024) of data. For a _RR test
it is the microseconds of CPU time consumed processing a single
transaction. For both CPU utilization and service demand, lower is
better.
Service demand can be particularly useful when trying to gauge the
effect of a performance change. It is essentially a measure of
efficiency, with smaller values being more efficient and thus
“better.”
Netperf is coded to be able to use one of several, generally
platform-specific CPU utilization measurement mechanisms. Single
letter codes will be included in the CPU portion of the test banner to
indicate which mechanism was used on each of the local (netperf) and
remote (netserver) system.
As of this writing those codes are:
U
The CPU utilization measurement mechanism was unknown to netperf or
netperf/netserver was not compiled to include CPU utilization
measurements. The code for the null CPU utilization mechanism can be
found in src/netcpu_none.c.
I
An HP-UX-specific CPU utilization mechanism whereby the kernel
incremented a per-CPU counter by one for each trip through the idle
loop. This mechanism was only available on specially-compiled HP-UX
kernels prior to HP-UX 10 and is mentioned here only for the sake of
historical completeness and perhaps as a suggestion to those who might
be altering other operating systems. While rather simple, perhaps even
simplistic, this mechanism was quite robust and was not affected by
the concerns of statistical methods, or methods attempting to track
time in each of user, kernel, interrupt and idle modes which require
quite careful accounting. It can be thought-of as the in-kernel
version of the looper L mechanism without the context switch
overhead. This mechanism required calibration.
P
An HP-UX-specific CPU utilization mechanism whereby the kernel
keeps-track of time (in the form of CPU cycles) spent in the kernel
idle loop (HP-UX 10.0 to 11.31 inclusive), or where the kernel keeps
track of time spent in idle, user, kernel and interrupt processing
(HP-UX 11.23 and later). The former requires calibration, the latter
does not. Values in either case are retrieved via one of the pstat(2)
family of calls, hence the use of the letter P. The code for
these mechanisms is found in src/netcpu_pstat.c and
src/netcpu_pstatnew.c respectively.
K
A Solaris-specific CPU utilization mechanism whereby the kernel keeps
track of ticks (eg HZ) spent in the idle loop. This method is
statistical and is known to be inaccurate when the interrupt rate is
above epsilon as time spent processing interrupts is not subtracted
from idle. The value is retrieved via a kstat() call - hence the use
of the letter K. Since this mechanism uses units of ticks (HZ)
the calibration value should invariably match HZ. (Eg 100) The code
for this mechanism is implemented in src/netcpu_kstat.c.
M
A Solaris-specific mechanism available on Solaris 10 and latter which
uses the new microstate accounting mechanisms. There are two, alas,
overlapping, mechanisms. The first tracks nanoseconds spent in user,
kernel, and idle modes. The second mechanism tracks nanoseconds spent
in interrupt. Since the mechanisms overlap, netperf goes through some
hand-waving to try to “fix” the problem. Since the accuracy of the
handwaving cannot be completely determined, one must presume that
while better than the K mechanism, this mechanism too is not
without issues. The values are retrieved via kstat() calls, but the
letter code is set to M to distinguish this mechanism from the
even less accurate K mechanism. The code for this mechanism is
implemented in src/netcpu_kstat10.c.
L
A mechanism based on “looper”or “soaker” processes which sit in
tight loops counting as fast as they possibly can. This mechanism
starts a looper process for each known CPU on the system. The effect
of processor hyperthreading on the mechanism is not yet known. This
mechanism definitely requires calibration. The code for the
“looper”mechanism can be found in src/netcpu_looper.c
N
A Microsoft Windows-specific mechanism, the code for which can be
found in src/netcpu_ntperf.c. This mechanism too is based on
what appears to be a form of micro-state accounting and requires no
calibration. On laptops, or other systems which may dynamically alter
the CPU frequency to minimize power consumtion, it has been suggested
that this mechanism may become slightly confused, in which case using
BIOS/uEFI settings to disable the power saving would be indicated.
S
This mechanism uses /proc/stat on Linux to retrieve time
(ticks) spent in idle mode. It is thought but not known to be
reasonably accurate. The code for this mechanism can be found in
src/netcpu_procstat.c.
C
A mechanism somewhat similar to S but using the sysctl() call
on BSD-like Operating systems (*BSD and MacOS X). The code for this
mechanism can be found in src/netcpu_sysctl.c.
Others
Other mechanisms included in netperf in the past have included using
the times() and getrusage() calls. These calls are actually rather
poorly suited to the task of measuring CPU overhead for networking as
they tend to be process-specific and much network-related processing
can happen outside the context of a process, in places where it is not
a given it will be charged to the correct, or even a process. They
are mentioned here as a warning to anyone seeing those mechanisms used
in other networking benchmarks. These mechanisms are not available in
netperf 2.4.0 and later.
For many platforms, the configure script will chose the best available
CPU utilization mechanism. However, some platforms have no
particularly good mechanisms. On those platforms, it is probably best
to use the “LOOPER” mechanism which is basically some number of
processes (as many as there are processors) sitting in tight little
loops counting as fast as they can. The rate at which the loopers
count when the system is believed to be idle is compared with the rate
when the system is running netperf and the ratio is used to compute
CPU utilization.
In the past, netperf included some mechanisms that only reported CPU
time charged to the calling process. Those mechanisms have been
removed from netperf versions 2.4.0 and later because they are
hopelessly inaccurate. Networking can and often results in CPU time
being spent in places - such as interrupt contexts - that do not get
charged to a or the correct process.
In fact, time spent in the processing of interrupts is a common issue
for many CPU utilization mechanisms. In particular, the “PSTAT”
mechanism was eventually known to have problems accounting for certain
interrupt time prior to HP-UX 11.11 (11iv1). HP-UX 11iv2 and later
are known/presumed to be good. The “KSTAT” mechanism is known to
have problems on all versions of Solaris up to and including Solaris
10. Even the microstate accounting available via kstat in Solaris 10
has issues, though perhaps not as bad as those of prior versions.
The /proc/stat mechanism under Linux is in what the author would
consider an “uncertain” category as it appears to be statistical,
which may also have issues with time spent processing interrupts.
In summary, be sure to “sanity-check” the CPU utilization figures
with other mechanisms. However, platform tools such as top, vmstat or
mpstat are often based on the same mechanisms used by netperf.
The CPU utilization mechanisms used by netperf are “inline” in that
they are run by the same netperf or netserver process as is running
the test itself. This works just fine for “bare iron” tests but
runs into a problem when using virtual machines.
The relationship between virtual guest and hypervisor can be thought
of as being similar to that between a process and kernel in a bare
iron system. As such, (m)any CPU utilization mechanisms used in the
virtual guest are similar to “process-local” mechanisms in a bare
iron situation. However, just as with bare iron and process-local
mechanisms, much networking processing happens outside the context of
the virtual guest. It takes place in the hypervisor, and is not
visible to mechanisms running in the guest(s). For this reason, one
should not really trust CPU utilization figures reported by netperf or
netserver when running in a virtual guest.
If one is looking to measure the added overhead of a virtualization
mechanism, rather than rely on CPU utilization, one can rely instead
on netperf _RR tests - path-lengths and overheads can be a significant
fraction of the latency, so increases in overhead should appear as
decreases in transaction rate. Whatever you do, DO NOT rely on
the throughput of a _STREAM test. Achieving link-rate can be done via
a multitude of options that mask overhead rather than eliminate it.
This section describes each of the global command-line options
available in the netperf and netserver binaries. Essentially, it is
an expanded version of the usage information displayed by netperf or
netserver when invoked with the -h global command-line
option.
Revision 1.8 of netperf introduced enough new functionality to overrun
the English alphabet for mnemonic command-line option names, and the
author was not and is not quite ready to switch to the contemporary
--mumble style of command-line options. (Call him a Luddite
if you wish :).
For this reason, the command-line options were split into two parts -
the first are the global command-line options. They are options that
affect nearly any and every test type of netperf. The second type are
the test-specific command-line options. Both are entered on the same
command line, but they must be separated from one another by a --
for correct parsing. Global command-line options come first, followed
by the -- and then test-specific command-line options. If there
are no test-specific options to be set, the -- may be omitted. If
there are no global command-line options to be set, test-specific
options must still be preceded by a --. For example:
This option allows you to alter the alignment of the buffers used in
the sending and receiving calls on the local system.. Changing the
alignment of the buffers can force the system to use different copy
schemes, which can have a measurable effect on performance. If the
page size for the system were 4096 bytes, and you want to pass
page-aligned buffers beginning on page boundaries, you could use
‘-a 4096’. By default the units are bytes, but suffix of “G,”
“M,” or “K” will specify the units to be 2^30 (GB), 2^20 (MB) or
2^10 (KB) respectively. A suffix of “g,” “m” or “k” will specify
units of 10^9, 10^6 or 10^3 bytes respectively. [Default: 8 bytes]
-A <sizespec>
This option is identical to the -a option with the difference
being it affects alignments for the remote system.
-b <size>
This option is only present when netperf has been configure with
–enable-intervals=yes prior to compilation. It sets the size of the
burst of send calls in a _STREAM test. When used in conjunction with
the -w option it can cause the rate at which data is sent to
be “paced.”
-B <string>
This option will cause <string> to be appended to the brief
(see -P) output of netperf.
-c [rate]
This option will ask that CPU utilization and service demand be
calculated for the local system. For those CPU utilization mechanisms
requiring calibration, the options rate parameter may be specified to
preclude running another calibration step, saving 40 seconds of time.
For those CPU utilization mechanisms requiring no calibration, the
optional rate parameter will be utterly and completely ignored.
[Default: no CPU measurements]
-C [rate]
This option requests CPU utilization and service demand calculations
for the remote system. It is otherwise identical to the -c
option.
-d
Each instance of this option will increase the quantity of debugging
output displayed during a test. If the debugging output level is set
high enough, it may have a measurable effect on performance.
Debugging information for the local system is printed to stdout.
Debugging information for the remote system is sent by default to the
file /tmp/netperf.debug. [Default: no debugging output]
-D [interval,units]
This option is only available when netperf is configured with
–enable-demo=yes. When set, it will cause netperf to emit periodic
reports of performance during the run. [interval,units]
follow the semantics of an optionspec. If specified,
interval gives the minimum interval in real seconds, it does not
have to be whole seconds. The units value can be used for the
first guess as to how many units of work (bytes or transactions) must
be done to take at least interval seconds. If omitted,
interval defaults to one second and units to values
specific to each test type.
-f G|M|K|g|m|k|x
This option can be used to change the reporting units for _STREAM
tests. Arguments of “G,” “M,” or “K” will set the units to
2^30, 2^20 or 2^10 bytes/s respectively (EG power of two GB, MB or
KB). Arguments of “g,” “,m” or “k” will set the units to 10^9,
10^6 or 10^3 bits/s respectively. An argument of “x” requests the
units be transactions per second and is only meaninful for a
request-response test. [Default: “m” or 10^6 bits/s]
-F <fillfile>
This option specified the file from which send which buffers will be
pre-filled . While the buffers will contain data from the specified
file, the file is not fully transfered to the remote system as the
receiving end of the test will not write the contents of what it
receives to a file. This can be used to pre-fill the send buffers
with data having different compressibility and so is useful when
measuring performance over mechanisms which perform compression.
While previously required for a TCP_SENDFILE test, later versions of
netperf removed that restriction, creating a temporary file as
needed. While the author cannot recall exactly when that took place,
it is known to be unnecessary in version 2.5.0 and later.
-h
This option causes netperf to display its “global” usage string and
exit to the exclusion of all else.
-H <optionspec>
This option will set the name of the remote system and or the address
family used for the control connection. For example:
-H linger,4
will set the name of the remote system to “linger” and tells netperf to
use IPv4 addressing only.
-H ,6
will leave the name of the remote system at its default, and request
that only IPv6 addresses be used for the control connection.
-H lag
will set the name of the remote system to “lag” and leave the
address family to AF_UNSPEC which means selection of IPv4 vs IPv6 is
left to the system's address resolution.
A value of “inet” can be used in place of “4” to request IPv4 only
addressing. Similarly, a value of “inet6” can be used in place of
“6” to request IPv6 only addressing. A value of “0” can be used
to request either IPv4 or IPv6 addressing as name resolution dictates.
By default, the options set with the global -H option are
inherited by the test for its data connection, unless a test-specific
-H option is specified.
If a -H option follows either the -4 or -6
options, the family setting specified with the -H option will override
the -4 or -6 options for the remote address
family. If no address family is specified, settings from a previous
-4 or -6 option will remain. In a nutshell, the
last explicit global command-line option wins.
[Default: “localhost” for the remote name/IP address and “0” (eg
AF_UNSPEC) for the remote address family.]
-I <optionspec>
This option enables the calculation of confidence intervals and sets
the confidence and width parameters with the first half of the
optionspec being either 99 or 95 for 99% or 95% confidence
respectively. The second value of the optionspec specifies the width
of the desired confidence interval. For example
-I 99,5
asks netperf to be 99% confident that the measured mean values for
throughput and CPU utilization are within +/- 2.5% of the “real”
mean values. If the -i option is specified and the
-I option is omitted, the confidence defaults to 99% and the
width to 5% (giving +/- 2.5%)
If classic netperf test calculates that the desired confidence
intervals have not been met, it emits a noticeable warning that cannot
be suppressed with the -P or -v options:
netperf -H tardy.cup -i 3 -I 99,5
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to tardy.cup.hp.com (15.244.44.58) port 0 AF_INET : +/-2.5% 99% conf.
!!! WARNING
!!! Desired confidence was not achieved within the specified iterations.
!!! This implies that there was variability in the test environment that
!!! must be investigated before going further.
!!! Confidence intervals: Throughput : 6.8%
!!! Local CPU util : 0.0%
!!! Remote CPU util : 0.0%
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
32768 16384 16384 10.01 40.23
In the example above we see that netperf did not meet the desired
convidence intervals. Instead of being 99% confident it was within
+/- 2.5% of the real mean value of throughput it is only confident it
was within +/-3.4%. In this example, increasing the -i
option (described below) and/or increasing the iteration length with
the -l option might resolve the situation.
In an explicit “omni” test, failure to meet the confidence intervals
will not result in netperf emitting a warning. To verify the hitting,
or not, of the confidence intervals one will need to include them as
part of an an output selection in the
test-specific -o, -O or k output selection
options. The warning about not hitting the confidence intervals will
remain in a “migrated” classic netperf test.
-i <sizespec>
This option enables the calculation of confidence intervals and sets
the minimum and maximum number of iterations to run in attempting to
achieve the desired confidence interval. The first value sets the
maximum number of iterations to run, the second, the minimum. The
maximum number of iterations is silently capped at 30 and the minimum
is silently floored at 3. Netperf repeats the measurement the minimum
number of iterations and continues until it reaches either the
desired confidence interval, or the maximum number of iterations,
whichever comes first. A classic or migrated netperf test will not
display the actual number of iterations run. An omni test will emit the number of iterations run if the
CONFIDENCE_ITERATION output selector is included in the
output selection.
If the -I option is specified and the -i option
omitted the maximum number of iterations is set to 10 and the minimum
to three.
Output of a warning upon not hitting the desired confidence intervals
follows the description provided for the -I option.
The total test time will be somewhere between the minimum and maximum
number of iterations multiplied by the test length supplied by the
-l option.
-j
This option instructs netperf to keep additional timing statistics
when explicitly running an omni test. These can
be output when the test-specific -o, -O or
-koutput selectors include one
or more of:
MIN_LATENCY
MAX_LATENCY
P50_LATENCY
P90_LATENCY
P99_LATENCY
MEAN_LATENCY
STDDEV_LATENCY
These statistics will be based on an expanded (100 buckets per row
rather than 10) histogram of times rather than a terribly long list of
individual times. As such, there will be some slight error thanks to
the bucketing. However, the reduction in storage and processing
overheads is well worth it. When running a request/response test, one
might get some idea of the error by comparing the MEAN_LATENCY calculated from the histogram with the
RT_LATENCY calculated from the number of request/response
transactions and the test run time.
In the case of a request/response test the latencies will be
transaction latencies. In the case of a receive-only test they will
be time spent in the receive call. In the case of a send-only test
they will be tim spent in the send call. The units will be
microseconds. Added in netperf 2.5.0.
-l testlen
This option controls the length of any one iteration of the requested
test. A positive value for testlen will run each iteration of
the test for at least testlen seconds. A negative value for
testlen will run each iteration for the absolute value of
testlen transactions for a _RR test or bytes for a _STREAM test.
Certain tests, notably those using UDP can only be timed, they cannot
be limited by transaction or byte count. This limitation may be
relaxed in an omni test.
In some situations, individual iterations of a test may run for longer
for the number of seconds specified by the -l option. In
particular, this may occur for those tests where the socket buffer
size(s) are significantly longer than the bandwidthXdelay product of
the link(s) over which the data connection passes, or those tests
where there may be non-trivial numbers of retransmissions.
If confidence intervals are enabled via either -I or
-i the total length of the netperf test will be somewhere
between the minimum and maximum iteration count multiplied by
testlen.
-L <optionspec>
This option is identical to the -H option with the difference
being it sets the _local_ hostname/IP and/or address family
information. This option is generally unnecessary, but can be useful
when you wish to make sure that the netperf control and data
connections go via different paths. It can also come-in handy if one
is trying to run netperf through those evil, end-to-end breaking
things known as firewalls.
[Default: 0.0.0.0 (eg INADDR_ANY) for IPv4 and ::0 for IPv6 for the
local name. AF_UNSPEC for the local address family.]
-n numcpus
This option tells netperf how many CPUs it should ass-u-me are active
on the system running netperf. In particular, this is used for the
CPU utilization and service demand calculations.
On certain systems, netperf is able to determine the number of CPU's
automagically. This option will override any number netperf might be
able to determine on its own.
Note that this option does _not_ set the number of CPUs on the system
running netserver. When netperf/netserver cannot automagically
determine the number of CPUs that can only be set for netserver via a
netserver -n command-line option.
As it is almost universally possible for netperf/netserver to
determine the number of CPUs on the system automagically, 99 times out
of 10 this option should not be necessary and may be removed in a
future release of netperf.
-N
This option tells netperf to forego establishing a control
connection. This makes it is possible to run some limited netperf
tests without a corresponding netserver on the remote system.
With this option set, the test to be run is to get all the addressing
information it needs to establish its data connection from the command
line or internal defaults. If not otherwise specified by
test-specific command line options, the data connection for a
“STREAM” or “SENDFILE” test will be to the “discard” port, an
“RR” test will be to the “echo” port, and a “MEARTS” test will
be to the chargen port.
The response size of an “RR” test will be silently set to be the
same as the request size. Otherwise the test would hang if the
response size was larger than the request size, or would report an
incorrect, inflated transaction rate if the response size was less
than the request size.
Since there is no control connection when this option is specified, it
is not possible to set “remote” properties such as socket buffer
size and the like via the netperf command line. Nor is it possible to
retrieve such interesting remote information as CPU utilization.
These items will be displayed as values which should make it
immediately obvious that was the case.
The only way to change remote characteristics such as socket buffer
size or to obtain information such as CPU utilization is to employ
platform-specific methods on the remote system. Frankly, if one has
access to the remote system to employ those methods one aught to be
able to run a netserver there. However, that ability may not be
present in certain “support” situations, hence the addition of this
option.
Added in netperf 2.4.3.
-o <sizespec>
The value(s) passed-in with this option will be used as an offset
added to the alignment specified with the -a option. For
example:
-o 3 -a 4096
will cause the buffers passed to the local (netperf) send and receive
calls to begin three bytes past an address aligned to 4096
bytes. [Default: 0 bytes]
-O <sizespec>
This option behaves just as the -o option but on the remote
(netserver) system and in conjunction with the -A
option. [Default: 0 bytes]
-p <optionspec>
The first value of the optionspec passed-in with this option tells
netperf the port number at which it should expect the remote netserver
to be listening for control connections. The second value of the
optionspec will request netperf to bind to that local port number
before establishing the control connection. For example
-p 12345
tells netperf that the remote netserver is listening on port 12345 and
leaves selection of the local port number for the control connection
up to the local TCP/IP stack whereas
-p ,32109
leaves the remote netserver port at the default value of 12865 and
causes netperf to bind to the local port number 32109 before
connecting to the remote netserver.
In general, setting the local port number is only necessary when one
is looking to run netperf through those evil, end-to-end breaking
things known as firewalls.
-P 0|1
A value of “1” for the -P option will enable display of
the test banner. A value of “0” will disable display of the test
banner. One might want to disable display of the test banner when
running the same basic test type (eg TCP_STREAM) multiple times in
succession where the test banners would then simply be redundant and
unnecessarily clutter the output. [Default: 1 - display test banners]
-s <seconds>
This option will cause netperf to sleep ‘<seconds>’ before
actually transferring data over the data connection. This may be
useful in situations where one wishes to start a great many netperf
instances and do not want the earlier ones affecting the ability of
the later ones to get established.
Added somewhere between versions 2.4.3 and 2.5.0.
-S
This option will cause an attempt to be made to set SO_KEEPALIVE on
the data socket of a test using the BSD sockets interface. The
attempt will be made on the netperf side of all tests, and will be
made on the netserver side of an omni or
migrated test. No indication of failure is given
unless debug output is enabled with the global -d option.
Added in version 2.5.0.
-t testname
This option is used to tell netperf which test you wish to run. As of
this writing, valid values for testname include:
Not all tests are always compiled into netperf. In particular, the
“XTI,” “SCTP,” “UNIXDOMAIN,” and “DL*” tests are only included in
netperf when configured with
--enable-[xti|sctp|unixdomain|dlpi]=yes.
Netperf only runs one type of test no matter how many -t
options may be present on the command-line. The last -t
global command-line option will determine the test to be
run. [Default: TCP_STREAM]
-T <optionspec>
This option controls the CPU, and probably by extension memory,
affinity of netperf and/or netserver.
netperf -T 1
will bind both netperf and netserver to “CPU 1” on their respective
systems.
netperf -T 1,
will bind just netperf to “CPU 1” and will leave netserver unbound.
netperf -T ,2
will leave netperf unbound and will bind netserver to “CPU 2.”
netperf -T 1,2
will bind netperf to “CPU 1” and netserver to “CPU 2.”
This can be particularly useful when investigating performance issues
involving where processes run relative to where NIC interrupts are
processed or where NICs allocate their DMA buffers.
-v verbosity
This option controls how verbose netperf will be in its output, and is
often used in conjunction with the -P option. If the
verbosity is set to a value of “0” then only the test's SFM (Single
Figure of Merit) is displayed. If local CPU utilization is requested via the -c option then the SFM is
the local service demand. Othersise, if remote CPU utilization is
requested via the -C option then the SFM is the remote
service demand. If neither local nor remote CPU utilization are
requested the SFM will be the measured throughput or transaction rate
as implied by the test specified with the -t option.
If the verbosity level is set to “1” then the “normal” netperf
result output for each test is displayed.
If the verbosity level is set to “2” then “extra” information will
be displayed. This may include, but is not limited to the number of
send or recv calls made and the average number of bytes per send or
recv call, or a histogram of the time spent in each send() call or for
each transaction if netperf was configured with
--enable-histogram=yes. [Default: 1 - normal verbosity]
In an omni test the verbosity setting is largely
ignored, save for when asking for the time histogram to be displayed.
In version 2.5.0 there is no output selector for the histogram and so it remains displayed only when the
verbosity level is set to 2.
-V
This option displays the netperf version and then exits.
Added in netperf 2.4.4.
-w time
If netperf was configured with --enable-intervals=yes then
this value will set the inter-burst time to time milliseconds, and the
-b option will set the number of sends per burst. The actual
inter-burst time may vary depending on the system's timer resolution.
-W <sizespec>
This option controls the number of buffers in the send (first or only
value) and or receive (second or only value) buffer rings. Unlike
some benchmarks, netperf does not continuously send or receive from a
single buffer. Instead it rotates through a ring of
buffers. [Default: One more than the size of the send or receive
socket buffer sizes (-s and/or -S options) divided
by the send -m or receive -M buffer size
respectively]
-4
Specifying this option will set both the local and remote address
families to AF_INET - that is use only IPv4 addresses on the control
connection. This can be overridden by a subsequent -6,
-H or -L option. Basically, the last option
explicitly specifying an address family wins. Unless overridden by a
test-specific option, this will be inherited for the data connection
as well.
-6
Specifying this option will set both local and and remote address
families to AF_INET6 - that is use only IPv6 addresses on the control
connection. This can be overridden by a subsequent -4,
-H or -L option. Basically, the last address family
explicitly specified wins. Unless overridden by a test-specific
option, this will be inherited for the data connection as well.
The most commonly measured aspect of networked system performance is
that of bulk or unidirectional transfer performance. Everyone wants
to know how many bits or bytes per second they can push across the
network. The classic netperf convention for a bulk data transfer test
name is to tack a “_STREAM” suffix to a test name.
There are any number of things which can affect the performance of a
bulk transfer test.
Certainly, absent compression, bulk-transfer tests can be limited by
the speed of the slowest link in the path from the source to the
destination. If testing over a gigabit link, you will not see more
than a gigabit :) Such situations can be described as being
network-limited or NIC-limited.
CPU utilization can also affect the results of a bulk-transfer test.
If the networking stack requires a certain number of instructions or
CPU cycles per KB of data transferred, and the CPU is limited in the
number of instructions or cycles it can provide, then the transfer can
be described as being CPU-bound.
A bulk-transfer test can be CPU bound even when netperf reports less
than 100% CPU utilization. This can happen on an MP system where one
or more of the CPUs saturate at 100% but other CPU's remain idle.
Typically, a single flow of data, such as that from a single instance
of a netperf _STREAM test cannot make use of much more than the power
of one CPU. Exceptions to this generally occur when netperf and/or
netserver run on CPU(s) other than the CPU(s) taking interrupts from
the NIC(s). In that case, one might see as much as two CPUs' worth of
processing being used to service the flow of data.
Distance and the speed-of-light can affect performance for a
bulk-transfer; often this can be mitigated by using larger windows.
One common limit to the performance of a transport using window-based
flow-control is:
Throughput <= WindowSize/RoundTripTime
As the sender can only have a window's-worth of data outstanding on
the network at any one time, and the soonest the sender can receive a
window update from the receiver is one RoundTripTime (RTT). TCP and
SCTP are examples of such protocols.
Packet losses and their effects can be particularly bad for
performance. This is especially true if the packet losses result in
retransmission timeouts for the protocol(s) involved. By the time a
retransmission timeout has happened, the flow or connection has sat
idle for a considerable length of time.
On many platforms, some variant on the netstat command can
be used to retrieve statistics about packet loss and
retransmission. For example:
netstat -p tcp
will retrieve TCP statistics on the HP-UX Operating System. On other
platforms, it may not be possible to retrieve statistics for a
specific protocol and something like:
netstat -s
would be used instead.
Many times, such network statistics are keep since the time the stack
started, and we are only really interested in statistics from when
netperf was running. In such situations something along the lines of:
netstat -p tcp > before
netperf -t TCP_mumble...
netstat -p tcp > after
is indicated. The
beforeafter utility
can be used to subtract the statistics in before from the
statistics in after:
beforeafter before after > delta
and then one can look at the statistics in delta. Beforeafter
is distributed in source form so one can compile it on the platform(s)
of interest.
If running a version 2.5.0 or later “omni” test under Linux one can
include either or both of:
LOCAL_TRANSPORT_RETRANS
REMOTE_TRANSPORT_RETRANS
in the values provided via a test-specific -o, -O,
or -k output selction option and netperf will report the
retransmissions experienced on the data connection, as reported via a
getsockopt(TCP_INFO) call. If confidence intervals have been
requested via the global -I or -i options, the
reported value(s) will be for the last iteration. If the test is over
a protocol other than TCP, or on a platform other than Linux, the
results are undefined.
While it was written with HP-UX's netstat in mind, the
annotated netstat writeup may be helpful with other platforms as well.
Many “test-specific” options are actually common across the
different tests. For those tests involving TCP, UDP and SCTP, whether
using the BSD Sockets or the XTI interface those common options
include:
-h
Display the test-suite-specific usage string and exit. For a TCP_ or
UDP_ test this will be the usage string from the source file
nettest_bsd.c. For an XTI_ test, this will be the usage string from
the source file nettest_xti.c. For an SCTP test, this will be the
usage string from the source file nettest_sctp.c.
-H <optionspec>
Normally, the remote hostname|IP and address family information is
inherited from the settings for the control connection (eg global
command-line -H, -4 and/or -6 options).
The test-specific -H will override those settings for the
data (aka test) connection only. Settings for the control connection
are left unchanged.
-L <optionspec>
The test-specific -L option is identical to the test-specific
-H option except it affects the local hostname|IP and address
family information. As with its global command-line counterpart, this
is generally only useful when measuring though those evil, end-to-end
breaking things called firewalls.
-m bytes
Set the size of the buffer passed-in to the “send” calls of a
_STREAM test. Note that this may have only an indirect effect on the
size of the packets sent over the network, and certain Layer 4
protocols do _not_ preserve or enforce message boundaries, so setting
-m for the send size does not necessarily mean the receiver
will receive that many bytes at any one time. By default the units are
bytes, but suffix of “G,” “M,” or “K” will specify the units to
be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of “g,”
“m” or “k” will specify units of 10^9, 10^6 or 10^3 bytes
respectively. For example:
-m 32K
will set the size to 32KB or 32768 bytes. [Default: the local send
socket buffer size for the connection - either the system's default or
the value set via the -s option.]
-M bytes
Set the size of the buffer passed-in to the “recv” calls of a
_STREAM test. This will be an upper bound on the number of bytes
received per receive call. By default the units are bytes, but suffix
of “G,” “M,” or “K” will specify the units to be 2^30 (GB), 2^20
(MB) or 2^10 (KB) respectively. A suffix of “g,” “m” or “k”
will specify units of 10^9, 10^6 or 10^3 bytes respectively. For
example:
-M 32K
will set the size to 32KB or 32768 bytes. [Default: the remote receive
socket buffer size for the data connection - either the system's
default or the value set via the -S option.]
-P <optionspec>
Set the local and/or remote port numbers for the data connection.
-s <sizespec>
This option sets the local (netperf) send and receive socket buffer
sizes for the data connection to the value(s) specified. Often, this
will affect the advertised and/or effective TCP or other window, but
on some platforms it may not. By default the units are bytes, but
suffix of “G,” “M,” or “K” will specify the units to be 2^30
(GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of “g,” “m”
or “k” will specify units of 10^9, 10^6 or 10^3 bytes
respectively. For example:
-s 128K
Will request the local send and receive socket buffer sizes to be
128KB or 131072 bytes.
While the historic expectation is that setting the socket buffer size
has a direct effect on say the TCP window, today that may not hold
true for all stacks. Further, while the historic expectation is that
the value specified in a setsockopt() call will be the value returned
via a getsockopt() call, at least one stack is known to deliberately
ignore history. When running under Windows a value of 0 may be used
which will be an indication to the stack the user wants to enable a
form of copy avoidance. [Default: -1 - use the system's default socket
buffer sizes]
-S <sizespec>
This option sets the remote (netserver) send and/or receive socket
buffer sizes for the data connection to the value(s) specified.
Often, this will affect the advertised and/or effective TCP or other
window, but on some platforms it may not. By default the units are
bytes, but suffix of “G,” “M,” or “K” will specify the units to
be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of “g,”
“m” or “k” will specify units of 10^9, 10^6 or 10^3 bytes
respectively. For example:
-s 128K
Will request the remote send and receive socket buffer sizes to be
128KB or 131072 bytes.
While the historic expectation is that setting the socket buffer size
has a direct effect on say the TCP window, today that may not hold
true for all stacks. Further, while the historic expectation is that
the value specified in a setsockopt() call will be the value returned
via a getsockopt() call, at least one stack is known to deliberately
ignore history. When running under Windows a value of 0 may be used
which will be an indication to the stack the user wants to enable a
form of copy avoidance. [Default: -1 - use the system's default socket
buffer sizes]
-4
Set the local and remote address family for the data connection to
AF_INET - ie use IPv4 addressing only. Just as with their global
command-line counterparts the last of the -4, -6,
-H or -L option wins for their respective address
families.
-6
This option is identical to its -4 cousin, but requests IPv6
addresses for the local and remote ends of the data connection.
The TCP_STREAM test is the default test in netperf. It is quite
simple, transferring some quantity of data from the system running
netperf to the system running netserver. While time spent
establishing the connection is not included in the throughput
calculation, time spent flushing the last of the data to the remote at
the end of the test is. This is how netperf knows that all the data
it sent was received by the remote. In addition to the options common to STREAM tests, the
following test-specific options can be included to possibly alter the
behavior of the test:
-C
This option will set TCP_CORK mode on the data connection on those
systems where TCP_CORK is defined (typically Linux). A full
description of TCP_CORK is beyond the scope of this manual, but in a
nutshell it forces sub-MSS sends to be buffered so every segment sent
is Maximum Segment Size (MSS) unless the application performs an
explicit flush operation or the connection is closed. At present
netperf does not perform any explicit flush operations. Setting
TCP_CORK may improve the bitrate of tests where the “send size”
(-m option) is smaller than the MSS. It should also improve
(make smaller) the service demand.
The Linux tcp(7) manpage states that TCP_CORK cannot be used in
conjunction with TCP_NODELAY (set via the -d option), however
netperf does not validate command-line options to enforce that.
-D
This option will set TCP_NODELAY on the data connection on those
systems where TCP_NODELAY is defined. This disables something known
as the Nagle Algorithm, which is intended to make the segments TCP
sends as large as reasonably possible. Setting TCP_NODELAY for a
TCP_STREAM test should either have no effect when the send size
(-m option) is larger than the MSS or will decrease reported
bitrate and increase service demand when the send size is smaller than
the MSS. This stems from TCP_NODELAY causing each sub-MSS send to be
its own TCP segment rather than being aggregated with other small
sends. This means more trips up and down the protocol stack per KB of
data transferred, which means greater CPU utilization.
If setting TCP_NODELAY with -D affects throughput and/or
service demand for tests where the send size (-m) is larger
than the MSS it suggests the TCP/IP stack's implementation of the
Nagle Algorithm _may_ be broken, perhaps interpreting the Nagle
Algorithm on a segment by segment basis rather than the proper user
send by user send basis. However, a better test of this can be
achieved with the TCP_RR test.
Here is an example of a basic TCP_STREAM test, in this case from a
Debian Linux (2.6 kernel) system to an HP-UX 11iv2 (HP-UX 11.23)
system:
$ netperf -H lag
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
32768 16384 16384 10.00 80.42
We see that the default receive socket buffer size for the receiver
(lag - HP-UX 11.23) is 32768 bytes, and the default socket send buffer
size for the sender (Debian 2.6 kernel) is 16384 bytes, however Linux
does “auto tuning” of socket buffer and TCP window sizes, which
means the send socket buffer size may be different at the end of the
test than it was at the beginning. This is addressed in the omni tests added in version 2.5.0 and output selection. Througput is expressed as 10^6 (aka
Mega) bits per second, and the test ran for 10 seconds. IPv4
addresses (AF_INET) were used.
A TCP_MAERTS (MAERTS is STREAM backwards) test is “just like” a
TCP_STREAM test except the data flows from the netserver to the
netperf. The global command-line -F option is ignored for
this test type. The test-specific command-line -C option is
ignored for this test type.
Here is an example of a TCP_MAERTS test between the same two systems
as in the example for the TCP_STREAM test. This time we request
larger socket buffers with -s and -S options:
$ netperf -H lag -t TCP_MAERTS -- -s 128K -S 128K
TCP MAERTS TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
221184 131072 131072 10.03 81.14
Where we see that Linux, unlike HP-UX, may not return the same value
in a getsockopt() as was requested in the prior setsockopt().
This test is included more for benchmarking convenience than anything
else.
The TCP_SENDFILE test is “just like” a TCP_STREAM test except
netperf the platform's sendfile() call instead of calling
send(). Often this results in a zero-copy operation
where data is sent directly from the filesystem buffer cache. This
_should_ result in lower CPU utilization and possibly higher
throughput. If it does not, then you may want to contact your
vendor(s) because they have a problem on their hands.
Zero-copy mechanisms may also alter the characteristics (size and
number of buffers per) of packets passed to the NIC. In many stacks,
when a copy is performed, the stack can “reserve” space at the
beginning of the destination buffer for things like TCP, IP and Link
headers. This then has the packet contained in a single buffer which
can be easier to DMA to the NIC. When no copy is performed, there is
no opportunity to reserve space for headers and so a packet will be
contained in two or more buffers.
As of some time before version 2.5.0, the global -F option is no longer required for this test. If it is not
specified, netperf will create a temporary file, which it will delete
at the end of the test. If the -F option is specified it
must reference a file of at least the size of the send ring
(See the global -W option.) multiplied by
the send size (See the test-specific -m option.). All other TCP-specific options
remain available and optional.
In this first example:
$ netperf -H lag -F ../src/netperf -t TCP_SENDFILE -- -s 128K -S 128K
TCP SENDFILE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET
alloc_sendfile_buf_ring: specified file too small.
file must be larger than send_width * send_size
we see what happens when the file is too small. Here:
$ netperf -H lag -F /boot/vmlinuz-2.6.8-1-686 -t TCP_SENDFILE -- -s 128K -S 128K
TCP SENDFILE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
131072 221184 221184 10.02 81.83
A UDP_STREAM test is similar to a TCP_STREAM test except UDP is
used as the transport rather than TCP.
A UDP_STREAM test has no end-to-end flow control - UDP provides none
and neither does netperf. However, if you wish, you can configure
netperf with --enable-intervals=yes to enable the global
command-line -b and -w options to pace bursts of
traffic onto the network.
This has a number of implications.
The biggest of these implications is the data which is sent might not
be received by the remote. For this reason, the output of a
UDP_STREAM test shows both the sending and receiving throughput. On
some platforms, it may be possible for the sending throughput to be
reported as a value greater than the maximum rate of the link. This
is common when the CPU(s) are faster than the network and there is no
intra-stack flow-control.
Here is an example of a UDP_STREAM test between two systems connected
by a 10 Gigabit Ethernet link:
$ netperf -t UDP_STREAM -H 192.168.2.125 -- -m 32768
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.2.125 (192.168.2.125) port 0 AF_INET
Socket Message Elapsed Messages
Size Size Time Okay Errors Throughput
bytes bytes secs # # 10^6bits/sec
124928 32768 10.00 105672 0 2770.20
135168 10.00 104844 2748.50
The first line of numbers are statistics from the sending (netperf)
side. The second line of numbers are from the receiving (netserver)
side. In this case, 105672 - 104844 or 828 messages did not make it
all the way to the remote netserver process.
If the value of the -m option is larger than the local send
socket buffer size (-s option) netperf will likely abort with
an error message about how the send call failed:
netperf -t UDP_STREAM -H 192.168.2.125
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.2.125 (192.168.2.125) port 0 AF_INET
udp_send: data send error: Message too long
If the value of the -m option is larger than the remote
socket receive buffer, the reported receive throughput will likely be
zero as the remote UDP will discard the messages as being too large to
fit into the socket buffer.
$ netperf -t UDP_STREAM -H 192.168.2.125 -- -m 65000 -S 32768
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.2.125 (192.168.2.125) port 0 AF_INET
Socket Message Elapsed Messages
Size Size Time Okay Errors Throughput
bytes bytes secs # # 10^6bits/sec
124928 65000 10.00 53595 0 2786.99
65536 10.00 0 0.00
The example above was between a pair of systems running a “Linux”
kernel. Notice that the remote Linux system returned a value larger
than that passed-in to the -S option. In fact, this value
was larger than the message size set with the -m option.
That the remote socket buffer size is reported as 65536 bytes would
suggest to any sane person that a message of 65000 bytes would fit,
but the socket isn't _really_ 65536 bytes, even though Linux is
telling us so. Go figure.
An XTI_TCP_STREAM test is simply a TCP_STREAM test using the XTI
rather than BSD Sockets interface. The test-specific -X
<devspec> option can be used to specify the name of the local and/or
remote XTI device files, which is required by the t_open() call
made by netperf XTI tests.
The XTI_TCP_STREAM test is only present if netperf was configured with
--enable-xti=yes. The remote netserver must have also been
configured with --enable-xti=yes.
An XTI_UDP_STREAM test is simply a UDP_STREAM test using the XTI
rather than BSD Sockets Interface. The test-specific -X
<devspec> option can be used to specify the name of the local and/or
remote XTI device files, which is required by the t_open() call
made by netperf XTI tests.
The XTI_UDP_STREAM test is only present if netperf was configured with
--enable-xti=yes. The remote netserver must have also been
configured with --enable-xti=yes.
An SCTP_STREAM test is essentially a TCP_STREAM test using the SCTP
rather than TCP. The -D option will set SCTP_NODELAY, which
is much like the TCP_NODELAY option for TCP. The -C option
is not applicable to an SCTP test as there is no corresponding
SCTP_CORK option. The author is still figuring-out what the
test-specific -N option does :)
The SCTP_STREAM test is only present if netperf was configured with
--enable-sctp=yes. The remote netserver must have also been
configured with --enable-sctp=yes.
A DLPI Connection Oriented Stream (DLCO_STREAM) test is very similar
in concept to a TCP_STREAM test. Both use reliable,
connection-oriented protocols. The DLPI test differs from the TCP
test in that its protocol operates only at the link-level and does not
include TCP-style segmentation and reassembly. This last difference
means that the value passed-in with the -m option must be
less than the interface MTU. Otherwise, the -m and
-M options are just like their TCP/UDP/SCTP counterparts.
Other DLPI-specific options include:
-D <devspec>
This option is used to provide the fully-qualified names for the local
and/or remote DPLI device files. The syntax is otherwise identical to
that of a sizespec.
-p <ppaspec>
This option is used to specify the local and/or remote DLPI PPA(s).
The PPA is used to identify the interface over which traffic is to be
sent/received. The syntax of a ppaspec is otherwise the same as
a sizespec.
-s sap
This option specifies the 802.2 SAP for the test. A SAP is somewhat
like either the port field of a TCP or UDP header or the protocol
field of an IP header. The specified SAP should not conflict with any
other active SAPs on the specified PPA's (-p option).
-w <sizespec>
This option specifies the local send and receive window sizes in units
of frames on those platforms which support setting such things.
-W <sizespec>
This option specifies the remote send and receive window sizes in
units of frames on those platforms which support setting such things.
The DLCO_STREAM test is only present if netperf was configured with
--enable-dlpi=yes. The remote netserver must have also been
configured with --enable-dlpi=yes.
A DLPI ConnectionLess Stream (DLCL_STREAM) test is analogous to a
UDP_STREAM test in that both make use of unreliable/best-effort,
connection-less transports. The DLCL_STREAM test differs from the
UDP_STREAM test in that the message size (-m option) must
always be less than the link MTU as there is no IP-like fragmentation
and reassembly available and netperf does not presume to provide one.
The test-specific command-line options for a DLCL_STREAM test are the
same as those for a DLCO_STREAM test.
The DLCL_STREAM test is only present if netperf was configured with
--enable-dlpi=yes. The remote netserver must have also been
configured with --enable-dlpi=yes.
A Unix Domain Stream Socket Stream test (STREAM_STREAM) is similar in
concept to a TCP_STREAM test, but using Unix Domain sockets. It is,
naturally, limited to intra-machine traffic. A STREAM_STREAM test
shares the -m, -M, -s and -S
options of the other _STREAM tests. In a STREAM_STREAM test the
-p option sets the directory in which the pipes will be
created rather than setting a port number. The default is to create
the pipes in the system default for the tempnam() call.
The STREAM_STREAM test is only present if netperf was configured with
--enable-unixdomain=yes. The remote netserver must have also been
configured with --enable-unixdomain=yes.
A Unix Domain Datagram Socket Stream test (SG_STREAM) is very much
like a TCP_STREAM test except that message boundaries are preserved.
In this way, it may also be considered similar to certain flavors of
SCTP test which can also preserve message boundaries.
All the options of a STREAM_STREAM test are applicable to a DG_STREAM
test.
The DG_STREAM test is only present if netperf was configured with
--enable-unixdomain=yes. The remote netserver must have also been
configured with --enable-unixdomain=yes.
Request/response performance is often overlooked, yet it is just as
important as bulk-transfer performance. While things like larger
socket buffers and TCP windows, and stateless offloads like TSO and
LRO can cover a multitude of latency and even path-length sins, those
sins cannot easily hide from a request/response test. The convention
for a request/response test is to have a _RR suffix. There are
however a few “request/response” tests that have other suffixes.
A request/response test, particularly synchronous, one transaction at
at time test such as those found by default in netperf, is
particularly sensitive to the path-length of the networking stack. An
_RR test can also uncover those platforms where the NIC's are strapped
by default with overbearing interrupt avoidance settings in an attempt
to increase the bulk-transfer performance (or rather, decrease the CPU
utilization of a bulk-transfer test). This sensitivity is most acute
for small request and response sizes, such as the single-byte default
for a netperf _RR test.
While a bulk-transfer test reports its results in units of bits or
bytes transfered per second, by default a mumble_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. If one
is confident about the symmetry of the connection, the average one-way
latency can be taken as one-half the average round-trip latency. As of
version 2.5.0 (actually slightly before) netperf still does not do the
latter, but will do the former if one sets the verbosity to 2 for a
classic netperf test, or includes the apropriate output selector in an omni test. It
will also allow the user to switch the throughput units from
transactions per secont to bits or bytes per second with the global
-f option.
Most if not all the Issues in Bulk Transfer apply to
request/response. The issue of round-trip latency is even more
important as netperf generally only has one transaction outstanding at
a time.
A single instance of a one transaction outstanding _RR test should
_never_ completely saturate the CPU of a system. If testing between
otherwise evenly matched systems, the symmetric nature of a _RR test
with equal request and response sizes should result in equal CPU
loading on both systems. However, this may not hold true on MP
systems, particularly if one CPU binds the netperf and netserver
differently via the global -T option.
For smaller request and response sizes packet loss is a bigger issue
as there is no opportunity for a fast retransmit or
retransmission prior to a retransmission timer expiring.
Virtualization may considerably increase the effective path length of
a networking stack. While this may not preclude achieving link-rate
on a comparatively slow link (eg 1 Gigabit Ethernet) on a _STREAM
test, it can show-up as measurably fewer transactions per second on an
_RR test. However, this may still be masked by interrupt coalescing
in the NIC/driver.
Certain NICs have ways to minimize the number of interrupts sent to
the host. If these are strapped badly they can significantly reduce
the performance of something like a single-byte request/response test.
Such setups are distinguised by seriously low reported CPU utilization
and what seems like a low (even if in the thousands) transaction per
second rate. Also, if you run such an OS/driver combination on faster
or slower hardware and do not see a corresponding change in the
transaction rate, chances are good that the drvier is strapping the
NIC with aggressive interrupt avoidance settings. Good for bulk
throughput, but bad for latency.
Some drivers may try to automagically adjust the interrupt avoidance
settings. If they are not terribly good at it, you will see
considerable run-to-run variation in reported transaction rates.
Particularly if you “mix-up” _STREAM and _RR tests.
Many “test-specific” options are actually common across the
different tests. For those tests involving TCP, UDP and SCTP, whether
using the BSD Sockets or the XTI interface those common options
include:
-h
Display the test-suite-specific usage string and exit. For a TCP_ or
UDP_ test this will be the usage string from the source file
nettest_bsd.c. For an XTI_ test, this will be the usage string
from the source file src/nettest_xti.c. For an SCTP test, this
will be the usage string from the source file
src/nettest_sctp.c.
-H <optionspec>
Normally, the remote hostname|IP and address family information is
inherited from the settings for the control connection (eg global
command-line -H, -4 and/or -6 options.
The test-specific -H will override those settings for the
data (aka test) connection only. Settings for the control connection
are left unchanged. This might be used to cause the control and data
connections to take different paths through the network.
-L <optionspec>
The test-specific -L option is identical to the test-specific
-H option except it affects the local hostname|IP and address
family information. As with its global command-line counterpart, this
is generally only useful when measuring though those evil, end-to-end
breaking things called firewalls.
-P <optionspec>
Set the local and/or remote port numbers for the data connection.
-r <sizespec>
This option sets the request (first value) and/or response (second
value) sizes for an _RR test. By default the units are bytes, but a
suffix of “G,” “M,” or “K” will specify the units to be 2^30
(GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of “g,” “m”
or “k” will specify units of 10^9, 10^6 or 10^3 bytes
respectively. For example:
-r 128,16K
Will set the request size to 128 bytes and the response size to 16 KB
or 16384 bytes. [Default: 1 - a single-byte request and response ]
-s <sizespec>
This option sets the local (netperf) send and receive socket buffer
sizes for the data connection to the value(s) specified. Often, this
will affect the advertised and/or effective TCP or other window, but
on some platforms it may not. By default the units are bytes, but a
suffix of “G,” “M,” or “K” will specify the units to be 2^30
(GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of “g,” “m”
or “k” will specify units of 10^9, 10^6 or 10^3 bytes
respectively. For example:
-s 128K
Will request the local send (netperf) and receive socket buffer sizes
to be 128KB or 131072 bytes.
While the historic expectation is that setting the socket buffer size
has a direct effect on say the TCP window, today that may not hold
true for all stacks. When running under Windows a value of 0 may be
used which will be an indication to the stack the user wants to enable
a form of copy avoidance. [Default: -1 - use the system's default
socket buffer sizes]
-S <sizespec>
This option sets the remote (netserver) send and/or receive socket
buffer sizes for the data connection to the value(s) specified.
Often, this will affect the advertised and/or effective TCP or other
window, but on some platforms it may not. By default the units are
bytes, but a suffix of “G,” “M,” or “K” will specify the units
to be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of
“g,” “m” or “k” will specify units of 10^9, 10^6 or 10^3 bytes
respectively. For example:
-s 128K
Will request the remote (netserver) send and receive socket buffer
sizes to be 128KB or 131072 bytes.
While the historic expectation is that setting the socket buffer size
has a direct effect on say the TCP window, today that may not hold
true for all stacks. When running under Windows a value of 0 may be
used which will be an indication to the stack the user wants to enable
a form of copy avoidance. [Default: -1 - use the system's default
socket buffer sizes]
-4
Set the local and remote address family for the data connection to
AF_INET - ie use IPv4 addressing only. Just as with their global
command-line counterparts the last of the -4, -6,
-H or -L option wins for their respective address
families.
-6
This option is identical to its -4 cousin, but requests IPv6
addresses for the local and remote ends of the data connection.
A TCP_RR (TCP Request/Response) test is requested by passing a value
of “TCP_RR” to the global -t command-line option. A TCP_RR
test can be thought-of as a user-space to user-space ping with
no think time - it is by default a synchronous, one transaction at a
time, request/response test.
The transaction rate is the number of complete transactions exchanged
divided by the length of time it took to perform those transactions.
If the two Systems Under Test are otherwise identical, a TCP_RR test
with the same request and response size should be symmetric - it
should not matter which way the test is run, and the CPU utilization
measured should be virtually the same on each system. If not, it
suggests that the CPU utilization mechanism being used may have some,
well, issues measuring CPU utilization completely and accurately.
Time to establish the TCP connection is not counted in the result. If
you want connection setup overheads included, you should consider the
TPC_CC or TCP_CRR tests.
If specifying the -D option to set TCP_NODELAY and disable
the Nagle Algorithm increases the transaction rate reported by a
TCP_RR test, it implies the stack(s) over which the TCP_RR test is
running have a broken implementation of the Nagle Algorithm. Likely
as not they are interpreting Nagle on a segment by segment basis
rather than a user send by user send basis. You should contact your
stack vendor(s) to report the problem to them.
Here is an example of two systems running a basic TCP_RR test over a
10 Gigabit Ethernet link:
netperf -t TCP_RR -H 192.168.2.125
TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.2.125 (192.168.2.125) 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
16384 87380 1 1 10.00 29150.15
16384 87380
In this example the request and response sizes were one byte, the
socket buffers were left at their defaults, and the test ran for all
of 10 seconds. The transaction per second rate was rather good for
the time :)
A TCP_CC (TCP Connect/Close) test is requested by passing a value of
“TCP_CC” to the global -t option. A TCP_CC test simply
measures how fast the pair of systems can open and close connections
between one another in a synchronous (one at a time) manner. While
this is considered an _RR test, no request or response is exchanged
over the connection.
The issue of TIME_WAIT reuse is an important one for a TCP_CC test.
Basically, TIME_WAIT reuse is when a pair of systems churn through
connections fast enough that they wrap the 16-bit port number space in
less time than the length of the TIME_WAIT state. While it is indeed
theoretically possible to “reuse” a connection in TIME_WAIT, the
conditions under which such reuse is possible are rather rare. An
attempt to reuse a connection in TIME_WAIT can result in a non-trivial
delay in connection establishment.
Basically, any time the connection churn rate approaches:
Sizeof(clientportspace) / Lengthof(TIME_WAIT)
there is the risk of TIME_WAIT reuse. To minimize the chances of this
happening, netperf will by default select its own client port numbers
from the range of 5000 to 65535. On systems with a 60 second
TIME_WAIT state, this should allow roughly 1000 transactions per
second. The size of the client port space used by netperf can be
controlled via the test-specific -p option, which takes a
sizespec as a value setting the minimum (first value) and
maximum (second value) port numbers used by netperf at the client end.
Since no requests or responses are exchanged during a TCP_CC test,
only the -H, -L, -4 and -6 of the
“common” test-specific options are likely to have an effect, if any,
on the results. The -s and -S options _may_ have
some effect if they alter the number and/or type of options carried in
the TCP SYNchronize segments, such as Window Scaling or Timestamps.
The -P and -r options are utterly ignored.
Since connection establishment and tear-down for TCP is not symmetric,
a TCP_CC test is not symmetric in its loading of the two systems under
test.
The TCP Connect/Request/Response (TCP_CRR) test is requested by
passing a value of “TCP_CRR” to the global -t command-line
option. A TCP_CRR test is like a merger of a TCP_RR and
TCP_CC test which measures the performance of establishing a
connection, exchanging a single request/response transaction, and
tearing-down that connection. This is very much like what happens in
an HTTP 1.0 or HTTP 1.1 connection when HTTP Keepalives are not used.
In fact, the TCP_CRR test was added to netperf to simulate just that.
Since a request and response are exchanged the -r,
-s and -S options can have an effect on the
performance.
The issue of TIME_WAIT reuse exists for the TCP_CRR test just as it
does for the TCP_CC test. Similarly, since connection establishment
and tear-down is not symmetric, a TCP_CRR test is not symmetric even
when the request and response sizes are the same.
A UDP Request/Response (UDP_RR) test is requested by passing a value
of “UDP_RR” to a global -t option. It is very much the
same as a TCP_RR test except UDP is used rather than TCP.
UDP does not provide for retransmission of lost UDP datagrams, and
netperf does not add anything for that either. This means that if
_any_ request or response is lost, the exchange of requests and
responses will stop from that point until the test timer expires.
Netperf will not really “know” this has happened - the only symptom
will be a low transaction per second rate. If --enable-burst
was included in the configure command and a test-specific
-b option used, the UDP_RR test will “survive” the loss of
requests and responses until the sum is one more than the value passed
via the -b option. It will though almost certainly run more
slowly.
The netperf side of a UDP_RR test will call connect() on its
data socket and thenceforth use the send() and recv()
socket calls. The netserver side of a UDP_RR test will not call
connect() and will use recvfrom() and sendto()
calls. This means that even if the request and response sizes are the
same, a UDP_RR test is _not_ symmetric in its loading of the two
systems under test.
Here is an example of a UDP_RR test between two otherwise
identical two-CPU systems joined via a 1 Gigabit Ethernet network:
$ netperf -T 1 -H 192.168.1.213 -t UDP_RR -c -C
UDP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.213 (192.168.1.213) port 0 AF_INET
Local /Remote
Socket Size Request Resp. Elapsed Trans. CPU CPU S.dem S.dem
Send Recv Size Size Time Rate local remote local remote
bytes bytes bytes bytes secs. per sec % I % I us/Tr us/Tr
65535 65535 1 1 10.01 15262.48 13.90 16.11 18.221 21.116
65535 65535
This example includes the -c and -C options to
enable CPU utilization reporting and shows the asymmetry in CPU
loading. The -T option was used to make sure netperf and
netserver ran on a given CPU and did not move around during the test.
An XTI_TCP_RR test is essentially the same as a TCP_RR test only
using the XTI rather than BSD Sockets interface. It is requested by
passing a value of “XTI_TCP_RR” to the -t global
command-line option.
The test-specific options for an XTI_TCP_RR test are the same as those
for a TCP_RR test with the addition of the -X <devspec> option to
specify the names of the local and/or remote XTI device file(s).
An XTI_TCP_CC test is essentially the same as a TCP_CC
test, only using the XTI rather than BSD Sockets interface.
The test-specific options for an XTI_TCP_CC test are the same as those
for a TCP_CC test with the addition of the -X <devspec> option to
specify the names of the local and/or remote XTI device file(s).
The XTI_TCP_CRR test is essentially the same as a
TCP_CRR test, only using the XTI rather than BSD Sockets
interface.
The test-specific options for an XTI_TCP_CRR test are the same as those
for a TCP_RR test with the addition of the -X <devspec> option to
specify the names of the local and/or remote XTI device file(s).
An XTI_UDP_RR test is essentially the same as a UDP_RR test only using
the XTI rather than BSD Sockets interface. It is requested by passing
a value of “XTI_UDP_RR” to the -t global command-line
option.
The test-specific options for an XTI_UDP_RR test are the same as those
for a UDP_RR test with the addition of the -X <devspec>
option to specify the name of the local and/or remote XTI device
file(s).
Ultimately, Netperf4 will be the preferred benchmark to
use when one wants to measure aggregate performance because netperf
has no support for explicit synchronization of concurrent tests. Until
netperf4 is ready for prime time, one can make use of the heuristics
and procedures mentioned here for the 85% solution.
Basically, there are two ways to measure aggregate performance with
netperf. The first is to run multiple, concurrent netperf tests and
can be applied to any of the netperf tests. The second is to
configure netperf with --enable-burst and is applicable to the
TCP_RR test.
Netperf4 is the preferred benchmark to use when one
wants to measure aggregate performance because netperf has no support
for explicit synchronization of concurrent tests. This leaves
netperf2 results vulnerable to skew errors.
However, since there are times when netperf4 is unavailable it may be
necessary to run netperf. The skew error can be minimized by making
use of the confidence interval functionality. Then one simply
launches multiple tests from the shell using a for loop or the
like:
for i in 1 2 3 4
do
netperf -t TCP_STREAM -H tardy.cup.hp.com -i 10 -P 0 &
done
which will run four, concurrent TCP_STREAM tests from
the system on which it is executed to tardy.cup.hp.com. Each
concurrent netperf will iterate 10 times thanks to the -i
option and will omit the test banners (option -P) for
brevity. The output looks something like this:
We can take the sum of the results and be reasonably confident that
the aggregate performance was 940 Mbits/s.
If you see warnings about netperf not achieving the confidence
intervals, the best thing to do is to increase the number of
iterations with -i and/or increase the run length of each
iteration with -l.
You can also enable local (-c) and/or remote (-C)
CPU utilization:
If the CPU utilizations reported for the same system are the same or
very very close you can be reasonably confident that skew error is
minimized. Presumeably one could then omit -i but that is
not advised, particularly when/if the CPU utilization approaches 100
percent. In the example above we see that the CPU utilization on the
local system remains the same for all four tests, and is only off by
0.01 out of 5.09 on the remote system. As the number of CPUs in the
system increases, and so too the odds of saturating a single CPU, the
accuracy of similar CPU utilization implying little skew error is
diminished. This is also the case for those increasingly rare single
CPU systems if the utilization is reported as 100% or very close to
it.
NOTE: It is very important to rememeber that netperf is calculating
system-wide CPU utilization. When calculating the service demand
(those last two columns in the output above) each netperf assumes it
is the only thing running on the system. This means that for
concurrent tests the service demands reported by netperf will be
wrong. One has to compute service demands for concurrent tests by
hand.
If you wish you can add a unique, global -B option to each
command line to append the given string to the output:
for i in 1 2 3 4
do
netperf -t TCP_STREAM -H tardy.cup.hp.com -B "this is test $i" -i 10 -P 0 &
done
87380 16384 16384 10.03 234.90 this is test 4
87380 16384 16384 10.03 234.41 this is test 2
87380 16384 16384 10.03 235.26 this is test 1
87380 16384 16384 10.03 235.09 this is test 3
You will notice that the tests completed in an order other than they
were started from the shell. This underscores why there is a threat
of skew error and why netperf4 is the preferred tool for aggregate
tests. Even if you see the Netperf Contributing Editor acting to the
contrary!-)
In addition to the aforementioned issue of skew error, there can be
other issues to consider when running concurrent netperf tests.
For example, when running concurrent tests over multiple interfaces,
one is not always assured that the traffic one thinks went over a
given interface actually did so. In particular, the Linux networking
stack takes a particularly strong stance on its following the so
called ‘weak end system model’. As such, it is willing to answer
ARP requests for any of its local IP addresses on any of its
interfaces. If multiple interfaces are connected to the same
broadcast domain, then even if they are configured into separate IP
subnets there is no a priori way of knowing which interface was
actually used for which connection(s). This can be addressed by
setting the ‘arp_ignore’ sysctl before configuring interfaces.
As it is quite important, we will repeat that it is very important to
rememeber that each concurrent netperf instance is calculating
system-wide CPU utilization. When calculating the service demand each
netperf assumes it is the only thing running on the system. This
means that for concurrent tests the service demands reported by
netperf will be wrong. One has to compute service demands for
concurrent tests by hand
Starting in version 2.5.0 --enable-burst=yes is the default,
which means one no longer must:
configure --enable-burst
To have burst-mode functionality present in netperf. This enables a
test-specific -b num option in TCP_RR,
UDP_RR and omni tests.
Normally, netperf will attempt to ramp-up the number of outstanding
requests to num plus one transactions in flight at one time.
The ramp-up is to avoid transactions being smashed together into a
smaller number of segments when the transport's congestion window (if
any) is smaller at the time than what netperf wants to have
outstanding at one time. If, however, the user specifies a negative
value for num this ramp-up is bypassed and the burst of sends
is made without consideration of transport congestion window.
This burst-mode is used as an alternative to or even in conjunction
with multiple-concurrent _RR tests and as a way to implement a
single-connection, bidirectional bulk-transfer test. When run with
just a single instance of netperf, increasing the burst size can
determine the maximum number of transactions per second which can be
serviced by a single process:
The global -v and -P options were used to minimize
the output to the single figure of merit which in this case the
transaction rate. The global -B option was used to more
clearly label the output, and the test-specific -b option
enabled by --enable-burst increase the number of transactions
in flight at one time.
Now, since the test-specific -D option was not specified to
set TCP_NODELAY, the stack was free to “bundle” requests and/or
responses into TCP segments as it saw fit, and since the default
request and response size is one byte, there could have been some
considerable bundling even in the absense of transport congestion
window issues. If one wants to try to achieve a closer to
one-to-one correspondence between a request and response and a TCP
segment, add the test-specific -D option:
You can see that this has a rather large effect on the reported
transaction rate. In this particular instance, the author believes it
relates to interactions between the test and interrupt coalescing
settings in the driver for the NICs used.
NOTE: Even if you set the -D option that is still not a
guarantee that each transaction is in its own TCP segments. You
should get into the habit of verifying the relationship between the
transaction rate and the packet rate via other means.
You can also combine --enable-burst functionality with
concurrent netperf tests. This would then be an “aggregate of
aggregates” if you like:
Since each netperf did hit the confidence intervals, we can be
reasonably certain that the aggregate transaction per second rate was
the sum of all four concurrent tests, or something just shy of 184,000
transactions per second. To get some idea if that was also the packet
per second rate, we could bracket that for loop with something
to gather statistics and run the results through
beforeafter:
/usr/sbin/ethtool -S eth2 > before
for i in 1 2 3 4
do
netperf -H 192.168.2.108 -l 60 -v 0 -P 0 -B "aggregate $i -b 8 -D" -t TCP_RR -- -b 8 -D &
done
wait
/usr/sbin/ethtool -S eth2 > after
52312.62 aggregate 2 -b 8 -D
50105.65 aggregate 4 -b 8 -D
50890.82 aggregate 1 -b 8 -D
50869.20 aggregate 3 -b 8 -D
beforeafter before after > delta
grep packets delta
rx_packets: 12251544
tx_packets: 12251550
This example uses ethtool because the system being used is
running Linux. Other platforms have other tools - for example HP-UX
has lanadmin:
lanadmin -g mibstats <ppa>
and of course one could instead use netstat.
The wait is important because we are launching concurrent
netperfs in the background. Without it, the second ethtool command
would be run before the tests finished and perhaps even before the
last of them got started!
The sum of the reported transaction rates is 204178 over 60 seconds,
which is a total of 12250680 transactions. Each transaction is the
exchange of a request and a response, so we multiply that by 2 to
arrive at 24501360.
The sum of the ethtool stats is 24503094 packets which matches what
netperf was reporting very well.
Had the request or response size differed, we would need to know how
it compared with the MSS for the connection.
Just for grins, here is the excercise repeated, using netstat
instead of ethtool
netstat -s -t > before
for i in 1 2 3 4
do
netperf -l 60 -H 192.168.2.108 -v 0 -P 0 -B "aggregate $i -b 8 -D" -t TCP_RR -- -b 8 -D & done
wait
netstat -s -t > after
51305.88 aggregate 4 -b 8 -D
51847.73 aggregate 2 -b 8 -D
50648.19 aggregate 3 -b 8 -D
53605.86 aggregate 1 -b 8 -D
beforeafter before after > delta
grep segments delta
12445708 segments received
12445730 segments send out
1 segments retransmited
0 bad segments received.
The sums are left as an excercise to the reader :)
Things become considerably more complicated if there are non-trvial
packet losses and/or retransmissions.
Of course all this checking is unnecessary if the test is a UDP_RR
test because UDP “never” aggregates multiple sends into the same UDP
datagram, and there are no ACKnowledgements in UDP. The loss of a
single request or response will not bring a “burst” UDP_RR test to a
screeching halt, but it will reduce the number of transactions
outstanding at any one time. A “burst” UDP_RR test will come to a
halt if the sum of the lost requests and responses reaches the value
specified in the test-specific -b option.
There are two ways to use netperf to measure the perfomance of
bidirectional transfer. The first is to run concurrent netperf tests
from the command line. The second is to configure netperf with
--enable-burst and use a single instance of the
TCP_RR test.
While neither method is more “correct” than the other, each is doing
so in different ways, and that has possible implications. For
instance, using the concurrent netperf test mechanism means that
multiple TCP connections and multiple processes are involved, whereas
using the single instance of TCP_RR there is only one TCP connection
and one process on each end. They may behave differently, especially
on an MP system.
If we had two hosts Fred and Ethel, we could simply run a netperf
TCP_STREAM test on Fred pointing at Ethel, and a
concurrent netperf TCP_STREAM test on Ethel pointing at Fred, but
since there are no mechanisms to synchronize netperf tests and we
would be starting tests from two different systems, there is a
considerable risk of skew error.
Far better would be to run simultaneous TCP_STREAM and
TCP_MAERTS tests from just one system, using the
concepts and procedures outlined in Running Concurrent Netperf Tests. Here then is an example:
We have used a for loop in the shell with just one iteration
because that will be much easier to get both tests started at more or
less the same time than doing it by hand. The global -P and
-v options are used because we aren't interested in anything
other than the throughput, and the global -B option is used
to tag each output so we know which was inbound and which outbound
relative to the system on which we were running netperf. Of course
that sense is switched on the system running netserver :) The use of
the global -i option is explained in Running Concurrent Netperf Tests.
Starting with version 2.5.0 the --enable-burst configure option
defaults to yes, and starting some time before version 2.5.0
but after 2.4.0 the global -f option would affect the
“throughput” reported by request/response tests. If one uses the
test-specific -b option to have several “transactions” in
flight at one time and the test-specific -r option to
increase their size, the test looks more and more like a
single-connection bidirectional transfer than a simple
request/response test.
So, putting it all together one can do something like:
netperf -f m -t TCP_RR -H 192.168.1.3 -v 2 -- -b 6 -r 32K -S 256K -S 256K
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.3 (192.168.1.3) port 0 AF_INET : interval : first burst 6
Local /Remote
Socket Size Request Resp. Elapsed
Send Recv Size Size Time Throughput
bytes Bytes bytes bytes secs. 10^6bits/sec
16384 87380 32768 32768 10.00 1821.30
524288 524288
Alignment Offset RoundTrip Trans Throughput
Local Remote Local Remote Latency Rate 10^6bits/s
Send Recv Send Recv usec/Tran per sec Outbound Inbound
8 0 0 0 2015.402 3473.252 910.492 910.492
to get a bidirectional bulk-throughput result. As one can see, the -v
2 output will include a number of interesting, related values.
NOTE: The logic behind --enable-burst is very simple, and there
are no calls to poll() or select() which means we want
to make sure that the send() calls will never block, or we run
the risk of deadlock with each side stuck trying to call send()
and neither calling recv().
Fortunately, this is easily accomplished by setting a “large enough”
socket buffer size with the test-specific -s and -S
options. Presently this must be performed by the user. Future
versions of netperf might attempt to do this automagically, but there
are some issues to be worked-out.
8.3 Implications of Concurrent Tests vs Burst Request/Response
There are perhaps subtle but important differences between using
concurrent unidirectional tests vs a burst-mode request to measure
bidirectional performance.
Broadly speaking, a single “connection” or “flow” of traffic
cannot make use of the services of more than one or two CPUs at either
end. Whether one or two CPUs will be used processing a flow will
depend on the specifics of the stack(s) involved and whether or not
the global -T option has been used to bind netperf/netserver
to specific CPUs.
When using concurrent tests there will be two concurrent connections
or flows, which means that upwards of four CPUs will be employed
processing the packets (global -T used, no more than two if
not), however, with just a single, bidirectional request/response test
no more than two CPUs will be employed (only one if the global
-T is not used).
If there is a CPU bottleneck on either system this may result in
rather different results between the two methods.
Also, with a bidirectional request/response test there is something of
a natural balance or synchronization between inbound and outbound - a
response will not be sent until a request is received, and (once the
burst level is reached) a subseqent request will not be sent until a
response is received. This may mask favoritism in the NIC between
inbound and outbound processing.
With two concurrent unidirectional tests there is no such
synchronization or balance and any favoritism in the NIC may be exposed.
Beginning with version 2.5.0, netperf begins a migration to the
‘omni’ tests or “Two routines to measure them all.” The code for
the omni tests can be found in src/nettest_omni.c and the goal
is to make it easier for netperf to support multiple protocols and
report a great many additional things about the systems under test.
Additionally, a flexible output selection mechanism is present which
allows the user to chose specifically what values she wishes to have
reported and in what format.
The omni tests are included by default in version 2.5.0. To disable
them, one must:
./configure --enable-omni=no ...
and remake netperf. Remaking netserver is optional because even in
2.5.0 it has “unmigrated” netserver side routines for the classic
(eg src/nettest_bsd.c) tests.
One access the omni tests “natively” by using a value of “OMNI”
with the global -t test-selection option. This will then
cause netperf to use the code in src/nettest_omni.c and in
particular the test-specific options parser for the omni tests. The
test-specific options for the omni tests are a superset of those for
“classic” tests. The options added by the omni tests are:
-c
This explicitly declares that the test is to include connection
establishment and tear-down as in either a TCP_CRR or TCP_CC test.
-d <direction>
This option sets the direction of the test relative to the netperf
process. As of version 2.5.0 one can use the following in a
case-insenstive manner:
send, stream, transmit, xmit or 2
Any of which will cause netperf to send to the netserver.
recv, receive, maerts or 4
Any of which will cause netserver to send to netperf.
rr or 6
Either of which will cause a request/response test.
Additionally, one can specify two directions separated by a '|'
character and they will be OR'ed together. In this way one can use
the ”Send|Recv” that will be emitted by the DIRECTIONoutput selector when
used with a request/reponse test.
This option sets the style of output to “keyval” where each line of
output has the form:
key=value
For example:
$ netperf -t omni -- -d rr -k "THROUGHPUT,THROUGHPUT_UNITS"
OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
THROUGHPUT=59092.65
THROUGHPUT_UNITS=Trans/s
Using the -k option will override any previous, test-specific
-o or -O option.
This option sets the style of output to “CSV” where there will be
one line of comma-separated values, preceeded by one line of column
names unless the global -P option is used with a value of 0:
$ netperf -t omni -- -d rr -o "THROUGHPUT,THROUGHPUT_UNITS"
OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
Throughput,Throughput Units
60999.07,Trans/s
Using the -o option will override any previous, test-specific
-k or -O option.
This option sets the style of output to “human readable” which will
look quite similar to classic netperf output:
$ netperf -t omni -- -d rr -O "THROUGHPUT,THROUGHPUT_UNITS"
OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
Throughput Throughput
Units
60492.57 Trans/s
Using the -O option will override any previous, test-specific
-k or -o option.
-t
This option explicitly sets the socket type for the test's data
connection. As of version 2.5.0 the known socket types include
“stream” and “dgram” for SOCK_STREAM and SOCK_DGRAM respectively.
-T <protocol>
This option is used to explicitly set the protocol used for the
test. It is case-insensitive. As of version 2.5.0 the protocols known
to netperf include:
TCP
Select the Transmission Control Protocol
UDP
Select the User Datagram Procotol
SDP
Select the Sockets Direct Protocol
DCCP
Select the Datagram Congestion Control Protocol
SCTP
Select the Stream Control Transport Protocol
udplite
Select UDP Lite
The default is implicit based on other settings.
The omni tests also extend the interpretation of some of the classic,
test-specific options for the BSD Sockets tests:
-m <optionspec>
This can set the send size for either or both of the netperf and
netserver sides of the test:
-m 32K
sets only the netperf-side send size to 32768 bytes, and or's-in
transmit for the direction. This is effectively the same behaviour as
for the classic tests.
-m ,32K
sets only the netserver side send size to 32768 bytes and or's-in
receive for the direction.
-m 16K,32K
sets the netperf side send size to 16284 bytes, the netserver side
send size to 32768 bytes and the direction will be "Send|Recv."
-M <optionspec>
This can set the receive size for either or both of the netperf and
netserver sides of the test:
-M 32K
sets only the netserver side receive size to 32768 bytes and or's-in
send for the test direction.
-M ,32K
sets only the netperf side receive size to 32768 bytes and or's-in
receive for the test direction.
-M 16K,32K
sets the netserver side receive size to 16384 bytes and the netperf
side receive size to 32768 bytes and the direction will be "Send|Recv."
As of version 2.5.0 several tests have been migrated to use the omni
code in src/nettest_omni.c for the core of their testing. A
migrated test retains all its previous output code and so should still
“look and feel” just like a pre-2.5.0 test with one exception - the
first line of the test banners will include the word “MIGRATED” at
the beginning as in:
$ netperf
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 16384 16384 10.00 27175.27
The tests migrated in version 2.5.0 are:
TCP_STREAM
TCP_MAERTS
TCP_RR
TCP_CRR
UDP_STREAM
UDP_RR
It is expected that future releases will have additional tests
migrated to use the “omni” functionality.
If one uses “omni-specific” test-specific options in conjunction
with a migrated test, instead of using the classic output code, the
new omni output code will be used. For example if one uses the
-k test-specific option with a value of
“MIN_LATENCY,MAX_LATENCY” with a migrated TCP_RR test one will see:
$ netperf -t tcp_rr -- -k THROUGHPUT,THROUGHPUT_UNITS
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
THROUGHPUT=60074.74
THROUGHPUT_UNITS=Trans/s
rather than:
$ netperf -t tcp_rr
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
16384 87380 1 1 10.00 59421.52
16384 87380
The omni test-specific -k, -o and -O
options take an optional output selector by which the user can
configure what values are reported. The output selector can take
several forms:
filename
The output selections will be read from the named file. Within the
file there can be up to four lines of comma-separated output
selectors. This controls how many multi-line blocks of output are emitted
when the -O option is used. This output, while not identical to
“classic” netperf output, is inspired by it. Multiple lines have no
effect for -k and -o options. Putting output
selections in a file can be useful when the list of selections is long.
comma and/or semi-colon-separated list
The output selections will be parsed from a comma and/or
semi-colon-separated list of output selectors. When the list is given
to a -O option a semi-colon specifies a new output block
should be started. Semi-colons have the same meaning as commas when
used with the -k or -o options. Depending on the
command interpreter being used, the semi-colon may have to be escaped
somehow to keep it from being interpreted by the command interpreter.
This can often be done by enclosing the entire list in quotes.
all
If the keyword all is specified it means that all known output
values should be displayed at the end of the test. This can be a
great deal of output. As of version 2.5.0 there are 157 different
output selectors.
?
If a “?” is given as the output selection, the list of all known
output selectors will be displayed and no test actually run. When
passed to the -O option they will be listed one per
line. Otherwise they will be listed as a comma-separated list. It may
be necessary to protect the “?” from the command interpreter by
escaping it or enclosing it in quotes.
no selector
If nothing is given to the -k, -o or -O
option then the code selects a default set of output selectors
inspired by classic netperf output. The format will be the ‘human
readable’ format emitted by the test-specific -O option.
The order of evaluation will first check for an output selection. If
none is specified with the -k, -o or -O
option netperf will select a default based on the characterists of the
test. If there is an output selection, the code will first check for
‘?’, then check to see if it is the magic ‘all’ keyword.
After that it will check for either ‘,’ or ‘;’ in the
selection and take that to mean it is a comma and/or
semi-colon-separated list. If none of those checks match, netperf will then
assume the output specification is a filename and attempt to open and
parse the file.
This is essentially a null output. For -k output it will
simply add a line that reads “OUTPUT_NONE=” to the output. For
-o it will cause an empty “column” to be included. For
-O output it will cause extra spaces to separate “real” output.
SOCKET_TYPE
This will cause the socket type (eg SOCK_STREAM, SOCK_DGRAM) for the
data connection to be output.
PROTOCOL
This will cause the protocol used for the data connection to be displayed.
DIRECTION
This will display the data flow direction relative to the netperf
process. Units: Send or Recv for a unidirectional bulk-transfer test,
or Send|Recv for a request/response test.
ELAPSED_TIME
This will display the elapsed time in seconds for the test.
THROUGHPUT
This will display the througput for the test. Units: As requested via
the global -f option and displayed by the THROUGHPUT_UNITS
output selector.
THROUGHPUT_UNITS
This will display the units for what is displayed by the
THROUGHPUT output selector.
LSS_SIZE_REQ
This will display the local (netperf) send socket buffer size (aka
SO_SNDBUF) requested via the command line. Units: Bytes.
LSS_SIZE
This will display the local (netperf) send socket buffer size
(SO_SNDBUF) immediately after the data connection socket was created.
Peculiarities of different networking stacks may lead to this
differing from the size requested via the command line. Units: Bytes.
LSS_SIZE_END
This will display the local (netperf) send socket buffer size
(SO_SNDBUF) immediately before the data connection socket is closed.
Peculiarities of different networking stacks may lead this to differ
from the size requested via the command line and/or the size
immediately after the data connection socket was created. Units: Bytes.
LSR_SIZE_REQ
This will display the local (netperf) receive socket buffer size (aka
SO_RCVBUF) requested via the command line. Units: Bytes.
LSR_SIZE
This will display the local (netperf) receive socket buffer size
(SO_RCVBUF) immediately after the data connection socket was created.
Peculiarities of different networking stacks may lead to this
differing from the size requested via the command line. Units: Bytes.
LSR_SIZE_END
This will display the local (netperf) receive socket buffer size
(SO_RCVBUF) immediately before the data connection socket is closed.
Peculiarities of different networking stacks may lead this to differ
from the size requested via the command line and/or the size
immediately after the data connection socket was created. Units: Bytes.
RSS_SIZE_REQ
This will display the remote (netserver) send socket buffer size (aka
SO_SNDBUF) requested via the command line. Units: Bytes.
RSS_SIZE
This will display the remote (netserver) send socket buffer size
(SO_SNDBUF) immediately after the data connection socket was created.
Peculiarities of different networking stacks may lead to this
differing from the size requested via the command line. Units: Bytes.
RSS_SIZE_END
This will display the remote (netserver) send socket buffer size
(SO_SNDBUF) immediately before the data connection socket is closed.
Peculiarities of different networking stacks may lead this to differ
from the size requested via the command line and/or the size
immediately after the data connection socket was created. Units: Bytes.
RSR_SIZE_REQ
This will display the remote (netserver) receive socket buffer size (aka
SO_RCVBUF) requested via the command line. Units: Bytes.
RSR_SIZE
This will display the remote (netserver) receive socket buffer size
(SO_RCVBUF) immediately after the data connection socket was created.
Peculiarities of different networking stacks may lead to this
differing from the size requested via the command line. Units: Bytes.
RSR_SIZE_END
This will display the remote (netserver) receive socket buffer size
(SO_RCVBUF) immediately before the data connection socket is closed.
Peculiarities of different networking stacks may lead this to differ
from the size requested via the command line and/or the size
immediately after the data connection socket was created. Units: Bytes.
LOCAL_SEND_SIZE
This will display the size of the buffers netperf passed in any
“send” calls it made on the data connection for a
non-request/response test. Units: Bytes.
LOCAL_RECV_SIZE
This will display the size of the buffers netperf passed in any
“receive” calls it made on the data connection for a
non-request/response test. Units: Bytes.
REMOTE_SEND_SIZE
This will display the size of the buffers netserver passed in any
“send” calls it made on the data connection for a
non-request/response test. Units: Bytes.
REMOTE_RECV_SIZE
This will display the size of the buffers netserver passed in any
“receive” calls it made on the data connection for a
non-request/response test. Units: Bytes.
REQUEST_SIZE
This will display the size of the requests netperf sent in a
request-response test. Units: Bytes.
RESPONSE_SIZE
This will display the size of the responses netserver sent in a
request-response test. Units: Bytes.
LOCAL_CPU_UTIL
This will display the overall CPU utilization during the test as
measured by netperf. Units: 0 to 100 percent.
LOCAL_CPU_METHOD
This will display the method used by netperf to measure CPU
utilization. Units: single character denoting method.
LOCAL_SD
This will display the service demand, or units of CPU consumed per
unit of work, as measured by netperf. Units: microsconds of CPU
consumed per either KB (K==1024) of data transferred or request/response
transaction.
REMOTE_CPU_UTIL
This will display the overall CPU utilization during the test as
measured by netserver. Units 0 to 100 percent.
REMOTE_CPU_METHOD
This will display the method used by netserver to measure CPU
utilization. Units: single character denoting method.
REMOTE_SD
This will display the service demand, or units of CPU consumed per
unit of work, as measured by netserver. Units: microseconds of CPU
consumed consumed per either KB (K==1024) of data transferred or
request/response transaction.
SD_UNITS
This will display the units for LOCAL_SD and REMOTE_SD
CONFIDENCE_LEVEL
This will display the confidence level requested by the user either
explicitly via the global -I option, or implicitly via the
global -i option. The value will be either 95 or 99 if
confidence intervals have been requested or 0 if they were not. Units:
Percent
CONFIDENCE_INTERVAL
This will display the width of the confidence interval requested
either explicitly via the global -I option or implicitly via
the global -i option. Units: Width in percent of mean value
computed. A value of -1.0 means that confidence intervals were not requested.
CONFIDENCE_ITERATION
This will display the number of test iterations netperf undertook,
perhaps while attempting to achieve the requested confidence interval
and level. If confidence intervals were requested via the command line
then the value will be between 3 and 30. If confidence intervals were
not requested the value will be 1. Units: Iterations
THROUGHPUT_CONFID
This will display the width of the confidence interval actually
achieved for THROUGHPUT during the test. Units: Width of
interval as percentage of reported throughput value.
LOCAL_CPU_CONFID
This will display the width of the confidence interval actually
achieved for overall CPU utilization on the system running netperf
(LOCAL_CPU_UTIL) during the test, if CPU utilization measurement
was enabled. Units: Width of interval as percentage of reported CPU
utilization.
REMOTE_CPU_CONFID
This will display the width of the confidence interval actually
achieved for overall CPU utilization on the system running netserver
(REMOTE_CPU_UTIL) during the test, if CPU utilization
measurement was enabled. Units: Width of interval as percentage of
reported CPU utilization.
TRANSACTION_RATE
This will display the transaction rate in transactions per second for
a request/response test even if the user has requested a throughput in
units of bits or bytes per second via the global -f
option. It is undefined for a non-request/response test. Units:
Transactions per second.
RT_LATENCY
This will display the average round-trip latency for a
request/response test, accounting for number of transactions in flight
at one time. It is undefined for a non-request/response test. Units:
Microseconds per transaction
BURST_SIZE
This will display the “burst size” or added transactions in flight
in a request/response test as requested via a test-specific
-b option. The number of transactions in flight at one time
will be one greater than this value. It is undefined for a
non-request/response test. Units: added Transactions in flight.
LOCAL_TRANSPORT_RETRANS
This will display the number of retransmissions experienced on the
data connection during the test as determined by netperf. A value of
-1 means the attempt to determine the number of retransmissions failed
or the concept was not valid for the given protocol or the mechanism
is not known for the platform. A value of -2 means it was not
attempted. As of version 2.5.0 the meaning of values are in flux and
subject to change. Units: number of retransmissions.
REMOTE_TRANSPORT_RETRANS
This will display the number of retransmissions experienced on the
data connection during the test as determined by netserver. A value
of -1 means the attempt to determine the number of retransmissions
failed or the concept was not valid for the given protocol or the
mechanism is not known for the platform. A value of -2 means it was
not attempted. As of version 2.5.0 the meaning of values are in flux
and subject to change. Units: number of retransmissions.
TRANSPORT_MSS
This will display the Maximum Segment Size (aka MSS) or its equivalent
for the protocol being used during the test. A value of -1 means
either the concept of an MSS did not apply to the protocol being used,
or there was an error in retrieving it. Units: Bytes.
LOCAL_SEND_THROUGHPUT
The throughput as measured by netperf for the successful “send”
calls it made on the data connection. Units: as requested via the
global -f option and displayed via the THROUGHPUT_UNITS
output selector.
LOCAL_RECV_THROUGHPUT
The throughput as measured by netperf for the successful “receive”
calls it made on the data connection. Units: as requested via the
global -f option and displayed via the THROUGHPUT_UNITS
output selector.
REMOTE_SEND_THROUGHPUT
The throughput as measured by netserver for the successful “send”
calls it made on the data connection. Units: as requested via the
global -f option and displayed via the THROUGHPUT_UNITS
output selector.
REMOTE_RECV_THROUGHPUT
The throughput as measured by netserver for the successful “receive”
calls it made on the data connection. Units: as requested via the
global -f option and displayed via the THROUGHPUT_UNITS
output selector.
LOCAL_CPU_BIND
The CPU to which netperf was bound, if at all, during the test. A
value of -1 means that netperf was not explicitly bound to a CPU
during the test. Units: CPU ID
LOCAL_CPU_COUNT
The number of CPUs (cores, threads) detected by netperf. Units: CPU count.
LOCAL_CPU_PEAK_UTIL
The utilization of the CPU most heavily utilized during the test, as
measured by netperf. This can be used to see if any one CPU of a
multi-CPU system was saturated even though the overall CPU utilization
as reported by LOCAL_CPU_UTIL was low. Units: 0 to 100%
LOCAL_CPU_PEAK_ID
The id of the CPU most heavily utilized during the test as determined
by netperf. Units: CPU ID.
LOCAL_CPU_MODEL
Model information for the processor(s) present on the system running
netperf. Assumes all processors in the system (as perceived by
netperf) on which netperf is running are the same model. Units: Text
LOCAL_CPU_FREQUENCY
The frequency of the processor(s) on the system running netperf, at
the time netperf made the call. Assumes that all processors present
in the system running netperf are running at the same
frequency. Units: MHz
REMOTE_CPU_BIND
The CPU to which netserver was bound, if at all, during the test. A
value of -1 means that netperf was not explicitly bound to a CPU
during the test. Units: CPU ID
REMOTE_CPU_COUNT
The number of CPUs (cores, threads) detected by netserver. Units: CPU
count.
REMOTE_CPU_PEAK_UTIL
The utilization of the CPU most heavily utilized during the test, as
measured by netserver. This can be used to see if any one CPU of a
multi-CPU system was saturated even though the overall CPU utilization
as reported by REMOTE_CPU_UTIL was low. Units: 0 to 100%
REMOTE_CPU_PEAK_ID
The id of the CPU most heavily utilized during the test as determined
by netserver. Units: CPU ID.
REMOTE_CPU_MODEL
Model information for the processor(s) present on the system running
netserver. Assumes all processors in the system (as perceived by
netserver) on which netserver is running are the same model. Units:
Text
REMOTE_CPU_FREQUENCY
The frequency of the processor(s) on the system running netserver, at
the time netserver made the call. Assumes that all processors present
in the system running netserver are running at the same
frequency. Units: MHz
SOURCE_PORT
The port ID/service name to which the data socket created by netperf
was bound. A value of 0 means the data socket was not explicitly
bound to a port number. Units: ASCII text.
SOURCE_ADDR
The name/address to which the data socket created by netperf was
bound. A value of 0.0.0.0 means the data socket was not explicitly
bound to an address. Units: ASCII text.
SOURCE_FAMILY
The address family to which the data socket created by netperf was
bound. A value of 0 means the data socket was not explicitly bound to
a given address family. Units: ASCII text.
DEST_PORT
The port ID to which the data socket created by netserver was bound. A
value of 0 means the data socket was not explicitly bound to a port
number. Units: ASCII text.
DEST_ADDR
The name/address of the data socket created by netserver. Units:
ASCII text.
DEST_FAMILY
The address family to which the data socket created by netserver was
bound. A value of 0 means the data socket was not explicitly bound to
a given address family. Units: ASCII text.
LOCAL_SEND_CALLS
The number of successful “send” calls made by netperf against its
data socket. Units: Calls.
LOCAL_RECV_CALLS
The number of successful “receive” calls made by netperf against its
data socket. Units: Calls.
LOCAL_BYTES_PER_RECV
The average number of bytes per “receive” call made by netperf
against its data socket. Units: Bytes.
LOCAL_BYTES_PER_SEND
The average number of bytes per “send” call made by netperf against
its data socket. Units: Bytes.
LOCAL_BYTES_SENT
The number of bytes successfully sent by netperf through its data
socket. Units: Bytes.
LOCAL_BYTES_RECVD
The number of bytes successfully received by netperf through its data
socket. Units: Bytes.
LOCAL_BYTES_XFERD
The sum of bytes sent and received by netperf through its data
socket. Units: Bytes.
LOCAL_SEND_OFFSET
The offset from the alignment of the buffers passed by netperf in its
“send” calls. Specified via the global -o option and
defaults to 0. Units: Bytes.
LOCAL_RECV_OFFSET
The offset from the alignment of the buffers passed by netperf in its
“receive” calls. Specified via the global -o option and
defaults to 0. Units: Bytes.
LOCAL_SEND_ALIGN
The alignment of the buffers passed by netperf in its “send” calls
as specified via the global -a option. Defaults to 8. Units:
Bytes.
LOCAL_RECV_ALIGN
The alignment of the buffers passed by netperf in its “receive”
calls as specified via the global -a option. Defaults to
8. Units: Bytes.
LOCAL_SEND_WIDTH
The “width” of the ring of buffers through which netperf cycles as
it makes its “send” calls. Defaults to one more than the local send
socket buffer size divided by the send size as determined at the time
the data socket is created. Can be used to make netperf more processor
data cache unfiendly. Units: number of buffers.
LOCAL_RECV_WIDTH
The “width” of the ring of buffers through which netperf cycles as
it makes its “receive” calls. Defaults to one more than the local
receive socket buffer size divided by the receive size as determined
at the time the data socket is created. Can be used to make netperf
more processor data cache unfiendly. Units: number of buffers.
LOCAL_SEND_DIRTY_COUNT
The number of bytes to “dirty” (write to) before netperf makes a
“send” call. Specified via the global -k option, which
requires that –enable-dirty=yes was specificed with the configure
command prior to building netperf. Units: Bytes.
LOCAL_RECV_DIRTY_COUNT
The number of bytes to “dirty” (write to) before netperf makes a
“recv” call. Specified via the global -k option which
requires that –enable-dirty was specified with the configure command
prior to building netperf. Units: Bytes.
LOCAL_RECV_CLEAN_COUNT
The number of bytes netperf should read “cleanly” before making a
“receive” call. Specified via the global -k option which
requires that –enable-dirty was specified with configure command
prior to building netperf. Clean reads start were dirty writes ended.
Units: Bytes.
LOCAL_NODELAY
Indicates whether or not setting the test protocol-specific “no
delay” (eg TCP_NODELAY) option on the data socket used by netperf was
requested by the test-specific -D option and
successful. Units: 0 means no, 1 means yes.
LOCAL_CORK
Indicates whether or not TCP_CORK was set on the data socket used by
netperf as requested via the test-specific -C option. 1 means
yes, 0 means no/not applicable.
REMOTE_SEND_CALLS
REMOTE_RECV_CALLS
REMOTE_BYTES_PER_RECV
REMOTE_BYTES_PER_SEND
REMOTE_BYTES_SENT
REMOTE_BYTES_RECVD
REMOTE_BYTES_XFERD
REMOTE_SEND_OFFSET
REMOTE_RECV_OFFSET
REMOTE_SEND_ALIGN
REMOTE_RECV_ALIGN
REMOTE_SEND_WIDTH
REMOTE_RECV_WIDTH
REMOTE_SEND_DIRTY_COUNT
REMOTE_RECV_DIRTY_COUNT
REMOTE_RECV_CLEAN_COUNT
REMOTE_NODELAY
REMOTE_CORK
These are all like their “LOCAL_” counterparts only for the
netserver rather than netperf.
LOCAL_SYSNAME
The name of the OS (eg “Linux”) running on the system on which
netperf was running. Units: ASCII Text
LOCAL_SYSTEM_MODEL
The model name of the system on which netperf was running. Units:
ASCII Text.
LOCAL_RELEASE
The release name/number of the OS running on the system on which
netperf was running. Units: ASCII Text
LOCAL_VERSION
The version number of the OS running on the system on which netperf
was running. Units: ASCII Text
LOCAL_MACHINE
The machine architecture of the machine on which netperf was
running. Units: ASCII Text.
REMOTE_SYSNAME
REMOTE_SYSTEM_MODEL
REMOTE_RELEASE
REMOTE_VERSION
REMOTE_MACHINE
These are all like their “LOCAL_” counterparts only for the
netserver rather than netperf.
LOCAL_INTERFACE_NAME
The name of the probable egress interface through which the data
connection went on the system running netperf. Example: eth0. Units:
ASCII Text.
LOCAL_INTERFACE_VENDOR
The vendor ID of the probable egress interface through which traffic
on the data connection went on the system running netperf. Units:
Hexadecimal IDs as might be found in a pci.ids file or at
the PCI ID Repository.
LOCAL_INTERFACE_DEVICE
The device ID of the probable egress interface through which traffic
on the data connection went on the system running netperf. Units:
Hexadecimal IDs as might be found in a pci.ids file or at
the PCI ID Repository.
LOCAL_INTERFACE_SUBVENDOR
The sub-vendor ID of the probable egress interface through which
traffic on the the data connection went on the system running
netperf. Units: Hexadecimal IDs as might be found in a pci.ids
file or at the PCI ID Repository.
LOCAL_INTERFACE_SUBDEVICE
The sub-device ID of the probable egress interface through which
traffic on the data connection went on the system running
netperf. Units: Hexadecimal IDs as might be found in a pci.ids
file or at the PCI ID Repository.
LOCAL_DRIVER_NAME
The name of the driver used for the probable egress interface through
which traffic on the data connection went on the system running
netperf. Units: ASCII Text.
LOCAL_DRIVER_VERSION
The version string for the driver used for the probable egress
interface through which traffic on the data connection went on the
system running netperf. Units: ASCII Text.
LOCAL_DRIVER_FIRMWARE
The firmware version for the driver used for the probable egress
interface through which traffic on the data connection went on the
system running netperf. Units: ASCII Text.
LOCAL_DRIVER_BUS
The bus address of the probable egress interface through which traffic
on the data connection went on the system running netperf. Units:
ASCII Text.
LOCAL_INTERFACE_SLOT
The slot ID of the probable egress interface through which traffic
on the data connection went on the system running netperf. Units:
ASCII Text.
REMOTE_INTERFACE_NAME
REMOTE_INTERFACE_VENDOR
REMOTE_INTERFACE_DEVICE
REMOTE_INTERFACE_SUBVENDOR
REMOTE_INTERFACE_SUBDEVICE
REMOTE_DRIVER_NAME
REMOTE_DRIVER_VERSION
REMOTE_DRIVER_FIRMWARE
REMOTE_DRIVER_BUS
REMOTE_INTERFACE_SLOT
These are all like their “LOCAL_” counterparts only for the
netserver rather than netperf.
LOCAL_INTERVAL_USECS
The interval at which bursts of operations (sends, receives,
transactions) were attempted by netperf. Specified by the
global -w option which requires –enable-intervals to have
been specified with the configure command prior to building
netperf. Units: Microseconds (though specified by default in
milliseconds on the command line)
LOCAL_INTERVAL_BURST
The number of operations (sends, receives, transactions depending on
the test) which were attempted by netperf each LOCAL_INTERVAL_USECS
units of time. Specified by the global -b option which
requires –enable-intervals to have been specified with the configure
command prior to building netperf. Units: number of operations per burst.
REMOTE_INTERVAL_USECS
The interval at which bursts of operations (sends, receives,
transactions) were attempted by netserver. Specified by the
global -w option which requires –enable-intervals to have
been specified with the configure command prior to building
netperf. Units: Microseconds (though specified by default in
milliseconds on the command line)
REMOTE_INTERVAL_BURST
The number of operations (sends, receives, transactions depending on
the test) which were attempted by netperf each LOCAL_INTERVAL_USECS
units of time. Specified by the global -b option which
requires –enable-intervals to have been specified with the configure
command prior to building netperf. Units: number of operations per burst.
LOCAL_SECURITY_TYPE_ID
LOCAL_SECURITY_TYPE
LOCAL_SECURITY_ENABLED_NUM
LOCAL_SECURITY_ENABLED
LOCAL_SECURITY_SPECIFIC
REMOTE_SECURITY_TYPE_ID
REMOTE_SECURITY_TYPE
REMOTE_SECURITY_ENABLED_NUM
REMOTE_SECURITY_ENABLED
REMOTE_SECURITY_SPECIFIC
A bunch of stuff related to what sort of security mechanisms (eg
SELINUX) were enabled on the systems during the test.
RESULT_BRAND
The string specified by the user with the global -B
option. Units: ASCII Text.
UUID
The universally unique identifier associated with this test, either
generated automagically by netperf, or passed to netperf via an omni
test-specific -u option. Note: Future versions may make this
a global command-line option. Units: ASCII Text.
MIN_LATENCY
The minimum “latency” or operation time (send, receive or
request/response exchange depending on the test) as measured on the
netperf side when the global -j option was specified. Units:
Microseconds.
MAX_LATENCY
The maximum “latency” or operation time (send, receive or
request/response exchange depending on the test) as measured on the
netperf side when the global -j option was specified. Units:
Microseconds.
P50_LATENCY
The 50th percentile value of “latency” or operation time (send, receive or
request/response exchange depending on the test) as measured on the
netperf side when the global -j option was specified. Units:
Microseconds.
P90_LATENCY
The 90th percentile value of “latency” or operation time (send, receive or
request/response exchange depending on the test) as measured on the
netperf side when the global -j option was specified. Units:
Microseconds.
P99_LATENCY
The 99th percentile value of “latency” or operation time (send, receive or
request/response exchange depending on the test) as measured on the
netperf side when the global -j option was specified. Units:
Microseconds.
MEAN_LATENCY
The average “latency” or operation time (send, receive or
request/response exchange depending on the test) as measured on the
netperf side when the global -j option was specified. Units:
Microseconds.
STDDEV_LATENCY
The standard deviation of “latency” or operation time (send, receive or
request/response exchange depending on the test) as measured on the
netperf side when the global -j option was specified. Units:
Microseconds.
COMMAND_LINE
The full command line used when invoking netperf. Units: ASCII Text.
OUTPUT_END
While emitted with the list of output selectors, it is ignored when
specified as an output selector.
Apart from the typical performance tests, netperf contains some tests
which can be used to streamline measurements and reporting. These
include CPU rate calibration (present) and host identification (future
enhancement).
Some of the CPU utilization measurement mechanisms of netperf work by
comparing the rate at which some counter increments when the system is
idle with the rate at which that same counter increments when the
system is running a netperf test. The ratio of those rates is used to
arrive at a CPU utilization percentage.
This means that netperf must know the rate at which the counter
increments when the system is presumed to be “idle.” If it does not
know the rate, netperf will measure it before starting a data transfer
test. This calibration step takes 40 seconds for each of the local or
remote ystems, and if repeated for each netperf test would make taking
repeated measurements rather slow.
Thus, the netperf CPU utilization options -c and and
-C can take an optional calibration value. This value is
used as the “idle rate” and the calibration step is not
performed. To determine the idle rate, netperf can be used to run
special tests which only report the value of the calibration - they
are the LOC_CPU and REM_CPU tests. These return the calibration value
for the local and remote system respectively. A common way to use
these tests is to store their results into an environment variable and
use that in subsequent netperf commands:
If you are going to use netperf to measure aggregate results, it is
important to use the LOC_CPU and REM_CPU tests to get the calibration
values first to avoid issues with some of the aggregate netperf tests
transferring data while others are “idle” and getting bogus
calibration values. When running aggregate tests, it is very
important to remember that any one instance of netperf does not know
about the other instances of netperf. It will report global CPU
utilization and will calculate service demand believing it was the
only thing causing that CPU utilization. So, you can use the CPU
utilization reported by netperf in an aggregate test, but you have to
calculate service demands by hand.
In and of itself, this is not terribly useful, but used in conjuction
with the test-specific -u option of an “omni” test to set
the UUID emitted by the UUID output
selector, it can be used to tie-together the separate instances of an
aggregate netperf test. Say, for instance if they were inserted into
a database of some sort.
Netperf versions 2.4.0 and later have merged IPv4 and IPv6 tests so
the functionality of the tests in src/nettest_ipv6.c has been
subsumed into the tests in src/nettest_bsd.c This has been
accomplished in part by switching from gethostbyname()to
getaddrinfo() exclusively. While it was theoretically possible
to get multiple results for a hostname from gethostbyname() it
was generally unlikely and netperf's ignoring of the second and later
results was not much of an issue.
Now with getaddrinfo and particularly with AF_UNSPEC it is
increasingly likely that a given hostname will have multiple
associated addresses. The establish_control() routine of
src/netlib.c will indeed attempt to chose from among all the
matching IP addresses when establishing the control connection.
Netperf does not _really_ care if the control connection is IPv4 or
IPv6 or even mixed on either end.
However, the individual tests still ass-u-me that the first result in
the address list is the one to be used. Whether or not this will
turn-out to be an issue has yet to be determined.
If you do run into problems with this, the easiest workaround is to
specify IP addresses for the data connection explicitly in the
test-specific -H and -L options. At some point, the
netperf tests _may_ try to be more sophisticated in their parsing of
returns from getaddrinfo() - straw-man patches to
netperf-feedback@netperf.org would of course be most welcome
:)
Netperf has leveraged code from other open-source projects with
amenable licensing to provide a replacement getaddrinfo() call
on those platforms where the configure script believes there
is no native getaddrinfo call. As of this writing, the replacement
getaddrinfo() as been tested on HP-UX 11.0 and then presumed to
run elsewhere.
Netperf is constantly evolving. If you find you want to make
enhancements to netperf, by all means do so. If you wish to add a new
“suite” of tests to netperf the general idea is to:
Add files src/nettest_mumble.c and src/nettest_mumble.h
where mumble is replaced with something meaningful for the test-suite.
Add support for an apropriate --enable-mumble option in
configure.ac.
Edit src/netperf.c, netsh.c, and netserver.c as
required, using #ifdef WANT_MUMBLE.
Compile and test
However, with the addition of the “omni” tests in version 2.5.0 it
is preferred that one attempt to make the necessary changes to
src/nettest_omni.c rather than adding new source files, unless
this would make the omni tests entirely too complicated.
If you wish to submit your changes for possible inclusion into the
mainline sources, please try to base your changes on the latest
available sources. (See Getting Netperf Bits.) and then send email
describing the changes at a high level to
netperf-feedback@netperf.org or perhaps
netperf-talk@netperf.org. If the concensus is positive, then
sending context diff results to
netperf-feedback@netperf.org is the next step. From that
point, it is a matter of pestering the Netperf Contributing Editor
until he gets the changes incorporated :)
Netperf4 is the shorthand name given to version 4.X.X of netperf.
This is really a separate benchmark more than a newer version of
netperf, but it is a decendant of netperf so the netperf name is
kept. The facetious way to describe netperf4 is to say it is the
egg-laying-woolly-milk-pig version of netperf :) The more respectful
way to describe it is to say it is the version of netperf with support
for synchronized, multiple-thread, multiple-test, multiple-system,
network-oriented benchmarking.
Netperf4 is still undergoing evolution. Those wishing to work with or
on netperf4 are encouraged to join the
netperf-dev
mailing list and/or peruse the
current sources.
0707010003bba2000081a40000000000000000000000014f45c4ce0000a7ce000000b500010002ffffffffffffffff0000002f00000000root/usr/local/share/doc/netperf/Release_Notes These are the Release Notes for Revision 2.5.0 of netperf:
*) Add a new -N option to netserver which will suppress all creation
of debug files and so debugging output. While this would put a
serious crimp in debugging a problem in netserver, it will enable
folks using small embedded systems to avoid soaking-up their /tmp
filesystem with clutter.
*) A refactoring and partial re-write of the src/netserver.c code to
untangle years of accumulated spaghetti code. Included is the
ability to not daemonize netserver when launched from the
command-line (-D) and also to not fork/spawn child processes upon
the acceptance of a control connection (-f). Combined, the two
options will cause netserver to remain in the forground and not
spawn children - in effect netserver will handle only one test at a
time.
*) As it has been two years since the defect in Solaris getaddrinfo()
was submitted, it should be the case that a fix is available, so it
should no longer be necessary to "hide" the "Hey your platform's
getaddrinfo() call is buggy" warning. Consequently, it is no
longer being suppressed.
*) A new global command line option - -S - has been added to enable
setting of SO_KEEPALIVE on the data socket. This will affect the
netperf side of the "classic" netperf tests, and will also affect
the netserver side of an "omni" or migrated classic test as only
the control message for the omni tests has the requisite flags
field to communicate the desire to set SO_KEEPALIVE.
Ostensibly, this may help when netperf is (ab)used in functional
testing situations and netservers end-up orphaned and out in the
cold because their corresponding netperfs went away and the
notification was lost amid the roar of traffic over-saturating the
interconnect(s).
The default is to behave as before - SO_KEEPALIVE not set.
*) Base on the frequency at which the author has used the
functionality, the default for --enable-burst is now "yes." To
disable support for burst mode one must now include a
--enable-burst=no when performing the ./configure prior to
compiling the bits.
*) The output of the -D global command line option (./configure
--enable-demo) has been enhanced to include seconds and
milliseconds since the epoch as returned by a gettimeofday() call
with a null pointer for the timezone. This is in support of being
able to easily shove interim results into an rrdtool Round-Robin
Database (RRD).
*) The "omni" tests will be compiled-in by default, and WANT_MIGRATION
is the default. One must ./configure with --enable-omni=no to
disable this.
*) When ./configured with --enable-intervals and intervals are
actually used, the round-trip latency reported by an omni (or
migrated classic) request/response test should better reflect
reality rather than the length of the pacing interval. It and the
MEAN_LATENCY from the histogram and -j output will still differ
slightly and probably always will.
*) The histogram code has been enhanced to track more than one latency
at a time and so --enable-histogram and --enable-burst are now
compatible - for the omni tests or migrated "classic" tests only
however. This change was inspired/instigated by Jim Gettys and his
work on overly-large queues of buffers
*) WANT_MIGRATION is enabled when one specifies --enable-omni on the
configure command line.
*) Massage and encorporate a patch from Google that enables
randomization of the IP addresses used in a test. An optional mask
length in the standard '/' notation can be added to the end of the
IP/name in the test-specific -H or -L options of an Omni test.
*) Massage and include a DEBUG_LOG_FILE patch for Android from
Josselin Costanzi
*) Add intial attempt to report Slot ID on HP-UX 11.31.
*) Add global -s option to cause omni tests to pause between
setting-up the test and actually starting it. pause is in seconds.
Poor man's way to (attempt to) avoid issues when starting many,
Many, MANY concurrent netperf tests. Based on patches from Google.
*) Additional timing statistics will be kept by the omni tests when
the global "-j" option is specified. The additional statistics are
min, max, mean, stddev and the 50th, 90th and 99th percentiles on
the timings measured by histograms. Based on patches from Google.
*) Add a workaround to get Linux to report TX queue drops in a
UDP_STREAM test when the socket buffer size is larger than the
TX queue. Provided by Andrew Gallatin.
*) Fix the configure script to know it does not have to look for an
SCTP library on FreeBSD 8.X
*) The BSD and "omni" tests now have a test-specific -R option which
is a boolean controlling whether or not SO_DONTROUTE will be set on
the data socket. By default, any unidirectional UDP test will have
SO_DONTROUTE set unless a -R 1 option is given. All other tests
(including UDP request/response tests) will not have SO_DONTROUTE
set unless a -R 0 option is given. This is put into place to make
it take longer for blithering idiots to shoot themselves in the
foot by running tests on setups they shouldn't.
*) At least the beginnings of support for RDS, based on a circa 2007
patch against 2.4.2 by Vladimir Sokolovsky. Rather than create the
"RDS_STREAM" test of his patch, the intention this time around is
to enable RDS for the "omni" tests by using an omni test-specific
-T rds specifyer for the "transport" to use.
*) Missing fprintf format statements provided by Bruno Cornec
*) Numerous cleanups from Jose Pedro Oliveira
*) Fixes to allow netperf -H ::1 to work without having to add -6 or
an AF_INET6 -L option
These are the Release Notes for Revision 2.4.5 of netperf:
Things changed in this release:
*) Fixes for Linux procstat-based CPU utilization on newer kernels
from Andrew Gallatin.
*) Fix for a TCP_RR hang from Michael Shuldman
*) Compilation cleanups for MingW cnd MSDOS (djgpp) ourtesy of Gisle
Vanem.
*) Changes to enable compilation and building of netperf for
VMware. Kudos to the person who did the first port, I will be happy
to name that person when told it is OK :)
*) Fixes from Adam Bidema for launching netserver children when the
path to netserver.exe is very long.
*) For the first time, netperf2 has a dependency, albeit optional, on
another non-base-os bit of code - libsmbios under Linux. It will
attept to detect this at compile time and use it to report the
system model name in an omni test. If libsmbios is there we will
try to use it, otherwise we will not. If the associated include
file is also there (eg the -dev package in apt-get-speak), we will
use it to get the prototype for SMBIOSGetSystemName, otherwise we
make a guess as to the prototype for SMBIOSGetSystemName(), which
is the only call we make to libsmbios.
*) Fixes for BSD CPU utilization to deal with different BSD variants
using different types. Courtesy of Simon Burge
*) The "omni" suite has been added on an experimental basis. If it
works-out then many of the tests in src/nettest_bsd.c,
src/nettest_sdp.c, and src/nettest_sctp.c will be "migrated" to use
the "omni infrastructure" (aka two routines to measure them
all...). Apart from reduced socket code, the omni suite has
user-configurable output in either "human readable," CSV or
keyword=value format. By default, a VERY large quantity of data is
output when asking for csv format (test-specific -o option) or
keyword format (test-specific -k option). The omni suite is not
yet documented (there are some as-yet undiagnosed problems with
doc/netperf.texi in emacs texinfo mode and updating nodes and links
and such - any help there would be appreciated) but there is a
small text file in doc/ describing the names (most) of the
available output's. For the most up-to-date list consult
src/nettest_omni.c and the enum netperf_output_name. Or, you can
pass-in a "filename" of '?' to either of the -O, -o or -k options
and netperf will emit a list of the known available outputs.
*) Coming along for the ride are some new platform specific files to
determine the probable egress interface for each end of a test, as
well as driver information for that interface. There is also
reporting of "uname" like information for both local and remote
system, and eventually perhaps something about the vendor's model
name for the systems as well as the processor types. The end goal
is to make it easy to get most if not all what one would want in a
database of netperf results.
*) The UDP_RR test now understands the global -f option to change
output units. It also understands the -B option to tag
results. Courtesy of Alexander Duyck.
*) A fix has been added for hanging UDP_RR tests under
Windows. Courtesy of Alexander Duyck.
*) Use vfork() on those platforms without fork(), courtesy of Matt
Waddel
*) Track the bouncing interfaces that are linux processor affinity
*) Fixes for Solaris sendfilev usage.
*) A TCP_MSS test has been added which will report the MSS for a data
connection setup as if the test were a TCP_STREAM test. While the
remote (netserver) is tricked into thinking it is to accept a
TCP_STREAM test, no actual data will flow over the connection.
This means that if the MSS is one which might change over the life
of the connection, it will not be reflected in the test output.
Should this prove to be a problem a single send() can be arranged
along with the return of the shutdown();recv() handshake.
The idea is that this might be useful for netperf scripts wanting
to parameterize things based on the MSS - for example the
packet_byte_script.
*) The width of the confidence interval can be specified in fractions
of a percent for the confidence of a clean, close, comfortable
calculation. :)
*) Honor the global -B option in a TCP_SENDFILE test.
*) Correct the sense of Send/Recv in the banner of a TCP_MAERTS test.
These are the Release Notes for Revision 2.4.4 of netperf:
Things changed in this release:
*) The LOC_CPU and REM_CPU tests will report their respective beliefs
as to the number of CPUs present when the verbosity is set to more
than one. This can be used when trying to diagnose issues with CPU
utilization.
*) A kind soul who wishes to remain anonymous provided a patch to
enable use of sendfile() on OSX.
*) Fix a misplaced \n in a format string of send_tcp_maerts, courtesy
of Alexander Duyck.
*) There is an experimental global -r option which will allow one to
include CPU utilization measurements, but make the decision about
hitting confidence based on the result only. The test banner will
reflects this when -r is used.
*) It is no longer necessary to specify a file with the global -F
option when running a _SENDFILE test. Netperf will create a
temporary file and populate it with random data and use that. If
running aggregate tests it is strongly suggested one use a -F
option. Otherwise, the overhead spent creating and populating the
temporary file will be included in the CPU utilization calculation.
*) The configure script recognizes Solaris 11 and selects the correct
CPU utilization mechanism - or rather it selects the same mechanism
as is used in Solaris 10. Fix courtesy of Andrew Gallatin.
*) Convert a number of struct sockaddr_in's to struct
sockaddr_storage's and add requisite casts to deal with some abort
problems on Windows and perhaps other platforms as well. Kudos to
Alexander Duyck.
*) One can now pass a value of 'x' to the global -f option to specify
the units as transactions per second. This is the default for any
request/response test, which is determined by there being a "double
`r'" in the name - eg "RR," "rr," "Rr," or "rR." At present only
the TCP_RR test actually looks for this to be set.
*) One can request bits/bytes per second as the primary output of a
TCP_RR test by setting the global -f option to [kmgKMG] as with any
of the "STREAM" tests. This converts the primary throughput metric
to a bitrate (byterate) following the verbosity rules for a STREAM
test. Service demand remains usec/Transaction regardless of the
setting of the global -f option.
A verbosity level of 2 or more will cause the TCP_RR test to report
calculated average RTT latency, transaction rate, and inbound and
outbound transfer rates regardless of the primary units selected
with the global -f paramter. If the primary output is transactions
per second, the reported inbound and outbound transfer rates will
be 10^6 bits per second, otherwise, they honor the setting of the
global -f option.
All of this is EXPERIMENTAL and subject to change without prior
notice in future versions of netperf.
*) Replace "break" with "break 2" in acinclude.m4 for a socklen macro
*) The default for the requested socket buffer size is changed from 0
to -1 to enable passing a value of 0 under Windows, which tells that
stack one wishes to enable copy-avoidance.
*) Call fflush() on each interim result displayed in demo mode to make
things happier for folks redirecting same to a file. From Dan
Yost.
*) In theory each distinct netserver child will have a debug log with
its pid appended to the name, somewhat like what appears to happen
under Windows.
*) A new global, command-line option to netperf and netserver has been
added. The -V option will cause netperf/netserver to display its
version and exit.
*) Setting -I without setting -i will now implicitly set the iteration
minimum and maximums as if a -i 10,3 were set. Also, some further
sanity checking on the bounds for each is made.
*) Fixed a typo in the manual (found by Emir Halepovic) so the
description for the -s and -S options properly specifies they
affect the data connection.
These are the Release Notes for Revision 2.4.3 of netperf:
Things changed in this release:
*) The UDP_STREAM test includes --enable-demo support, courtesy of
patches from Scott Weitzenkamp.
*) The nettest_dns.* files have been removed from the release and the
repository. Those wishing to perform DNS server tests should
migrate to netperf4 which has better support for DNS test.
*) Fixes for compiling under Windows with Mingw/gcc courtesy of Gisle
Vanem.
*) A new global option - -N - has been added. When specified, this
option will tell netperf to not bother to try to establish a
control connection with a remote netserver. Instead, netperf will
only attempt to make a data connection to the remote system. By
default, this will be to the "discard" service for a "STREAM" or
"SENDFILE" test, the "echo" service for a "RR" test and the
"chargen" service for a "MAERTS" test. Any "remote" settings are
changed to reflect their being unused in the test, and a "no
control" tag is added to the test banner when -N is specified.
This still needs to be propagated to other test files - at least
for those for which it may make sense.
*) The tests in nettest_bsd.c have been altered to not actually take
timestamps and deltas in --enable-histogram unless the verbosity
level has been set to actually display a histogram. This reduces
the overhead measurably, even on systems with "fast" time calls,
which _may_ mean that a future release of netperf may have
histogram support enabled by default.
This still needs to be propagated to other test files. Patches
from the community would be most welcome :)
*) Eliminate a bogus fprintf from the signal catching routine which
was being executed when both intervals and demo mode were active at
the same time.
*) The nettest_ipv6.* files are no longer included in the source
tar/zip file. IPv6 functionality has been subsumed into the
nettest_bsd.* files for some time now.
*) Use a higher resolution "time" source for HISTOGRAM support under
Windows, courtesy of Spencer Frink. Prior to this it had no better
than 10ms granularity which could lead to some rather strange
looking results :)
*) A bug fix reporting recv_size rather than send_size in TCP_MAERTS
when CPU utilization was requested.
*) A bug fix for buffer filling from a file to properly advance the
buffer pointer when the file is smaller than the send buffer.
*) Enable certain UDP tests which previously used unconnected sockets
to use connected sockets. Courtesy of Shilpi Agarwal.
*) The OSX CPU utilization code actually gets put into the tarball in
a make dist now :)
*) The check to make sure that getaddrinfo returned ai_protocol and/or
ai_socktype's matching that which we requested is done for all socket
and/or protocol types and a warning is emitted if it returns any which
do not match.
*) The linux CPU affinity code has been made capable of binding to
CPU's >=32 on a 32-bit compilation and >=64 on a 64-bit
compilation.
*) More complete closing/redirecting of stdin/stdout/stderr/where in
netserver to make it easier to launch netserver at the far-end of a
remote shell. Courtesy of Hans Blom.
*) Sendfile changes for Solaris courtesy of Andrew Gallatin.
*) "spec" file support to generate RPMs courtesy of Martin Brown
These are the Release Notes for Revision 2.4.2 of netperf:
Things changed in this release:
*) Fixes for floating point format differences, courtesy of George
Davis.
*) Additions for CPU util support on MacOS X, courtesy of Anonymous.
*) Processor affinity is now supported on AIX 5.3 (perhaps earlier)
via the bindprocessor system call.
*) Fixes for test lockups with TCP_CRR and TCP_CC under Windows
courtesy of Dikon Reed.
*) Fixes to netcpu_looper.c to get it to actually compile :)
*) Have netcpu_looper use the bind_to_specific_processor() call
provided by netlib since that knows about more platforms than the
code in netcpu_looper did. The looper CPU binding will use a
mapping to handle cases where the CPU id's on the system may not be
a contiguous space starting from zero. At present, the code that
setups the mapping only knows about retrieving actual CPU ids under
HP-UX.
*) The netcpu_sysctl method becomes calibration-free, courtesy of
Andrew Gallatin
These are the Release Notes for Revision 2.4.1 of netperf:
Things changed in this release:
*) There is now a -B global command-line argument that will append its
parameter as a string to the end of result lines when test banners
have been suppressed. this is to make it easier to distinguish one
result from another when aggregate restults are being run in
parallel, without having to resort to having the individual results
shell redirected to a file. This has been done for some of the
tests in nettest_bsd.c, but not all of them, nor for the tests in
the other nettest_mumble.c files.
*) There is now an --enable-spin configure option that will enable
intervals if not already enabled and will have the sender sit and
spin in a tight loop until time for the next interval rather than
wait for an interval timer to expire. This means it should be
possible to have a much finer granularity on the interval, at the
expense of an EXTREME increase in CPU utilization. (To the extent
I'm considering disabling measurement of local CPU utilization when
that mode is enabled, and bursts have been requested - your
feedback on that topic would be most appreciated)
If only --enable-intervals is used with configure, the old set the
interval timer and wait method is still used.
If --enable-spin is configured, the test banner will include "spin
intervals" rather than the "intervals" from a plain
--enable-intervals. The sit and spin will either use
gettimeofday(), or gethrtime() if gethrtime() is available.
This has been implemented in the tests of nettest_bsd.c but none of
the others. Volunteers would be most welcome. I would entertain
the notion of making the implementation a series of inline
functions in netlib. This holds true for the demo mode - why will
become clear when you look at nettest_bsd.c. While things are
considerably cleaner than they were before, with reuse within
nettest_bsd.c, there is no resuse with the rest of the
nettest_mumble.c files.
*) the -w option for the interval time now takes three optional
suffixes. if the suffix is 'm' (eg 10m) it will assume the user has
specified time in units of milliseconds. if the suffix is 'u' it
will assume microseconds, and if 's' seconds. no suffix remains
milliseconds for backwards compatability with previous netperf
versions.
*) It should be possible to successfully compile with
--enable-intervals.
These are the Release Notes for Revision 2.4.1 of netperf:
Things changed in this release:
*) netcpu_pstatnew.c has been altered to workaround a bug in the
interrupt cycle accounting in HP-UX 11.23 that is not expected to
be resolved until a later release. basically, some interrupt time
is not counted, which means the sum of idle, user, kernel and
interrupt is less than the cycles per second multiplied by the
elapsed time. the workaround preserves the "no calibration
required" nature of the pstatnew CPU utilization mechanism. you
can see more in netcpu_pstatnew.c and/or in debug output.
*) in netlib.c recv_response has been renamed
recv_response_timed(addl_time) which is now used in
calibrate_remote_cpu in place of the "sleep(40);recv_response()"
sequence. This then allows the REM_CPU test to complete in less
than 40 seconds when the remote's CPU utilization mechanism does
not require calibration. The value of "addl_time" is added to the
tc_sec field of the select() timeout. A "new" recv_response has
been added that simply calls recv_response_timed(0) - this is to
minimize the number of changes needed elsewhere in the code.
*) hopefully, this release fixes problems people have been having with
the configure script failing when picking a type for socklen_t.
now, instead of generating an error, it emits a warning and simply
tries socklen_t
*) the configure script no longer looks for the size of an in_port_t
*) netlib.c now has code to perform processor binding for Tru64, but
the configure script may or may not detect it correctly. This means
that one may have to edit the config.h file by hand to get the
functionality.
*) it is known that netperf will compile under Windows XP and 2003
using the DDK it is possible that netperf 2.4.1 will compile on a
Windows system under VC++/Visual Studio. It might even work!-) See
the README.window file for additional details.
Things _NOT_ changed in this release:
*) The automagic determination of the number and type of parameters to
sched_setaffinity under Linux remains brittle at best.
These are the Release Notes for Revision 2.4.0 of netperf:
Things changed in this release:
*) Netperf has been converted to use a configure script. Yes boys and
girls, after 12 years of distributing netperf with just a makefile
I have finally bitten the bullet and cast my fate to autoconf,
automake, etc. To get the most basic netperf built all you should
need to do is:
cd to the netperf directory
./configure
make
and perhaps
make install
(Note, I've not done much with make install - I'm hemming and
hawing over what the default installation location should be)
Please keep in mind that this is the first time I've tried to use
autoconf et al. I am sure there are things that should be done
differently and would welcome any and all constructive criticisms.
I suspect there are several places where I've not fully
demonstrated being of the autoconf body - particulary as pertains
to include files being in "#if mumble #endif" blocks. Fixes would
be most welcome.
*) Speaking of becomming one with various GNU tools, work on a new
netperf manual has begun, with the source being a texinfo document
that is converted to "all" the other formats. This resides in doc/
.
*) The platform-specific parts of CPU utilization measurement have
been broken-out into separate .c files and selected at configure
time a la the pcap_mumble files of tcpdump. This makes
src/netlib.c _much_ easier to read and the addition of new CPU
utilization mechanisms much easier.
*) New HP-UX 11.23 and Solaris 10 CPU utilization measurement
mechanisms (called pstatnew and kstat10 respectively) need no
calibration step. Both have variations on microstate accounting.
HP-UX 11.23 still identifies the method in the headers as 'P' for
pstat. The kstat10 method is identified as 'M' for Microstate.
Scripts which make calibration runs with LOC_CPU and REM_CPU may
continue to do so, they will just run forty to eighty seconds
faster on platforms with the calibration-free CPU util mechanisms.
*) Automatic detection of CPU utilization mechanism for HP-UX, Linux,
AIX, *BSD and Solaris. If you do not like what the configure
script selects, you can use --enable-cpuutil= .
*) The "times" (aka 'T') CPU utilization mechanism has been removed.
It was never very accurate at all, only showing CPU time charged to
the process, and with interrupts and other network processing it is
rarely chaged to a or the correct process. It and other methods
may remain in the format_cpu_method() routine of src/netlib.c for
historical purposes only.
*) CAVEAT - the "kstat" mechanism is KNOWN TO BE BOGUS for Solaris.
It does not include time spent processing interrupts, and
networking benchmarks will generate at least a few of those...
This affects _ALL_ versions of Solaris with kstat.
So, do NOT trust any CPU util figures where netperf says the method
was 'K' for kstat - unless perhaps it reports 100% CPU util.
Solaris 10 takes a step in the right direction adding microstate
accounting similar to what netperf uses on HP-UX 11.23. HOWEVER,
Solaris 10's accounting for user/kernel/idle is done in _parallel_
with interrupt, which means they overlap. Doubleplusungood. Netperf
attempts to compensate for that with some handwaving
(src/netcpu_kstat10.c)
*) Initial support for SCTP has been added with the SCTP_STREAM and
SCTP_RR tests. These tests use the libsctp mechanisms for
increased portability. It has been explained that libsctp should
not impart all that much overhead and it does make things rather
simpler.
*) Netperf now uses getaddrinfo() to resolve hostnames and IP
addresses. A replacement getaddrinfo() is provided for those
platforms where the configure script cannot tell that getaddrinfo
is present.
There are cases where a host's getaddrinfo call may return results
that ignore the hints for protocol. Netperf catches these and
reports a warning so you can pester your OS source for fixes.
Solaris getaddrinfo() seems to return results with SCTP procotol
cleared.
Mac OS X getaddrinfo botches when the service/port is specified as
"0" so one must specify a port number on the netperf command line.
AIX 5.something getaddrinfo has a different but similar problem
with "0" as a port/service name as well.
Linux 2.6 and HP-UX 11i getaddrinfo seem to be fine - at least as
far as netperf goes :)
*) A "Demo Mode" has been added to the main BSD Sockets/TCP/UDP tests:
TCP_STREAM, TCP_MAERTS, TCP_SENDFILE, TCP_RR, TCP_CC, TCP_CRR and
UDP_RR. It has not been added to UDP_STREAM. This mode is enabled
with --enable-demo when configuring netperf, which activates a
global "-D" option. By default, -D will cause interim results
(throughput or transactions/s only, not CPU util) from the
netperf's perspective to be emitted no sooner than once per second.
An optional parameter can specify another interval in units
(floating point) of seconds:
-D 1.5
will make the reporting interval at least 1.5 seconds.
This mode makes no use of explicit interval timers since that can
be so, well fun on different platforms. Instead, an initial guess
of how many units of work must be done to consume the desired
reporting interval is made, and that guess is refined throughout
the entire test. If something happens to dramatically slow-down
the test, the reproting interval may become must larger for a few
intervals. When things speed-up it is detected very quickly. As
with the --enable-historgram support, if gethrtime() is available
on the platform, it will be used in lieu of gettimeofday(). In any
case, the number of calls to gettimeofday()/gethrtime() is much,
Much, MUCH smaller than for --enable-histogram so while there may
be a measurable effect on the results, it should be rather small.
*) The global -H option has been enhanced to take an optional address
family specification for the control connection:
-H ,
Unlike other comma-separated options, where specifying only one
thing will set both, here specifying only one thing will be
ass-u-me-d to be the and will leave defaulted
(AF_UNSPEC). Family can be specified as "4" or "inet" for
AF_INET, "6" or "inet6" for AF_INET6.
*) A new global -L option has been added to specify the local name/IP
and/or address family for the control connection:
-L ,
Unlike other comma-separated options, where specifying only one
thing will set both, here specifying only one thing will be
ass-u-me-d to be the and will leave defaulted
(AF_UNSPEC). Family can be specified as "4" or "inet" for
AF_INET, "6" or "inet6" for AF_INET6.
*) Test-specific -H and -L options are present for the TCP, UDP and
SCTP tests, which are now (intended to be) IP protocol version
agnostic.
*) Global -4 and -6 options will set the both the local and remote
address family to either AF_INET or AF_INET6 respectively.
*) Test-specific -4 and -6 options have been added for TCP, UDP and
SCTP tests.
*) Since the basic TCP UDP and SCTP tests are no longer IPv4-only, the
nettest_ipv6.[ch] files are only included in the source
distribution for historical interest.
*) The main test banners for the TCP, UDP and SCTP tests have been
enhanced to give both local and remote addressing information for
the data connection.
*) Compilation under Windows is likely FUBAR at this point. I _hope_
to start trying to do builds under the DDK soon, but am not sure
when I'll be able to start. Any and all assistance you can give
there would be most welcome.
*) Various and sundry fixes. TCP_RR should no longer go into an
infinite loop when you abort netperf. I'm sure there are others.
*) Unix domain socket tests are compiled-in with --enable-unix=yes at
configure time.
*) DLPI tests are compiled-in with --enable-dlpi=yes at configure
time.
*) XTI tests are compiled-in with --enable-xti=yes at configure time.
Things not changed in this release:
*) Seems like everything has changed :)
These are the Release Notes for Revision 2.3pl2 of netperf:
Things changed in this release
*) One can bind netperf or netserver to specific CPUs with the -T
option. This is a generalization of some HP-UX and netserver specific
work from 2.3pl1.
*) Extend the kludge to workaround the Linux setsockopt/getsockopt
bizzarreness to the socket buffer sizes for the remote side in
addition to the local side.
*) Fix the lack of initialization of times_up in recv_tcp_maerts()
that caused confidence intervals to fail miserably.
*) Other misc fixes - than you to all of you who sent them.
These are the Release Notes for revision 2.3pl1 of netperf:
Things changed in this release
*) The bind() call in create_data_socket() in the file nettest_bsd.c
is no longer conditional on the user's specifying an IP address or
port number to which the data socket should be bound. This fixes
the "connection refused" errors in the UDP tests.
*) Some experimental code to allow one to specify a CPU to which the
remote netserver should be bound. This is intended to allow one to
get greater certainty (as in confidence intervals) on SMP
systems. At present the functionality is HP-UX specific.
Submittals of changes for a more general approach are welcomed.
These are the Release Notes for revision 2.3 of netperf:
Things changed in this release
*) The user can now specify local and/or remote port numbers for the
data connection using the -P test-specific option. This is to
support those folks who want to run netperf through those evil,
end-to-end-breaking things known as firewalls... :) This changes
the format of some of the control messages, hence the bump in the
update number in the VUF. While it may be possible to mix 2.3 and
pre-2.3 netperf and netserver, it is not supported.
*) The user can now specify local and/or remote IP addresses for the
data connection using the -I test-specific option. This is to
support those folks who want to run netperf through those evil,
end-to-end-breaking things known as firewalls... :) This changes
the format of some of the control messages, hence the bump in the
update number in the VUF. While it may be possible to mix 2.3 and
pre-2.3 netperf and netserver, it is not supported.
*) Set DL_mumble message priorities in the DLPI tests
*) Fix error return check for getaddrinfo()
*) Those systems with gethrtime() can define -DHAVE_GETHRTIME to use
gethrtime() instead of gettimeofday() and reduce the measurement
overhead when enabling the -DHISTOGRAM functionality.
*) The default for -DHISTOGRAM compilation now adds a UNIT_USEC and
TEN_USEC row and renames TENTH_MSEC to HUNDRED_USEC. If you want
the old behaviour add -DOLD_HISTOGRAM to CFLAGS.
*) Add missing '!' in the recv_udp*_stream so we recognize the end of
a timed test correctly.
*) Replace "||" with "&&" to fix an infinite loop in
recv_tcp_conn_rr() most likely introduced in 2.2pl5.
*) Code has been added to kludge around the bug in Linux getsockopt()
where it almost always returns twice the value for which one
asks unlike virtually every other stack on the face of the
planet. This was doing some unpleasant things to tests in which
confidence intervals were requested.
Things not changed in this release
*) Lots :)
These are the Release Notes for revision 2.2pl5 of netperf:
Things changed in this release
*) Improved (perhaps even usable :) support for Windows, including
compilation and run on Win64.
*) Fixes for MacOS X and FreeBSD
Things not changed in this release
*) Specifying the port number(s) for the data connection
These are the Release Notes for Revision 2.2pl4 of netperf:
Things changed in this release
*) USE_SYSCTL available on suitable FreeBSD releases to measure CPU
utilization without having to resort to -DUSE_LOOPER.
*) Include Solaris 9 with the Linux sendfile path under -DHAVE_SENDFILE
This still outstanding in this release
*) Knowing why signals are not interrupting socket calls under
OpenVMS. A quick try to use threads for timing a la Win32 worked,
but also cut performance in half. Any and all assistance in this
area would be most welcome.
These are the Release Notes for revisoin 2.2pl3 of netperf:
Things changed in this release
*) I started practicing what I preach and will set SO_REUSEADDR before
netserver tries to bind to its well-known port.
*) Initial port to OpenVMS. This includes support for the OVMS
Auxilliary server (inetd replacement). See README.ovms for more
details on what is involved in compiling and running netperf under
OpenVMS.
*) Testname comparisons are now case insensitive. This is a side
effect of OpenVMS downshifting commandlines to lowercase. I made
the change and decided it was OK to keep it that way, even though
for OpenVMS one _has_ to set the right defines to disable that
downshifting or the command-line options will not work. For example
"-H" will become "-h" which isn't quite the same thing...
*) Misc fixes for nettest_ipv6.c.
*) Support for sendfile() under Linux
Thins I would like to have changed but did not know how or didn't have
time:
*) Allow netserver to run as a standalone daemon under OpenVMS
*) Allow netserver to run as a standalone daemon under Windows
*) Rediscover an inetd-like facility for Windows
*) Figure-out how to get low-overhead, accurate, per-CPU utilization
figures under OpenVMS
*) Get the UDP_RR and UDP_STREAM tests to work under OpenVMS, and get
the TCP_RR test to work based on time rather than transaction
count. There is some bug (possibly in OpenVMS?) where the SIGALRM
fires, but a socket call will not return an EINTR.
Things that changed prior to this release:
*) Addition of the TCP_MAERTS test - this is a TCP_STREAM test where
the data flows from the netserver to the netperf rather than from
the netperf to the netserver. This can be useful in those
situations where netperf (netserver) is installed on a remote
system, but the tester has no shell access and wishes to get
performance data for the path from netserver to netperf.
These are the Release Notes for the 2.2 revision of netperf:
Things changed in this release
*) Various and sundry bugs fixed (in theory) for platforms such as
FreeBSD and Linux. If I left-out your bug fix, it was purely
accidental - my mind has a very small cache, and sometimes I will
"lose" email in the shuffle.
*) Initial support for sendfile() on HP-UX. This test will use the
sendfile() call instead of send() to send data to the
remote. Netperf "lies" to netserver and calls it a TCP_STREAM test
since what netserver needs to do is exactly the same. A future
patch may change that and simply have netserver call the same
routine for both test types. Kudos to Charles Harris for the
initial prototype.
*) The Fore ATM API and HiPPI tests have been dropped from the
distribution.
Things I would have liked to have changed, but did not have time for:
*) Conversion of the source and makefile to use the GNU configure/autoconf
utility to make it easier for folks to build by not having to edit
makefiles... You will notice that I have started to switch from
"DO_MUMBLE" to "HAVE_MUMBLE"
as always - happy benchmarking,
rick jones
---------------------------------------------------------------------
These are the Release Notes for the 2.1pl3 revision of netperf:
*) An OBOB (Off By One Bug) in netlib.c that was causing a core dump
on Irix should be fixed.
*) Irix systems should now be able to determine the number of CPU's
present automagically (code from outside, not tested yet because I
have no MP Irix systems at my disposal)
*) An alpha version of a TCP_CC test has been added - this is a
TCP_CRR test with out the "RR."
*) The -Ae has been removed from the default makefile. If someone has
a nice way to automagically generate the correct makefile for
different platforms I would like to learn how.
happy benchmarking,
rick jones
----------------------------------------------------------------------
These are the Release Notes for the 2.1 revision of netperf:
Things Changed in this release:
*) The XTI (Version 2 of the spec) tests are now documented in the
manual.
*) The TCP_CRR (Connect Request/Response) test is now documented in
the manual, including a description of how it mimics the behaviour
of http (the protocol underlying the WWW).
*) Support for for Windows NT 3.51 OS in the BSD Sockets tests (ok, so
they are really Winsock in that case :). Other test suites may be
ported as required/desired/appropriate.
*) Tests for TCP and UDP, using the IPv6 extensions to BSD sockets are
included in this release. They are included by adding -DUSE_IPv6 to
the makefile and recompiling.
*) Support for a "long long" datatype should only be required for
-DUSE_PSTAT compilation which is an HP-UX only thing. The
*unbundled* HP compilers from at least "HP92453-01 A.09.61 HP C
Compiler" and later should have the required support. The bundled
compiler may not. GCC should work - check the archives listed in
the comp.sys.hp.hpux FAQ for copies. The FAQ is archived on
rtfm.mit.edu under the path pub/usenet/comp.sys.hp.hpux.
*) A "proper" fix for double data type alignment has been included.
*) A new script is included with this release which can be used to
measure aggregate TCP_RR performance (multiple, concurrent
instances of the TCP_RR test). A related use of this script would
be measuring MP scaling. A single-byte TCP_RR test is good for this
purpose for two reasons:
1) it excercises the control/protocol paths heavily without
using much in the way of data copies which may be easier to
scale.
2) most systems can easily saturate cards with bandwidth, but
not so easily with request/response
Of course, feedback on this is most welcome.
*) When measuring CPU utilization, the units for service demand have
been changed from milliseconds (designated ms) of CPU per unit (KB
or Transaction) to microseconds (desginated us).
*) For accurate reporting of service demand, netperf needs to know the
number of CPU's present on a system. On some systems (HP-UX), this
is automatic. For others (All), it is necessary to add a global "-n
" option to both netperf and netserver.
!! IF THIS IS LEFT-OUT CPU UTILIZATION AND SERVICE DEMAND FOR !!
!! MULTI-PROCESSOR SYSTEMS WILL BE WRONG. !!
If you know of ways to programatically determine the number of
active CPUs on a system, please let the author Rick Jones
know.
*) other things I've probably forgotten :)
Things Not Changed in this release:
*) The ancillary test suites are essentially unchanged - DLPI,
HiPPI/LLA, Unix Domain, and Fore ATM API. Unless there is much
interest expressed in these tests, 2.1 may be the last release in
which they are included. The order of retirement would likely be
Unix Domain, HiPPI/LLA, Fore ATM API, and then DLPI.
Miscelaneous Comments:
*) The -DUSE_LOOPER CPU utilization _seems_ to be nice and low-impact
on HP-UX, Digital Unix, and IRIX. It does not yet seem to be
low-impact on Solaris (I need an example of priocntl usage), AIX
(setpri only works if you are root), and NT (not sure of the
reason). Help with those problems would be most appreciated.
0707010003bba0000081a40000000000000000000000014f45c4ce0000081f000000b500010002ffffffffffffffff0000002900000000root/usr/local/share/doc/netperf/COPYING
Copyright (C) 1993 Hewlett-Packard Company
ALL RIGHTS RESERVED.
The enclosed software and documentation includes copyrighted works
of Hewlett-Packard Co. For as long as you comply with the following
limitations, you are hereby authorized to (i) use, reproduce, and
modify the software and documentation, and to (ii) distribute the
software and documentation, including modifications, for
non-commercial purposes only.
1. The enclosed software and documentation is made available at no
charge in order to advance the general development of
high-performance networking products.
2. You may not delete any copyright notices contained in the
software or documentation. All hard copies, and copies in
source code or object code form, of the software or
documentation (including modifications) must contain at least
one of the copyright notices.
3. The enclosed software and documentation has not been subjected
to testing and quality control and is not a Hewlett-Packard Co.
product. At a future time, Hewlett-Packard Co. may or may not
offer a version of the software and documentation as a product.
4. THE SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS".
HEWLETT-PACKARD COMPANY DOES NOT WARRANT THAT THE USE,
REPRODUCTION, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
DOCUMENTATION WILL NOT INFRINGE A THIRD PARTY'S INTELLECTUAL
PROPERTY RIGHTS. HP DOES NOT WARRANT THAT THE SOFTWARE OR
DOCUMENTATION IS ERROR FREE. HP DISCLAIMS ALL WARRANTIES,
EXPRESS AND IMPLIED, WITH REGARD TO THE SOFTWARE AND THE
DOCUMENTATION. HP SPECIFICALLY DISCLAIMS ALL WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
5. HEWLETT-PACKARD COMPANY WILL NOT IN ANY EVENT BE LIABLE FOR ANY
DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
(INCLUDING LOST PROFITS) RELATED TO ANY USE, REPRODUCTION,
MODIFICATION, OR DISTRIBUTION OF THE SOFTWARE OR DOCUMENTATION.
0707010003bba1000081a40000000000000000000000014f45c4ce0000001b000000b500010002ffffffffffffffff0000002b00000000root/usr/local/share/doc/netperf/ChangeLog See the file Release_Notes. 0707010003bb9f000081a40000000000000000000000014f45c4ce00001c38000000b500010002ffffffffffffffff0000002900000000root/usr/local/share/doc/netperf/AUTHORS This file is here for people to list their contributions to the
netperf benchmark. When you enhance or fix something, put your name
and a description of the what/where/whey/why/how here. If you like,
feel free to include an email address.
I would like to apologize in advance to anyone I've forgotten to
include.
Rick Jones
Responsible for initial packaging and release of netperf and
"editorial" continuity for subsequent releases.
Karen Choy
Code to allow netserver to run as a standalone daemon.
Dave Shield
Wrote the first revision of the netperf and netserver manpages.
Sarr Blumson
Fixes for AIX 3.1 and 3.2. Also fixes for Solaris 2.1 without
realizing it ;-)
Jeff Smits
Fixes for TCP_RR and UDP_RR on sytems with an htonl that is not a no-op.
Warren Burnett
Example code for DLPI tests.
Several Folks
Code to tell SunOS 4 to *not* restart system calls on receipt of a
signal.
Fore Systems Inc.
Manpages for the FORE API and question answering
David Channin
Access to systems running the Fore ATM API
Jonathan Stone
Include file fixes for Ultrix
Bruce Barnett
Bunches of warnings fixes and lint picks for Solaris 2.3
Herman Dierks et al
Code to calculate confidence intervals for tests
Hal Murray
Helpful suggestions for the scripts to make them more compatible with
the netperf database (http://www.cup.hp.com/netperf/NetperfPage.html).
His prompting finally got me off my whatever to put the confidence
interval stuff from the guys at IBM into netperf
Peter Skopp pds@cs.columbia.edu
Fixes to make netperf more secure.
Tom Wilson
A fix to send_udp_rr to correct bogus throughput values.
Thorsten Lockert
A bunch of clean-up for the *BSD OSes
Serge Pachkovsky
Code for low-priority soaker process for AIX and SGI
The fine folks at Adaptec
The initial port of netperf (1.9PL4) to Windows NT 3.51.
Robin Callender
The PPC binaries for the 1.9PL4 port of netperf to NT and for assorted
code clean-ups and help with CPU utilization measurements.
"Todd J. Derr"
For offering to take-on support of the Fore ATM API files with 2.1 and
for his help in making the tar files and such more user-friendly
Michael Shuldman
Improvements to the makefile and additional checks for OpenBSD
Kris Corwin
discovery of a debug statement outside of if (debug) that may have
been the cause of all the nasty connection refused errors in random
UDP_RR tests...
Charles Harris
Initial prototype of the TCP_SENDFILE test support
Philip Pishioneri of Cornel
Conversion of the netperf.ps manul to PDF format.
The Hewlett-Packard OpenVMS folks
Assistance with the port to OpenVMS
Munechika SUMIKAWA @ KAME Project / FreeBSD.org
IPv6 fixes
Jan Iven of CERN
initial mods for sendfile() under Linux
Fabrice Bacchella
for pointing-out that Solaris 9 has a copy of Linux sendfile()
Andrew Gallatin
for assistance with the FreeBSD sysctl() stuff, and later making it
calibration-free
fixes to configure to recognize Solaris 11
fixes to netcpu_procstat.c for later linux kernels
workarounds to get Linux to report ENOBUFS on TX queue overflows
Mark Cooper
pointing-out the need for -lresolv when compiling -DDO_DNS on RedHat
7.1
Carl Mascott
finding some cut-and-paste erors in create_data_socket error logging
Fabrice Bacchella
Fixes for -DHISTOGRAM and -DUNIX on Mac OS X, updates to usage strings
Spencer Frink
Fixes and Cleanup for WIN32. Many over many years.
Nicholas Thomas
Fixes for DLPI on SVR4 Streams under Linux
Dave Craig
Fixes for getaddrinfo error returns
David Mosberger of HP
Workaround for the Linux getsockopt() bug that returns more than that
for which one asked.
Stephen Burger of HP
Code to implement the netserver CPU binding.
Vladislav "Vlad" Yasevich of HP
Initial SCTP tests. Enhancements to the configure.ac sources to show
the way to make many of the LIBS="foo" before ./configure unnecessary.
Padmanabhan "Paddu" S N of HP
Patches for /proc/stat CPU util and recv_tcp_rr.
Cary Coutant and other hp-mac-users of HP
Access to Mac OS X systems for porting netperf 2.4.0
Chris Bertin of HP
Access to AIX for initial porting of netperf 2.4.0
James Carlson
Assistance finding the right magic to compile SCTP on Solaris 10.
Gavin
Pointers on Solaris 10 Microstate accounting.
Brent Draney
Getting netcpu_perfstat.c in running order on AIX and other misc
fixups in places such as BSD.
Samuel Ying
Change struct sockaddr to struct sockaddr storage in netserver.c
Rodolpho Boer
Fix for default message size in UDP_STREAM when defualt SO_SNDBUF size
is > max UDP datagram size.
Michael Dorff
Getting netperf/netserver to compile under Windows with MS Visual
Studio 2003
George Davis
Changes to deal with different floating-point formats.
Anonymous
Changes to retrieve CPU util on MacOS X.
Dickon Reed
Patches to attend to some windows in TCP_CRR and TCP_CC under Windows
Bret McKee
Fixes to get netcpu_looper compiling and working after the "netcpu"
split
Hans Blom
Improvements to closing/redirecting stdin/stdout/stderr in netserver
Martin Brown
RPM support in the form of netperf.spec.in and related configure.ac
etc changes
Shilpi Agarwal
Changes to allow UDP_STREAM to use connected sockets on both sides.
Steve Reinhardt
Fixes for buffer filling.
Gisle Vanem
Fixes for Windows compilation under MingW/gcc.
Scott Weitzenkamp
Patches to enable demo mode in the UDP_STREAM test
Emir Halepovic
Feedback on the manual
Kouhei Sutou
Generate netperf_version.h and netperf.spec via configure rather than
makefile, include limits to get PathMAX on FreeBSD.
Dan Yost
Fix to fflush() each interim result in demo mode to make things
happier for folks redirecting same to a file.
Alexander Duyck
Fixes to replace struct sockaddr_in with struct sockaddr_storage
Fixes to UDP_RR to preclude hangs on Windows
Fizes to UDP_RR to honour -f and -B options
Anonymous
Support for sendfile() on OSX
Matt Waddel
Fix to use vfork() instead of fork() on platforms without fork()
Simon Burge
Fixes for *BSD CPU util.
Adam Bidema
Fixes for launching netserver children when the path to netserver.exe
is very long.
Gisle Vanem
MingW cnd MSDOS (djgpp) cleanups.
Marcel Shuldman
Changes to make netperf more profiling friendly
Bruno Cornec
Fixes to supply some missing fprintf format statements.
Jose Pedro Oliveira
Linux compilation fixes when SCTP and DCCP are enabled. Changes to
configure.ac to allow it to inherit compiler flags from environment
variables.
Pal Baranyai
Typo in nettest_dlpi.c
Brian Haley
Changes to allow something like netperf -H ::1 to work
Frank Schuster
Discovering that FreeBSD 8.X also does not need an SCTP library
Josselin Costanzi
DEBUG_LOG_FILE patch for Android
Dongsheng Song
Assorted Windows fixes
Hushan Jia
Fix to actually run SCTP_RR_MANY when requested
David MacMahon davidm@astro.berkeley.edu
Fix to allow configure in a build directory.0707010003bba6000041ed0000000000000000000000034f45c9f100000000000000b500010002ffffffffffffffff0000001900000000root/usr/local/share/man 0707010003bba7000041ed0000000000000000000000024f45c9f100000000000000b500010002ffffffffffffffff0000001e00000000root/usr/local/share/man/man1 0707010003bba8000081a40000000000000000000000014f45c14b00001c24000000b500010002ffffffffffffffff0000002800000000root/usr/local/share/man/man1/netperf.1 .TH netperf 1 ""
.SH NAME
netperf \- a network performance benchmark
.SH SYNOPSIS
.B netperf
[global options] -- [test specific options]
.SH DESCRIPTION
.B 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 conditionally compiled-in.
.SS GLOBAL OPTIONS
.TP
.B \-4
Use AF_INET (aka IPv4) addressing for the control and possibly data
connections.
.TP
.B \-6
Use AF_INET6 (aka IPv6) addressing for the control and possibly data
connections.
.TP
.B \-a sizespec
Alter the send and receive buffer alignments on the local system.
This defaults to 8 bytes.
.TP
.B \-A sizespec
As -a, but for the remote system.
.TP
.B \-B brandstr
Add brandstr to the output of a test with banners disabled.
.TP
.B \-c [rate]
Request CPU utilization and service demand calculations for the
local system. If the optional rate parameter is specified,
.B netperf
will use that instead of calculating the rate itself.
.TP
.B \-C [rate]
As -c, but for the remote system.
.TP
.B \-d
Increase the quantity of debugging output displayed during
a test (possibly at the expense of performance).
.TP
.B \-D [secs,units] (*)
Display interim results at least every secs seconds uning units as the
initial guess for units per second. This is only available when
netperf has been configured with --enable-demo.
.TP
.B \-f GMKgmk
Change the units of measure for *_STREAM tests. Capital letters are
powers of two, lowercase are powers of ten.
.TP
.B \-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.
.TP
.B \-h
Display a usage string, and exit.
.TP
.B \-H name|ip,family (*)
Set the hostname (or IP address) and address family to use to
establish the control connection to the remote system. Passing a
single name with no comma will only set remote_host and will leave
selection of address family for the control connection to the stack or
by a -4 -r -6 command line option.
.TP
.B \-i max,min
Set the maximum and minimum number of iterations when trying to reach
certain confidence levels.
.TP
.B \-j
Instruct netperf to calculate additional statistics on timing when
running an omni test. Display of said statistics will depend on the
presence of the corresponding output selectors in the output
selection. These are MIN_LATENCY, MAX_LATENCY, P50_LATENCY,
P90_LATENCY, P99_LATENCY, MEAN_LATENCY and STDDEV_LATENCY.
.TP
.B \-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)
.TP
.B \-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.
.TP
.B \-L name|ip,fam (*)
Set the local name|IP and/or address family for the socket used for
the control connection to the remote netserver.
.TP
.B \-n numcpus
Specify the number of CPU's in the system on those systems for which
netperf has no way to find the number of CPU's programatically.
.TP
.B \-N
This option will tell netperf to not establish a control connection to
a remote netserver. Instead it will try to establish a data
connection directly, using only the information supplied by the
command line parameters and/or internal defaults. Unless other ports
are provided by the command line, by default the data connection will
be to the "discard" port for a "STREAM" or "SENDFILE" test, the "echo"
port for an "RR" test or the "chargen" port for a "MAERTS" test.
.TP
.B \-o sizespec
Set an offset from the alignment specified with -a.
.TP
.B \-O sizespec
As -o, but for the remote system.
.TP
.B \-p portnum,locport (*)
Direct the control connection to a netserver listening on the
specified port, rather than using a "netperf" entry in
/etc/services or the internal default (port 12865). If ",locport" is
specified the control connection will be established from that local
port number. Specifying a single port number with no comma will
specify only the remote netserver port number and will leave local
port number selection to the stack.
.TP
.B \-P 0|1
Show (1) or suppress (0) the test banner.
.TP
.B \-S
This option will cause an attempt to set SO_KEEPALIVE on the ends of
the data connection for tests using BSD Sockets. It will be made on
the netperf side of classic tests, and both netperf and netserver side
of an omni or migrated test.
.TP
.B \-s seconds
This will cause netperf to sleep "seconds" seconds before transferring
data over the data connection.
.TP
.B \-t testname
Specify the test to perform.
Valid testnames include, but are not limited to, nor always compiled-in:
.RS
.RS
.nf
.I TCP_STREAM
.I TCP_SENDFILE
.I TCP_MAERTS
.I TCP_RR
.I TCP_CRR
.I UDP_STREAM
.I UDP_RR
.I DLCO_STREAM
.I DLCO_RR
.I DLCL_STREAM
.I DLCL_RR
.I STREAM_STREAM
.I STREAM_RR
.I DG_STREAM
.I DG_RR
.I SCTP_STREAM
.I SCTP_STREAM_MANY
.I SCTP_RR
.I SCTP_RR_MANY
.I LOC_CPU
.I REM_CPU
.fi
.RE
.RE
.TP
.B \-T lcpu,remcpu
Request that netperf be bound to CPU lcpu and/or netserver be bound to
CPU rcpu.
.TP
.B \-v verbosity
Set the verbosity level for the test (only with -P).
.TP
.B \-V
Display the netperf version and exit.
.SS TEST SPECIFIC OPTIONS
.TP
.B \-h
Display a usage string based on the test name set with -t, and exit.
Please consult the netperf manual
.I
Care and Feeding of Netperf 2.5.X
(doc/netperf.[pdf|html|txt]) for more information. Or you can join and
send email to netperf-talk@netperf.org.
.SH NOTE
For those options taking two parms, at least one must be specified;
specifying one value without a comma will set both parms to that
value, specifying a value with a leading comma will set just the
second parm, a value with a trailing comma will set just the first. To
set each parm to unique values, specify both and separate them with a
comma.
* For these options taking two parms, specifying one value with no
comma will only set the first parm and will leave the second at the
default value. To set the second value it must be preceded with a
comma or be a comma-separated pair. This is to retain previous netperf
behaviour.
.SH BUGS
There are bound to be bugs. If you think you have found a bug, please
mention it in netperf-talk@netperf.org. List membership is required
to send email to the list. See
http://www.netperf.org/cgi-bin/mailman/listinfo/netperf-talk . If all
else fails send email to netperf-feedback@netperf.org.
.SH SEE ALSO
.BR netserver (1)
.br
.I
Care and Feeding of Netperf 2.5.X
.br
http://www.netperf.org/
.SH AUTHORS
HP Information Networks Division - Networking Performance Team.
.br
Rick Jones
.br
Karen Choy HP IND
.br
Dave Shield (man pages)
.br
Others too numerous to mention here - see the AUTHORS file
0707010003bba9000081a40000000000000000000000014f45c14b00000651000000b500010002ffffffffffffffff0000002a00000000root/usr/local/share/man/man1/netserver.1 .TH netserver 1 ""
.SH NAME
netserver \- a network performance benchmark server
.SH SYNOPSIS
.B netserver
[-4]
[-6]
[-d]
[-h]
[-L name,family]
[-p portnum]
[-v verbosity]
[-V]
.SH DESCRIPTION
.B Netserver
listens for connections from a
.C netperf
benchmark, and responds accordingly.
It can either be run from
.C inetd
or as a standalone daemon (with the -p flag). If run from
.C inetd
the -p option should not be used.
.SS OPTIONS
.TP
.B \-4
Use AF_INET (aka IPv4) addressing for the control and possibly data
connections.
.TP
.B \-6
Use AF_INET6 (aka IPv6) addressing for the control and possibly data
connections.
.TP
.B \-d
Increase the quantity of debugging output displayed during
a test (possibly at the expense of performance).
.TP
.B \-h
Display a usage string, and exit.
.TP
.B \-L name,family
Set the local name and/or address family for the socket used for
the control connection.
.TP
.B \-p portnum
Listen on the specified port.
This is used when running as a standalone daemon.
.TP
.B \-v verbosity
Set the verbosity level for the test.
.TP
.B \-V
Display the netperf version and exit.
.SH BUGS
No known bugs at this time. If you think you have found a bug, please report it to either netperf-talk@netperf.org or netperf-feedback@netperf.org.
.SH SEE ALSO
.BR netperf (1)
.br
.I
Netperf: A Network Performance Benchmark
.br
http://www.netperf.org/
.SH AUTHORS
HP Information Networks Division - Networking Performance Team.
.br
Rick Jones
.br
Karen Choy HP IND
.br
Dave Shield (man pages)
.br
Others too numerous to mention here - see the AUTHORS file
0707010003bba4000041ed0000000000000000000000024f45c9f100000000000000b500010002ffffffffffffffff0000001a00000000root/usr/local/share/info 0707010003bba5000081a40000000000000000000000014f45c14a0002d501000000b500010002ffffffffffffffff0000002700000000root/usr/local/share/info/netperf.info This is netperf.info, produced by makeinfo version 4.13 from
netperf.texi.
This is Rick Jones' feeble attempt at a Texinfo-based manual for the
netperf benchmark.
Copyright (C) 2005-2011 Hewlett-Packard Company
Permission is granted to copy, distribute and/or modify this
document per the terms of the netperf source licence, a copy of
which can be found in the file `COPYING' of the basic netperf
distribution.
File: netperf.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
Netperf Manual
**************
This is Rick Jones' feeble attempt at a Texinfo-based manual for the
netperf benchmark.
Copyright (C) 2005-2011 Hewlett-Packard Company
Permission is granted to copy, distribute and/or modify this
document per the terms of the netperf source licence, a copy of
which can be found in the file `COPYING' of the basic netperf
distribution.
* Menu:
* Introduction:: An introduction to netperf - what it
is and what it is not.
* Installing Netperf:: How to go about installing netperf.
* The Design of Netperf::
* Global Command-line Options::
* Using Netperf to Measure Bulk Data Transfer::
* Using Netperf to Measure Request/Response ::
* Using Netperf to Measure Aggregate Performance::
* Using Netperf to Measure Bidirectional Transfer::
* The Omni Tests::
* Other Netperf Tests::
* Address Resolution::
* Enhancing Netperf::
* Netperf4::
* Concept Index::
* Option Index::
File: netperf.info, Node: Introduction, Next: Installing Netperf, Prev: Top, Up: Top
1 Introduction
**************
Netperf is a benchmark that can be use to measure various aspect of
networking performance. The primary foci are bulk (aka unidirectional)
data transfer and request/response performance using either TCP or UDP
and the Berkeley Sockets interface. As of this writing, the tests
available either unconditionally or conditionally include:
* TCP and UDP unidirectional transfer and request/response over IPv4
and IPv6 using the Sockets interface.
* TCP and UDP unidirectional transfer and request/response over IPv4
using the XTI interface.
* Link-level unidirectional transfer and request/response using the
DLPI interface.
* Unix domain sockets
* SCTP unidirectional transfer and request/response over IPv4 and
IPv6 using the sockets interface.
While not every revision of netperf will work on every platform
listed, the intention is that at least some version of netperf will
work on the following platforms:
* Unix - at least all the major variants.
* Linux
* Windows
* Others
Netperf is maintained and informally supported primarily by Rick
Jones, who can perhaps be best described as Netperf Contributing
Editor. Non-trivial and very appreciated assistance comes from others
in the network performance community, who are too numerous to mention
here. While it is often used by them, netperf is NOT supported via any
of the formal Hewlett-Packard support channels. You should feel free
to make enhancements and modifications to netperf to suit your
nefarious porpoises, so long as you stay within the guidelines of the
netperf copyright. If you feel so inclined, you can send your changes
to netperf-feedback for possible
inclusion into subsequent versions of netperf.
It is the Contributing Editor's belief that the netperf license walks
like open source and talks like open source. However, the license was
never submitted for "certification" as an open source license. If you
would prefer to make contributions to a networking benchmark using a
certified open source license, please consider netperf4, which is
distributed under the terms of the GPLv2.
The netperf-talk mailing list is
available to discuss the care and feeding of netperf with others who
share your interest in network performance benchmarking. The
netperf-talk mailing list is a closed list (to deal with spam) and you
must first subscribe by sending email to netperf-talk-request
.
* Menu:
* Conventions::
File: netperf.info, Node: Conventions, Prev: Introduction, Up: Introduction
1.1 Conventions
===============
A "sizespec" is a one or two item, comma-separated list used as an
argument to a command-line option that can set one or two, related
netperf parameters. If you wish to set both parameters to separate
values, items should be separated by a comma:
parameter1,parameter2
If you wish to set the first parameter without altering the value of
the second from its default, you should follow the first item with a
comma:
parameter1,
Likewise, precede the item with a comma if you wish to set only the
second parameter:
,parameter2
An item with no commas:
parameter1and2
will set both parameters to the same value. This last mode is one of
the most frequently used.
There is another variant of the comma-separated, two-item list called
a "optionspec" which is like a sizespec with the exception that a
single item with no comma:
parameter1
will only set the value of the first parameter and will leave the
second parameter at its default value.
Netperf has two types of command-line options. The first are global
command line options. They are essentially any option not tied to a
particular test or group of tests. An example of a global command-line
option is the one which sets the test type - `-t'.
The second type of options are test-specific options. These are
options which are only applicable to a particular test or set of tests.
An example of a test-specific option would be the send socket buffer
size for a TCP_STREAM test.
Global command-line options are specified first with test-specific
options following after a `--' as in:
netperf --
File: netperf.info, Node: Installing Netperf, Next: The Design of Netperf, Prev: Introduction, Up: Top
2 Installing Netperf
********************
Netperf's primary form of distribution is source code. This allows
installation on systems other than those to which the authors have
ready access and thus the ability to create binaries. There are two
styles of netperf installation. The first runs the netperf server
program - netserver - as a child of inetd. This requires the installer
to have sufficient privileges to edit the files `/etc/services' and
`/etc/inetd.conf' or their platform-specific equivalents.
The second style is to run netserver as a standalone daemon. This
second method does not require edit privileges on `/etc/services' and
`/etc/inetd.conf' but does mean you must remember to run the netserver
program explicitly after every system reboot.
This manual assumes that those wishing to measure networking
performance already know how to use anonymous FTP and/or a web browser.
It is also expected that you have at least a passing familiarity with
the networking protocols and interfaces involved. In all honesty, if
you do not have such familiarity, likely as not you have some
experience to gain before attempting network performance measurements.
The excellent texts by authors such as Stevens, Fenner and Rudoff
and/or Stallings would be good starting points. There are likely other
excellent sources out there as well.
* Menu:
* Getting Netperf Bits::
* Installing Netperf Bits::
* Verifying Installation::
File: netperf.info, Node: Getting Netperf Bits, Next: Installing Netperf Bits, Prev: Installing Netperf, Up: Installing Netperf
2.1 Getting Netperf Bits
========================
Gzipped tar files of netperf sources can be retrieved via anonymous FTP
(ftp://ftp.netperf.org/netperf) for "released" versions of the bits.
Pre-release versions of the bits can be retrieved via anonymous FTP
from the experimental (ftp://ftp.netperf.org/netperf/experimental)
subdirectory.
For convenience and ease of remembering, a link to the download site
is provided via the NetperfPage (http://www.netperf.org/)
The bits corresponding to each discrete release of netperf are
tagged (http://www.netperf.org/svn/netperf2/tags) for retrieval via
subversion. For example, there is a tag for the first version
corresponding to this version of the manual - netperf 2.5.0
(http://www.netperf.org/svn/netperf2/tags/netperf-2.5.0). Those
wishing to be on the bleeding edge of netperf development can use
subversion to grab the top of trunk
(http://www.netperf.org/svn/netperf2/trunk). When fixing bugs or
making enhancements, patches against the top-of-trunk are preferred.
There are likely other places around the Internet from which one can
download netperf bits. These may be simple mirrors of the main netperf
site, or they may be local variants on netperf. As with anything one
downloads from the Internet, take care to make sure it is what you
really wanted and isn't some malicious Trojan or whatnot. Caveat
downloader.
As a general rule, binaries of netperf and netserver are not
distributed from ftp.netperf.org. From time to time a kind soul or
souls has packaged netperf as a Debian package available via the
apt-get mechanism or as an RPM. I would be most interested in learning
how to enhance the makefiles to make that easier for people.
File: netperf.info, Node: Installing Netperf Bits, Next: Verifying Installation, Prev: Getting Netperf Bits, Up: Installing Netperf
2.2 Installing Netperf
======================
Once you have downloaded the tar file of netperf sources onto your
system(s), it is necessary to unpack the tar file, cd to the netperf
directory, run configure and then make. Most of the time it should be
sufficient to just:
gzcat netperf-.tar.gz | tar xf -
cd netperf-
./configure
make
make install
Most of the "usual" configure script options should be present
dealing with where to install binaries and whatnot.
./configure --help
should list all of those and more. You may find the `--prefix'
option helpful in deciding where the binaries and such will be put
during the `make install'.
If the netperf configure script does not know how to automagically
detect which CPU utilization mechanism to use on your platform you may
want to add a `--enable-cpuutil=mumble' option to the configure
command. If you have knowledge and/or experience to contribute to
that area, feel free to contact .
Similarly, if you want tests using the XTI interface, Unix Domain
Sockets, DLPI or SCTP it will be necessary to add one or more
`--enable-[xti|unixdomain|dlpi|sctp]=yes' options to the configure
command. As of this writing, the configure script will not include
those tests automagically.
Starting with version 2.5.0, netperf is migrating most of the
"classic" netperf tests found in `src/nettest_bsd.c' to the so-called
"omni" tests (aka "two routines to run them all") found in
`src/nettest_omni.c'. This migration enables a number of new features
such as greater control over what output is included, and new things to
output. The "omni" test is enabled by default in 2.5.0 and a number of
the classic tests are migrated - you can tell if a test has been
migrated from the presence of `MIGRATED' in the test banner. If you
encounter problems with either the omni or migrated tests, please first
attempt to obtain resolution via or
. If that is unsuccessful, you can add a
`--enable-omni=no' to the configure command and the omni tests will not
be compiled-in and the classic tests will not be migrated.
Starting with version 2.5.0, netperf will include the "burst mode"
functionality in a default compilation of the bits. If you encounter
problems with this, please first attempt to obtain help via
or . If that
is unsuccessful, you can add a `--enable-burst=no' to the configure
command and the burst mode functionality will nt be compiled-in.
On some platforms, it may be necessary to precede the configure
command with a CFLAGS and/or LIBS variable as the netperf configure
script is not yet smart enough to set them itself. Whenever possible,
these requirements will be found in `README.PLATFORM' files. Expertise
and assistance in making that more automagical in the configure script
would be most welcome.
Other optional configure-time settings include
`--enable-intervals=yes' to give netperf the ability to "pace" its
_STREAM tests and `--enable-histogram=yes' to have netperf keep a
histogram of interesting times. Each of these will have some effect on
the measured result. If your system supports `gethrtime()' the effect
of the histogram measurement should be minimized but probably still
measurable. For example, the histogram of a netperf TCP_RR test will
be of the individual transaction times:
netperf -t TCP_RR -H lag -v 2
TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET : histogram
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
16384 87380 1 1 10.00 3538.82
32768 32768
Alignment Offset
Local Remote Local Remote
Send Recv Send Recv
8 0 0 0
Histogram of request/response times
UNIT_USEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0
TEN_USEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0
HUNDRED_USEC : 0: 34480: 111: 13: 12: 6: 9: 3: 4: 7
UNIT_MSEC : 0: 60: 50: 51: 44: 44: 72: 119: 100: 101
TEN_MSEC : 0: 105: 0: 0: 0: 0: 0: 0: 0: 0
HUNDRED_MSEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0
UNIT_SEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0
TEN_SEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0
>100_SECS: 0
HIST_TOTAL: 35391
The histogram you see above is basically a base-10 log histogram
where we can see that most of the transaction times were on the order
of one hundred to one-hundred, ninety-nine microseconds, but they were
occasionally as long as ten to nineteen milliseconds
The `--enable-demo=yes' configure option will cause code to be
included to report interim results during a test run. The rate at
which interim results are reported can then be controlled via the
global `-D' option. Here is an example of `-D' output:
$ src/netperf -D 1.35 -H tardy.hpl.hp.com -f M
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to tardy.hpl.hp.com (15.9.116.144) port 0 AF_INET : demo
Interim result: 5.41 MBytes/s over 1.35 seconds ending at 1308789765.848
Interim result: 11.07 MBytes/s over 1.36 seconds ending at 1308789767.206
Interim result: 16.00 MBytes/s over 1.36 seconds ending at 1308789768.566
Interim result: 20.66 MBytes/s over 1.36 seconds ending at 1308789769.922
Interim result: 22.74 MBytes/s over 1.36 seconds ending at 1308789771.285
Interim result: 23.07 MBytes/s over 1.36 seconds ending at 1308789772.647
Interim result: 23.77 MBytes/s over 1.37 seconds ending at 1308789774.016
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. MBytes/sec
87380 16384 16384 10.06 17.81
Notice how the units of the interim result track that requested by
the `-f' option. Also notice that sometimes the interval will be
longer than the value specified in the `-D' option. This is normal and
stems from how demo mode is implemented not by relying on interval
timers or frequent calls to get the current time, but by calculating
how many units of work must be performed to take at least the desired
interval.
Those familiar with this option in earlier versions of netperf will
note the addition of the "ending at" text. This is the time as
reported by a `gettimeofday()' call (or its emulation) with a `NULL'
timezone pointer. This addition is intended to make it easier to
insert interim results into an rrdtool
(http://oss.oetiker.ch/rrdtool/doc/rrdtool.en.html) Round-Robin
Database (RRD). A likely bug-riddled example of doing so can be found
in `doc/examples/netperf_interim_to_rrd.sh'. The time is reported out
to milliseconds rather than microseconds because that is the most
rrdtool understands as of the time of this writing.
As of this writing, a `make install' will not actually update the
files `/etc/services' and/or `/etc/inetd.conf' or their
platform-specific equivalents. It remains necessary to perform that
bit of installation magic by hand. Patches to the makefile sources to
effect an automagic editing of the necessary files to have netperf
installed as a child of inetd would be most welcome.
Starting the netserver as a standalone daemon should be as easy as:
$ netserver
Starting netserver at port 12865
Starting netserver at hostname 0.0.0.0 port 12865 and family 0
Over time the specifics of the messages netserver prints to the
screen may change but the gist will remain the same.
If the compilation of netperf or netserver happens to fail, feel free
to contact or join and ask in
. However, it is quite important that you
include the actual compilation errors and perhaps even the configure
log in your email. Otherwise, it will be that much more difficult for
someone to assist you.
File: netperf.info, Node: Verifying Installation, Prev: Installing Netperf Bits, Up: Installing Netperf
2.3 Verifying Installation
==========================
Basically, once netperf is installed and netserver is configured as a
child of inetd, or launched as a standalone daemon, simply typing:
netperf
should result in output similar to the following:
$ netperf
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (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.00 2997.84
File: netperf.info, Node: The Design of Netperf, Next: Global Command-line Options, Prev: Installing Netperf, Up: Top
3 The Design of Netperf
***********************
Netperf is designed around a basic client-server model. There are two
executables - netperf and netserver. Generally you will only execute
the netperf program, with the netserver program being invoked by the
remote system's inetd or having been previously started as its own
standalone daemon.
When you execute netperf it will establish a "control connection" to
the remote system. This connection will be used to pass test
configuration information and results to and from the remote system.
Regardless of the type of test to be run, the control connection will
be a TCP connection using BSD sockets. The control connection can use
either IPv4 or IPv6.
Once the control connection is up and the configuration information
has been passed, a separate "data" connection will be opened for the
measurement itself using the API's and protocols appropriate for the
specified test. When the test is completed, the data connection will
be torn-down and results from the netserver will be passed-back via the
control connection and combined with netperf's result for display to
the user.
Netperf places no traffic on the control connection while a test is
in progress. Certain TCP options, such as SO_KEEPALIVE, if set as your
systems' default, may put packets out on the control connection while a
test is in progress. Generally speaking this will have no effect on
the results.
* Menu:
* CPU Utilization::
File: netperf.info, Node: CPU Utilization, Prev: The Design of Netperf, Up: The Design of Netperf
3.1 CPU Utilization
===================
CPU utilization is an important, and alas all-too infrequently reported
component of networking performance. Unfortunately, it can be one of
the most difficult metrics to measure accurately and portably. Netperf
will do its level best to report accurate CPU utilization figures, but
some combinations of processor, OS and configuration may make that
difficult.
CPU utilization in netperf is reported as a value between 0 and 100%
regardless of the number of CPUs involved. In addition to CPU
utilization, netperf will report a metric called a "service demand".
The service demand is the normalization of CPU utilization and work
performed. For a _STREAM test it is the microseconds of CPU time
consumed to transfer on KB (K == 1024) of data. For a _RR test it is
the microseconds of CPU time consumed processing a single transaction.
For both CPU utilization and service demand, lower is better.
Service demand can be particularly useful when trying to gauge the
effect of a performance change. It is essentially a measure of
efficiency, with smaller values being more efficient and thus "better."
Netperf is coded to be able to use one of several, generally
platform-specific CPU utilization measurement mechanisms. Single
letter codes will be included in the CPU portion of the test banner to
indicate which mechanism was used on each of the local (netperf) and
remote (netserver) system.
As of this writing those codes are:
`U'
The CPU utilization measurement mechanism was unknown to netperf or
netperf/netserver was not compiled to include CPU utilization
measurements. The code for the null CPU utilization mechanism can
be found in `src/netcpu_none.c'.
`I'
An HP-UX-specific CPU utilization mechanism whereby the kernel
incremented a per-CPU counter by one for each trip through the idle
loop. This mechanism was only available on specially-compiled HP-UX
kernels prior to HP-UX 10 and is mentioned here only for the sake
of historical completeness and perhaps as a suggestion to those
who might be altering other operating systems. While rather
simple, perhaps even simplistic, this mechanism was quite robust
and was not affected by the concerns of statistical methods, or
methods attempting to track time in each of user, kernel,
interrupt and idle modes which require quite careful accounting.
It can be thought-of as the in-kernel version of the looper `L'
mechanism without the context switch overhead. This mechanism
required calibration.
`P'
An HP-UX-specific CPU utilization mechanism whereby the kernel
keeps-track of time (in the form of CPU cycles) spent in the kernel
idle loop (HP-UX 10.0 to 11.31 inclusive), or where the kernel
keeps track of time spent in idle, user, kernel and interrupt
processing (HP-UX 11.23 and later). The former requires
calibration, the latter does not. Values in either case are
retrieved via one of the pstat(2) family of calls, hence the use
of the letter `P'. The code for these mechanisms is found in
`src/netcpu_pstat.c' and `src/netcpu_pstatnew.c' respectively.
`K'
A Solaris-specific CPU utilization mechanism whereby the kernel
keeps track of ticks (eg HZ) spent in the idle loop. This method
is statistical and is known to be inaccurate when the interrupt
rate is above epsilon as time spent processing interrupts is not
subtracted from idle. The value is retrieved via a kstat() call -
hence the use of the letter `K'. Since this mechanism uses units
of ticks (HZ) the calibration value should invariably match HZ.
(Eg 100) The code for this mechanism is implemented in
`src/netcpu_kstat.c'.
`M'
A Solaris-specific mechanism available on Solaris 10 and latter
which uses the new microstate accounting mechanisms. There are
two, alas, overlapping, mechanisms. The first tracks nanoseconds
spent in user, kernel, and idle modes. The second mechanism tracks
nanoseconds spent in interrupt. Since the mechanisms overlap,
netperf goes through some hand-waving to try to "fix" the problem.
Since the accuracy of the handwaving cannot be completely
determined, one must presume that while better than the `K'
mechanism, this mechanism too is not without issues. The values
are retrieved via kstat() calls, but the letter code is set to `M'
to distinguish this mechanism from the even less accurate `K'
mechanism. The code for this mechanism is implemented in
`src/netcpu_kstat10.c'.
`L'
A mechanism based on "looper"or "soaker" processes which sit in
tight loops counting as fast as they possibly can. This mechanism
starts a looper process for each known CPU on the system. The
effect of processor hyperthreading on the mechanism is not yet
known. This mechanism definitely requires calibration. The code
for the "looper"mechanism can be found in `src/netcpu_looper.c'
`N'
A Microsoft Windows-specific mechanism, the code for which can be
found in `src/netcpu_ntperf.c'. This mechanism too is based on
what appears to be a form of micro-state accounting and requires no
calibration. On laptops, or other systems which may dynamically
alter the CPU frequency to minimize power consumtion, it has been
suggested that this mechanism may become slightly confused, in
which case using BIOS/uEFI settings to disable the power saving
would be indicated.
`S'
This mechanism uses `/proc/stat' on Linux to retrieve time (ticks)
spent in idle mode. It is thought but not known to be reasonably
accurate. The code for this mechanism can be found in
`src/netcpu_procstat.c'.
`C'
A mechanism somewhat similar to `S' but using the sysctl() call on
BSD-like Operating systems (*BSD and MacOS X). The code for this
mechanism can be found in `src/netcpu_sysctl.c'.
`Others'
Other mechanisms included in netperf in the past have included
using the times() and getrusage() calls. These calls are actually
rather poorly suited to the task of measuring CPU overhead for
networking as they tend to be process-specific and much
network-related processing can happen outside the context of a
process, in places where it is not a given it will be charged to
the correct, or even a process. They are mentioned here as a
warning to anyone seeing those mechanisms used in other networking
benchmarks. These mechanisms are not available in netperf 2.4.0
and later.
For many platforms, the configure script will chose the best
available CPU utilization mechanism. However, some platforms have no
particularly good mechanisms. On those platforms, it is probably best
to use the "LOOPER" mechanism which is basically some number of
processes (as many as there are processors) sitting in tight little
loops counting as fast as they can. The rate at which the loopers
count when the system is believed to be idle is compared with the rate
when the system is running netperf and the ratio is used to compute CPU
utilization.
In the past, netperf included some mechanisms that only reported CPU
time charged to the calling process. Those mechanisms have been
removed from netperf versions 2.4.0 and later because they are
hopelessly inaccurate. Networking can and often results in CPU time
being spent in places - such as interrupt contexts - that do not get
charged to a or the correct process.
In fact, time spent in the processing of interrupts is a common issue
for many CPU utilization mechanisms. In particular, the "PSTAT"
mechanism was eventually known to have problems accounting for certain
interrupt time prior to HP-UX 11.11 (11iv1). HP-UX 11iv2 and later are
known/presumed to be good. The "KSTAT" mechanism is known to have
problems on all versions of Solaris up to and including Solaris 10.
Even the microstate accounting available via kstat in Solaris 10 has
issues, though perhaps not as bad as those of prior versions.
The /proc/stat mechanism under Linux is in what the author would
consider an "uncertain" category as it appears to be statistical, which
may also have issues with time spent processing interrupts.
In summary, be sure to "sanity-check" the CPU utilization figures
with other mechanisms. However, platform tools such as top, vmstat or
mpstat are often based on the same mechanisms used by netperf.
* Menu:
* CPU Utilization in a Virtual Guest::
File: netperf.info, Node: CPU Utilization in a Virtual Guest, Prev: CPU Utilization, Up: CPU Utilization
3.1.1 CPU Utilization in a Virtual Guest
----------------------------------------
The CPU utilization mechanisms used by netperf are "inline" in that
they are run by the same netperf or netserver process as is running the
test itself. This works just fine for "bare iron" tests but runs into
a problem when using virtual machines.
The relationship between virtual guest and hypervisor can be thought
of as being similar to that between a process and kernel in a bare iron
system. As such, (m)any CPU utilization mechanisms used in the virtual
guest are similar to "process-local" mechanisms in a bare iron
situation. However, just as with bare iron and process-local
mechanisms, much networking processing happens outside the context of
the virtual guest. It takes place in the hypervisor, and is not
visible to mechanisms running in the guest(s). For this reason, one
should not really trust CPU utilization figures reported by netperf or
netserver when running in a virtual guest.
If one is looking to measure the added overhead of a virtualization
mechanism, rather than rely on CPU utilization, one can rely instead on
netperf _RR tests - path-lengths and overheads can be a significant
fraction of the latency, so increases in overhead should appear as
decreases in transaction rate. Whatever you do, DO NOT rely on the
throughput of a _STREAM test. Achieving link-rate can be done via a
multitude of options that mask overhead rather than eliminate it.
File: netperf.info, Node: Global Command-line Options, Next: Using Netperf to Measure Bulk Data Transfer, Prev: The Design of Netperf, Up: Top
4 Global Command-line Options
*****************************
This section describes each of the global command-line options
available in the netperf and netserver binaries. Essentially, it is an
expanded version of the usage information displayed by netperf or
netserver when invoked with the `-h' global command-line option.
* Menu:
* Command-line Options Syntax::
* Global Options::
File: netperf.info, Node: Command-line Options Syntax, Next: Global Options, Prev: Global Command-line Options, Up: Global Command-line Options
4.1 Command-line Options Syntax
===============================
Revision 1.8 of netperf introduced enough new functionality to overrun
the English alphabet for mnemonic command-line option names, and the
author was not and is not quite ready to switch to the contemporary
`--mumble' style of command-line options. (Call him a Luddite if you
wish :).
For this reason, the command-line options were split into two parts -
the first are the global command-line options. They are options that
affect nearly any and every test type of netperf. The second type are
the test-specific command-line options. Both are entered on the same
command line, but they must be separated from one another by a `--' for
correct parsing. Global command-line options come first, followed by
the `--' and then test-specific command-line options. If there are no
test-specific options to be set, the `--' may be omitted. If there are
no global command-line options to be set, test-specific options must
still be preceded by a `--'. For example:
netperf --
sets both global and test-specific options:
netperf
sets just global options and:
netperf --
sets just test-specific options.
File: netperf.info, Node: Global Options, Prev: Command-line Options Syntax, Up: Global Command-line Options
4.2 Global Options
==================
`-a '
This option allows you to alter the alignment of the buffers used
in the sending and receiving calls on the local system.. Changing
the alignment of the buffers can force the system to use different
copy schemes, which can have a measurable effect on performance.
If the page size for the system were 4096 bytes, and you want to
pass page-aligned buffers beginning on page boundaries, you could
use `-a 4096'. By default the units are bytes, but suffix of "G,"
"M," or "K" will specify the units to be 2^30 (GB), 2^20 (MB) or
2^10 (KB) respectively. A suffix of "g," "m" or "k" will specify
units of 10^9, 10^6 or 10^3 bytes respectively. [Default: 8 bytes]
`-A '
This option is identical to the `-a' option with the difference
being it affects alignments for the remote system.
`-b '
This option is only present when netperf has been configure with
-enable-intervals=yes prior to compilation. It sets the size of
the burst of send calls in a _STREAM test. When used in
conjunction with the `-w' option it can cause the rate at which
data is sent to be "paced."
`-B '
This option will cause `' to be appended to the brief (see
-P) output of netperf.
`-c [rate]'
This option will ask that CPU utilization and service demand be
calculated for the local system. For those CPU utilization
mechanisms requiring calibration, the options rate parameter may
be specified to preclude running another calibration step, saving
40 seconds of time. For those CPU utilization mechanisms
requiring no calibration, the optional rate parameter will be
utterly and completely ignored. [Default: no CPU measurements]
`-C [rate]'
This option requests CPU utilization and service demand
calculations for the remote system. It is otherwise identical to
the `-c' option.
`-d'
Each instance of this option will increase the quantity of
debugging output displayed during a test. If the debugging output
level is set high enough, it may have a measurable effect on
performance. Debugging information for the local system is
printed to stdout. Debugging information for the remote system is
sent by default to the file `/tmp/netperf.debug'. [Default: no
debugging output]
`-D [interval,units]'
This option is only available when netperf is configured with
-enable-demo=yes. When set, it will cause netperf to emit periodic
reports of performance during the run. [INTERVAL,UNITS] follow
the semantics of an optionspec. If specified, INTERVAL gives the
minimum interval in real seconds, it does not have to be whole
seconds. The UNITS value can be used for the first guess as to
how many units of work (bytes or transactions) must be done to
take at least INTERVAL seconds. If omitted, INTERVAL defaults to
one second and UNITS to values specific to each test type.
`-f G|M|K|g|m|k|x'
This option can be used to change the reporting units for _STREAM
tests. Arguments of "G," "M," or "K" will set the units to 2^30,
2^20 or 2^10 bytes/s respectively (EG power of two GB, MB or KB).
Arguments of "g," ",m" or "k" will set the units to 10^9, 10^6 or
10^3 bits/s respectively. An argument of "x" requests the units
be transactions per second and is only meaninful for a
request-response test. [Default: "m" or 10^6 bits/s]
`-F '
This option specified the file from which send which buffers will
be pre-filled . While the buffers will contain data from the
specified file, the file is not fully transfered to the remote
system as the receiving end of the test will not write the
contents of what it receives to a file. This can be used to
pre-fill the send buffers with data having different
compressibility and so is useful when measuring performance over
mechanisms which perform compression.
While previously required for a TCP_SENDFILE test, later versions
of netperf removed that restriction, creating a temporary file as
needed. While the author cannot recall exactly when that took
place, it is known to be unnecessary in version 2.5.0 and later.
`-h'
This option causes netperf to display its "global" usage string and
exit to the exclusion of all else.
`-H '
This option will set the name of the remote system and or the
address family used for the control connection. For example:
-H linger,4
will set the name of the remote system to "linger" and tells
netperf to use IPv4 addressing only.
-H ,6
will leave the name of the remote system at its default, and
request that only IPv6 addresses be used for the control
connection.
-H lag
will set the name of the remote system to "lag" and leave the
address family to AF_UNSPEC which means selection of IPv4 vs IPv6
is left to the system's address resolution.
A value of "inet" can be used in place of "4" to request IPv4 only
addressing. Similarly, a value of "inet6" can be used in place of
"6" to request IPv6 only addressing. A value of "0" can be used
to request either IPv4 or IPv6 addressing as name resolution
dictates.
By default, the options set with the global `-H' option are
inherited by the test for its data connection, unless a
test-specific `-H' option is specified.
If a `-H' option follows either the `-4' or `-6' options, the
family setting specified with the -H option will override the `-4'
or `-6' options for the remote address family. If no address
family is specified, settings from a previous `-4' or `-6' option
will remain. In a nutshell, the last explicit global command-line
option wins.
[Default: "localhost" for the remote name/IP address and "0" (eg
AF_UNSPEC) for the remote address family.]
`-I '
This option enables the calculation of confidence intervals and
sets the confidence and width parameters with the first half of the
optionspec being either 99 or 95 for 99% or 95% confidence
respectively. The second value of the optionspec specifies the
width of the desired confidence interval. For example
-I 99,5
asks netperf to be 99% confident that the measured mean values for
throughput and CPU utilization are within +/- 2.5% of the "real"
mean values. If the `-i' option is specified and the `-I' option
is omitted, the confidence defaults to 99% and the width to 5%
(giving +/- 2.5%)
If classic netperf test calculates that the desired confidence
intervals have not been met, it emits a noticeable warning that
cannot be suppressed with the `-P' or `-v' options:
netperf -H tardy.cup -i 3 -I 99,5
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to tardy.cup.hp.com (15.244.44.58) port 0 AF_INET : +/-2.5% 99% conf.
!!! WARNING
!!! Desired confidence was not achieved within the specified iterations.
!!! This implies that there was variability in the test environment that
!!! must be investigated before going further.
!!! Confidence intervals: Throughput : 6.8%
!!! Local CPU util : 0.0%
!!! Remote CPU util : 0.0%
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
32768 16384 16384 10.01 40.23
In the example above we see that netperf did not meet the desired
convidence intervals. Instead of being 99% confident it was within
+/- 2.5% of the real mean value of throughput it is only confident
it was within +/-3.4%. In this example, increasing the `-i'
option (described below) and/or increasing the iteration length
with the `-l' option might resolve the situation.
In an explicit "omni" test, failure to meet the confidence
intervals will not result in netperf emitting a warning. To
verify the hitting, or not, of the confidence intervals one will
need to include them as part of an an *note output selection: Omni
Output Selection. in the test-specific `-o', `-O' or `k' output
selection options. The warning about not hitting the confidence
intervals will remain in a "migrated" classic netperf test.
`-i '
This option enables the calculation of confidence intervals and
sets the minimum and maximum number of iterations to run in
attempting to achieve the desired confidence interval. The first
value sets the maximum number of iterations to run, the second,
the minimum. The maximum number of iterations is silently capped
at 30 and the minimum is silently floored at 3. Netperf repeats
the measurement the minimum number of iterations and continues
until it reaches either the desired confidence interval, or the
maximum number of iterations, whichever comes first. A classic or
migrated netperf test will not display the actual number of
iterations run. An *note omni test: The Omni Tests. will emit the
number of iterations run if the `CONFIDENCE_ITERATION' output
selector is included in the *note output selection: Omni Output
Selection.
If the `-I' option is specified and the `-i' option omitted the
maximum number of iterations is set to 10 and the minimum to three.
Output of a warning upon not hitting the desired confidence
intervals follows the description provided for the `-I' option.
The total test time will be somewhere between the minimum and
maximum number of iterations multiplied by the test length
supplied by the `-l' option.
`-j'
This option instructs netperf to keep additional timing statistics
when explicitly running an *note omni test: The Omni Tests. These
can be output when the test-specific `-o', `-O' or `-k' *note
output selectors: Omni Output Selectors. include one or more of:
* MIN_LATENCY
* MAX_LATENCY
* P50_LATENCY
* P90_LATENCY
* P99_LATENCY
* MEAN_LATENCY
* STDDEV_LATENCY
These statistics will be based on an expanded (100 buckets per row
rather than 10) histogram of times rather than a terribly long
list of individual times. As such, there will be some slight
error thanks to the bucketing. However, the reduction in storage
and processing overheads is well worth it. When running a
request/response test, one might get some idea of the error by
comparing the *note `MEAN_LATENCY': Omni Output Selectors.
calculated from the histogram with the `RT_LATENCY' calculated
from the number of request/response transactions and the test run
time.
In the case of a request/response test the latencies will be
transaction latencies. In the case of a receive-only test they
will be time spent in the receive call. In the case of a
send-only test they will be tim spent in the send call. The units
will be microseconds. Added in netperf 2.5.0.
`-l testlen'
This option controls the length of any one iteration of the
requested test. A positive value for TESTLEN will run each
iteration of the test for at least TESTLEN seconds. A negative
value for TESTLEN will run each iteration for the absolute value of
TESTLEN transactions for a _RR test or bytes for a _STREAM test.
Certain tests, notably those using UDP can only be timed, they
cannot be limited by transaction or byte count. This limitation
may be relaxed in an *note omni: The Omni Tests. test.
In some situations, individual iterations of a test may run for
longer for the number of seconds specified by the `-l' option. In
particular, this may occur for those tests where the socket buffer
size(s) are significantly longer than the bandwidthXdelay product
of the link(s) over which the data connection passes, or those
tests where there may be non-trivial numbers of retransmissions.
If confidence intervals are enabled via either `-I' or `-i' the
total length of the netperf test will be somewhere between the
minimum and maximum iteration count multiplied by TESTLEN.
`-L '
This option is identical to the `-H' option with the difference
being it sets the _local_ hostname/IP and/or address family
information. This option is generally unnecessary, but can be
useful when you wish to make sure that the netperf control and data
connections go via different paths. It can also come-in handy if
one is trying to run netperf through those evil, end-to-end
breaking things known as firewalls.
[Default: 0.0.0.0 (eg INADDR_ANY) for IPv4 and ::0 for IPv6 for the
local name. AF_UNSPEC for the local address family.]
`-n numcpus'
This option tells netperf how many CPUs it should ass-u-me are
active on the system running netperf. In particular, this is used
for the *note CPU utilization: CPU Utilization. and service demand
calculations. On certain systems, netperf is able to determine
the number of CPU's automagically. This option will override any
number netperf might be able to determine on its own.
Note that this option does _not_ set the number of CPUs on the
system running netserver. When netperf/netserver cannot
automagically determine the number of CPUs that can only be set
for netserver via a netserver `-n' command-line option.
As it is almost universally possible for netperf/netserver to
determine the number of CPUs on the system automagically, 99 times
out of 10 this option should not be necessary and may be removed
in a future release of netperf.
`-N'
This option tells netperf to forego establishing a control
connection. This makes it is possible to run some limited netperf
tests without a corresponding netserver on the remote system.
With this option set, the test to be run is to get all the
addressing information it needs to establish its data connection
from the command line or internal defaults. If not otherwise
specified by test-specific command line options, the data
connection for a "STREAM" or "SENDFILE" test will be to the
"discard" port, an "RR" test will be to the "echo" port, and a
"MEARTS" test will be to the chargen port.
The response size of an "RR" test will be silently set to be the
same as the request size. Otherwise the test would hang if the
response size was larger than the request size, or would report an
incorrect, inflated transaction rate if the response size was less
than the request size.
Since there is no control connection when this option is
specified, it is not possible to set "remote" properties such as
socket buffer size and the like via the netperf command line. Nor
is it possible to retrieve such interesting remote information as
CPU utilization. These items will be displayed as values which
should make it immediately obvious that was the case.
The only way to change remote characteristics such as socket buffer
size or to obtain information such as CPU utilization is to employ
platform-specific methods on the remote system. Frankly, if one
has access to the remote system to employ those methods one aught
to be able to run a netserver there. However, that ability may
not be present in certain "support" situations, hence the addition
of this option.
Added in netperf 2.4.3.
`-o '
The value(s) passed-in with this option will be used as an offset
added to the alignment specified with the `-a' option. For
example:
-o 3 -a 4096
will cause the buffers passed to the local (netperf) send and
receive calls to begin three bytes past an address aligned to 4096
bytes. [Default: 0 bytes]
`-O '
This option behaves just as the `-o' option but on the remote
(netserver) system and in conjunction with the `-A' option.
[Default: 0 bytes]
`-p '
The first value of the optionspec passed-in with this option tells
netperf the port number at which it should expect the remote
netserver to be listening for control connections. The second
value of the optionspec will request netperf to bind to that local
port number before establishing the control connection. For
example
-p 12345
tells netperf that the remote netserver is listening on port 12345
and leaves selection of the local port number for the control
connection up to the local TCP/IP stack whereas
-p ,32109
leaves the remote netserver port at the default value of 12865 and
causes netperf to bind to the local port number 32109 before
connecting to the remote netserver.
In general, setting the local port number is only necessary when
one is looking to run netperf through those evil, end-to-end
breaking things known as firewalls.
`-P 0|1'
A value of "1" for the `-P' option will enable display of the test
banner. A value of "0" will disable display of the test banner.
One might want to disable display of the test banner when running
the same basic test type (eg TCP_STREAM) multiple times in
succession where the test banners would then simply be redundant
and unnecessarily clutter the output. [Default: 1 - display test
banners]
`-s '
This option will cause netperf to sleep `' before
actually transferring data over the data connection. This may be
useful in situations where one wishes to start a great many netperf
instances and do not want the earlier ones affecting the ability of
the later ones to get established.
Added somewhere between versions 2.4.3 and 2.5.0.
`-S'
This option will cause an attempt to be made to set SO_KEEPALIVE on
the data socket of a test using the BSD sockets interface. The
attempt will be made on the netperf side of all tests, and will be
made on the netserver side of an *note omni: The Omni Tests. or
*note migrated: Migrated Tests. test. No indication of failure is
given unless debug output is enabled with the global `-d' option.
Added in version 2.5.0.
`-t testname'
This option is used to tell netperf which test you wish to run.
As of this writing, valid values for TESTNAME include:
* *note TCP_STREAM::, *note TCP_MAERTS::, *note TCP_SENDFILE::,
*note TCP_RR::, *note TCP_CRR::, *note TCP_CC::
* *note UDP_STREAM::, *note UDP_RR::
* *note XTI_TCP_STREAM::, *note XTI_TCP_RR::, *note
XTI_TCP_CRR::, *note XTI_TCP_CC::
* *note XTI_UDP_STREAM::, *note XTI_UDP_RR::
* *note SCTP_STREAM::, *note SCTP_RR::
* *note DLCO_STREAM::, *note DLCO_RR::, *note DLCL_STREAM::,
*note DLCL_RR::
* *note LOC_CPU: Other Netperf Tests, *note REM_CPU: Other
Netperf Tests.
* *note OMNI: The Omni Tests.
Not all tests are always compiled into netperf. In particular, the
"XTI," "SCTP," "UNIXDOMAIN," and "DL*" tests are only included in
netperf when configured with
`--enable-[xti|sctp|unixdomain|dlpi]=yes'.
Netperf only runs one type of test no matter how many `-t' options
may be present on the command-line. The last `-t' global
command-line option will determine the test to be run. [Default:
TCP_STREAM]
`-T '
This option controls the CPU, and probably by extension memory,
affinity of netperf and/or netserver.
netperf -T 1
will bind both netperf and netserver to "CPU 1" on their respective
systems.
netperf -T 1,
will bind just netperf to "CPU 1" and will leave netserver unbound.
netperf -T ,2
will leave netperf unbound and will bind netserver to "CPU 2."
netperf -T 1,2
will bind netperf to "CPU 1" and netserver to "CPU 2."
This can be particularly useful when investigating performance
issues involving where processes run relative to where NIC
interrupts are processed or where NICs allocate their DMA buffers.
`-v verbosity'
This option controls how verbose netperf will be in its output,
and is often used in conjunction with the `-P' option. If the
verbosity is set to a value of "0" then only the test's SFM (Single
Figure of Merit) is displayed. If local *note CPU utilization:
CPU Utilization. is requested via the `-c' option then the SFM is
the local service demand. Othersise, if remote CPU utilization is
requested via the `-C' option then the SFM is the remote service
demand. If neither local nor remote CPU utilization are requested
the SFM will be the measured throughput or transaction rate as
implied by the test specified with the `-t' option.
If the verbosity level is set to "1" then the "normal" netperf
result output for each test is displayed.
If the verbosity level is set to "2" then "extra" information will
be displayed. This may include, but is not limited to the number
of send or recv calls made and the average number of bytes per
send or recv call, or a histogram of the time spent in each send()
call or for each transaction if netperf was configured with
`--enable-histogram=yes'. [Default: 1 - normal verbosity]
In an *note omni: The Omni Tests. test the verbosity setting is
largely ignored, save for when asking for the time histogram to be
displayed. In version 2.5.0 there is no *note output selector:
Omni Output Selectors. for the histogram and so it remains
displayed only when the verbosity level is set to 2.
`-V'
This option displays the netperf version and then exits.
Added in netperf 2.4.4.
`-w time'
If netperf was configured with `--enable-intervals=yes' then this
value will set the inter-burst time to time milliseconds, and the
`-b' option will set the number of sends per burst. The actual
inter-burst time may vary depending on the system's timer
resolution.
`-W '
This option controls the number of buffers in the send (first or
only value) and or receive (second or only value) buffer rings.
Unlike some benchmarks, netperf does not continuously send or
receive from a single buffer. Instead it rotates through a ring of
buffers. [Default: One more than the size of the send or receive
socket buffer sizes (`-s' and/or `-S' options) divided by the send
`-m' or receive `-M' buffer size respectively]
`-4'
Specifying this option will set both the local and remote address
families to AF_INET - that is use only IPv4 addresses on the
control connection. This can be overridden by a subsequent `-6',
`-H' or `-L' option. Basically, the last option explicitly
specifying an address family wins. Unless overridden by a
test-specific option, this will be inherited for the data
connection as well.
`-6'
Specifying this option will set both local and and remote address
families to AF_INET6 - that is use only IPv6 addresses on the
control connection. This can be overridden by a subsequent `-4',
`-H' or `-L' option. Basically, the last address family
explicitly specified wins. Unless overridden by a test-specific
option, this will be inherited for the data connection as well.
File: netperf.info, Node: Using Netperf to Measure Bulk Data Transfer, Next: Using Netperf to Measure Request/Response, Prev: Global Command-line Options, Up: Top
5 Using Netperf to Measure Bulk Data Transfer
*********************************************
The most commonly measured aspect of networked system performance is
that of bulk or unidirectional transfer performance. Everyone wants to
know how many bits or bytes per second they can push across the
network. The classic netperf convention for a bulk data transfer test
name is to tack a "_STREAM" suffix to a test name.
* Menu:
* Issues in Bulk Transfer::
* Options common to TCP UDP and SCTP tests::
File: netperf.info, Node: Issues in Bulk Transfer, Next: Options common to TCP UDP and SCTP tests, Prev: Using Netperf to Measure Bulk Data Transfer, Up: Using Netperf to Measure Bulk Data Transfer
5.1 Issues in Bulk Transfer
===========================
There are any number of things which can affect the performance of a
bulk transfer test.
Certainly, absent compression, bulk-transfer tests can be limited by
the speed of the slowest link in the path from the source to the
destination. If testing over a gigabit link, you will not see more
than a gigabit :) Such situations can be described as being
"network-limited" or "NIC-limited".
CPU utilization can also affect the results of a bulk-transfer test.
If the networking stack requires a certain number of instructions or
CPU cycles per KB of data transferred, and the CPU is limited in the
number of instructions or cycles it can provide, then the transfer can
be described as being "CPU-bound".
A bulk-transfer test can be CPU bound even when netperf reports less
than 100% CPU utilization. This can happen on an MP system where one
or more of the CPUs saturate at 100% but other CPU's remain idle.
Typically, a single flow of data, such as that from a single instance
of a netperf _STREAM test cannot make use of much more than the power
of one CPU. Exceptions to this generally occur when netperf and/or
netserver run on CPU(s) other than the CPU(s) taking interrupts from
the NIC(s). In that case, one might see as much as two CPUs' worth of
processing being used to service the flow of data.
Distance and the speed-of-light can affect performance for a
bulk-transfer; often this can be mitigated by using larger windows.
One common limit to the performance of a transport using window-based
flow-control is:
Throughput <= WindowSize/RoundTripTime
As the sender can only have a window's-worth of data outstanding on
the network at any one time, and the soonest the sender can receive a
window update from the receiver is one RoundTripTime (RTT). TCP and
SCTP are examples of such protocols.
Packet losses and their effects can be particularly bad for
performance. This is especially true if the packet losses result in
retransmission timeouts for the protocol(s) involved. By the time a
retransmission timeout has happened, the flow or connection has sat
idle for a considerable length of time.
On many platforms, some variant on the `netstat' command can be used
to retrieve statistics about packet loss and retransmission. For
example:
netstat -p tcp
will retrieve TCP statistics on the HP-UX Operating System. On other
platforms, it may not be possible to retrieve statistics for a specific
protocol and something like:
netstat -s
would be used instead.
Many times, such network statistics are keep since the time the stack
started, and we are only really interested in statistics from when
netperf was running. In such situations something along the lines of:
netstat -p tcp > before
netperf -t TCP_mumble...
netstat -p tcp > after
is indicated. The beforeafter
(ftp://ftp.cup.hp.com/dist/networking/tools/) utility can be used to
subtract the statistics in `before' from the statistics in `after':
beforeafter before after > delta
and then one can look at the statistics in `delta'. Beforeafter is
distributed in source form so one can compile it on the platform(s) of
interest.
If running a version 2.5.0 or later "omni" test under Linux one can
include either or both of:
* LOCAL_TRANSPORT_RETRANS
* REMOTE_TRANSPORT_RETRANS
in the values provided via a test-specific `-o', `-O', or `-k'
output selction option and netperf will report the retransmissions
experienced on the data connection, as reported via a
`getsockopt(TCP_INFO)' call. If confidence intervals have been
requested via the global `-I' or `-i' options, the reported value(s)
will be for the last iteration. If the test is over a protocol other
than TCP, or on a platform other than Linux, the results are undefined.
While it was written with HP-UX's netstat in mind, the annotated
netstat
(ftp://ftp.cup.hp.com/dist/networking/briefs/annotated_netstat.txt)
writeup may be helpful with other platforms as well.
File: netperf.info, Node: Options common to TCP UDP and SCTP tests, Prev: Issues in Bulk Transfer, Up: Using Netperf to Measure Bulk Data Transfer
5.2 Options common to TCP UDP and SCTP tests
============================================
Many "test-specific" options are actually common across the different
tests. For those tests involving TCP, UDP and SCTP, whether using the
BSD Sockets or the XTI interface those common options include:
`-h'
Display the test-suite-specific usage string and exit. For a TCP_
or UDP_ test this will be the usage string from the source file
nettest_bsd.c. For an XTI_ test, this will be the usage string
from the source file nettest_xti.c. For an SCTP test, this will
be the usage string from the source file nettest_sctp.c.
`-H '
Normally, the remote hostname|IP and address family information is
inherited from the settings for the control connection (eg global
command-line `-H', `-4' and/or `-6' options). The test-specific
`-H' will override those settings for the data (aka test)
connection only. Settings for the control connection are left
unchanged.
`-L '
The test-specific `-L' option is identical to the test-specific
`-H' option except it affects the local hostname|IP and address
family information. As with its global command-line counterpart,
this is generally only useful when measuring though those evil,
end-to-end breaking things called firewalls.
`-m bytes'
Set the size of the buffer passed-in to the "send" calls of a
_STREAM test. Note that this may have only an indirect effect on
the size of the packets sent over the network, and certain Layer 4
protocols do _not_ preserve or enforce message boundaries, so
setting `-m' for the send size does not necessarily mean the
receiver will receive that many bytes at any one time. By default
the units are bytes, but suffix of "G," "M," or "K" will specify
the units to be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A
suffix of "g," "m" or "k" will specify units of 10^9, 10^6 or 10^3
bytes respectively. For example:
`-m 32K'
will set the size to 32KB or 32768 bytes. [Default: the local send
socket buffer size for the connection - either the system's
default or the value set via the `-s' option.]
`-M bytes'
Set the size of the buffer passed-in to the "recv" calls of a
_STREAM test. This will be an upper bound on the number of bytes
received per receive call. By default the units are bytes, but
suffix of "G," "M," or "K" will specify the units to be 2^30 (GB),
2^20 (MB) or 2^10 (KB) respectively. A suffix of "g," "m" or "k"
will specify units of 10^9, 10^6 or 10^3 bytes respectively. For
example:
`-M 32K'
will set the size to 32KB or 32768 bytes. [Default: the remote
receive socket buffer size for the data connection - either the
system's default or the value set via the `-S' option.]
`-P '
Set the local and/or remote port numbers for the data connection.
`-s '
This option sets the local (netperf) send and receive socket buffer
sizes for the data connection to the value(s) specified. Often,
this will affect the advertised and/or effective TCP or other
window, but on some platforms it may not. By default the units are
bytes, but suffix of "G," "M," or "K" will specify the units to be
2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of "g,"
"m" or "k" will specify units of 10^9, 10^6 or 10^3 bytes
respectively. For example:
`-s 128K'
Will request the local send and receive socket buffer sizes to be
128KB or 131072 bytes.
While the historic expectation is that setting the socket buffer
size has a direct effect on say the TCP window, today that may not
hold true for all stacks. Further, while the historic expectation
is that the value specified in a `setsockopt()' call will be the
value returned via a `getsockopt()' call, at least one stack is
known to deliberately ignore history. When running under Windows
a value of 0 may be used which will be an indication to the stack
the user wants to enable a form of copy avoidance. [Default: -1 -
use the system's default socket buffer sizes]
`-S '
This option sets the remote (netserver) send and/or receive socket
buffer sizes for the data connection to the value(s) specified.
Often, this will affect the advertised and/or effective TCP or
other window, but on some platforms it may not. By default the
units are bytes, but suffix of "G," "M," or "K" will specify the
units to be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A
suffix of "g," "m" or "k" will specify units of 10^9, 10^6 or 10^3
bytes respectively. For example:
`-s 128K'
Will request the remote send and receive socket buffer sizes to be
128KB or 131072 bytes.
While the historic expectation is that setting the socket buffer
size has a direct effect on say the TCP window, today that may not
hold true for all stacks. Further, while the historic expectation
is that the value specified in a `setsockopt()' call will be the
value returned via a `getsockopt()' call, at least one stack is
known to deliberately ignore history. When running under Windows
a value of 0 may be used which will be an indication to the stack
the user wants to enable a form of copy avoidance. [Default: -1 -
use the system's default socket buffer sizes]
`-4'
Set the local and remote address family for the data connection to
AF_INET - ie use IPv4 addressing only. Just as with their global
command-line counterparts the last of the `-4', `-6', `-H' or `-L'
option wins for their respective address families.
`-6'
This option is identical to its `-4' cousin, but requests IPv6
addresses for the local and remote ends of the data connection.
* Menu:
* TCP_STREAM::
* TCP_MAERTS::
* TCP_SENDFILE::
* UDP_STREAM::
* XTI_TCP_STREAM::
* XTI_UDP_STREAM::
* SCTP_STREAM::
* DLCO_STREAM::
* DLCL_STREAM::
* STREAM_STREAM::
* DG_STREAM::
File: netperf.info, Node: TCP_STREAM, Next: TCP_MAERTS, Prev: Options common to TCP UDP and SCTP tests, Up: Options common to TCP UDP and SCTP tests
5.2.1 TCP_STREAM
----------------
The TCP_STREAM test is the default test in netperf. It is quite
simple, transferring some quantity of data from the system running
netperf to the system running netserver. While time spent establishing
the connection is not included in the throughput calculation, time
spent flushing the last of the data to the remote at the end of the
test is. This is how netperf knows that all the data it sent was
received by the remote. In addition to the *note options common to
STREAM tests: Options common to TCP UDP and SCTP tests, the following
test-specific options can be included to possibly alter the behavior of
the test:
`-C'
This option will set TCP_CORK mode on the data connection on those
systems where TCP_CORK is defined (typically Linux). A full
description of TCP_CORK is beyond the scope of this manual, but in
a nutshell it forces sub-MSS sends to be buffered so every segment
sent is Maximum Segment Size (MSS) unless the application performs
an explicit flush operation or the connection is closed. At
present netperf does not perform any explicit flush operations.
Setting TCP_CORK may improve the bitrate of tests where the "send
size" (`-m' option) is smaller than the MSS. It should also
improve (make smaller) the service demand.
The Linux tcp(7) manpage states that TCP_CORK cannot be used in
conjunction with TCP_NODELAY (set via the `-d' option), however
netperf does not validate command-line options to enforce that.
`-D'
This option will set TCP_NODELAY on the data connection on those
systems where TCP_NODELAY is defined. This disables something
known as the Nagle Algorithm, which is intended to make the
segments TCP sends as large as reasonably possible. Setting
TCP_NODELAY for a TCP_STREAM test should either have no effect
when the send size (`-m' option) is larger than the MSS or will
decrease reported bitrate and increase service demand when the
send size is smaller than the MSS. This stems from TCP_NODELAY
causing each sub-MSS send to be its own TCP segment rather than
being aggregated with other small sends. This means more trips up
and down the protocol stack per KB of data transferred, which
means greater CPU utilization.
If setting TCP_NODELAY with `-D' affects throughput and/or service
demand for tests where the send size (`-m') is larger than the MSS
it suggests the TCP/IP stack's implementation of the Nagle
Algorithm _may_ be broken, perhaps interpreting the Nagle
Algorithm on a segment by segment basis rather than the proper user
send by user send basis. However, a better test of this can be
achieved with the *note TCP_RR:: test.
Here is an example of a basic TCP_STREAM test, in this case from a
Debian Linux (2.6 kernel) system to an HP-UX 11iv2 (HP-UX 11.23) system:
$ netperf -H lag
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
32768 16384 16384 10.00 80.42
We see that the default receive socket buffer size for the receiver
(lag - HP-UX 11.23) is 32768 bytes, and the default socket send buffer
size for the sender (Debian 2.6 kernel) is 16384 bytes, however Linux
does "auto tuning" of socket buffer and TCP window sizes, which means
the send socket buffer size may be different at the end of the test
than it was at the beginning. This is addressed in the *note omni
tests: The Omni Tests. added in version 2.5.0 and *note output
selection: Omni Output Selection. Througput is expressed as 10^6 (aka
Mega) bits per second, and the test ran for 10 seconds. IPv4 addresses
(AF_INET) were used.
File: netperf.info, Node: TCP_MAERTS, Next: TCP_SENDFILE, Prev: TCP_STREAM, Up: Options common to TCP UDP and SCTP tests
5.2.2 TCP_MAERTS
----------------
A TCP_MAERTS (MAERTS is STREAM backwards) test is "just like" a *note
TCP_STREAM:: test except the data flows from the netserver to the
netperf. The global command-line `-F' option is ignored for this test
type. The test-specific command-line `-C' option is ignored for this
test type.
Here is an example of a TCP_MAERTS test between the same two systems
as in the example for the *note TCP_STREAM:: test. This time we request
larger socket buffers with `-s' and `-S' options:
$ netperf -H lag -t TCP_MAERTS -- -s 128K -S 128K
TCP MAERTS TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
221184 131072 131072 10.03 81.14
Where we see that Linux, unlike HP-UX, may not return the same value
in a `getsockopt()' as was requested in the prior `setsockopt()'.
This test is included more for benchmarking convenience than anything
else.
File: netperf.info, Node: TCP_SENDFILE, Next: UDP_STREAM, Prev: TCP_MAERTS, Up: Options common to TCP UDP and SCTP tests
5.2.3 TCP_SENDFILE
------------------
The TCP_SENDFILE test is "just like" a *note TCP_STREAM:: test except
netperf the platform's `sendfile()' call instead of calling `send()'.
Often this results in a "zero-copy" operation where data is sent
directly from the filesystem buffer cache. This _should_ result in
lower CPU utilization and possibly higher throughput. If it does not,
then you may want to contact your vendor(s) because they have a problem
on their hands.
Zero-copy mechanisms may also alter the characteristics (size and
number of buffers per) of packets passed to the NIC. In many stacks,
when a copy is performed, the stack can "reserve" space at the
beginning of the destination buffer for things like TCP, IP and Link
headers. This then has the packet contained in a single buffer which
can be easier to DMA to the NIC. When no copy is performed, there is
no opportunity to reserve space for headers and so a packet will be
contained in two or more buffers.
As of some time before version 2.5.0, the *note global `-F' option:
Global Options. is no longer required for this test. If it is not
specified, netperf will create a temporary file, which it will delete
at the end of the test. If the `-F' option is specified it must
reference a file of at least the size of the send ring (*Note the
global `-W' option: Global Options.) multiplied by the send size (*Note
the test-specific `-m' option: Options common to TCP UDP and SCTP
tests.). All other TCP-specific options remain available and optional.
In this first example:
$ netperf -H lag -F ../src/netperf -t TCP_SENDFILE -- -s 128K -S 128K
TCP SENDFILE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET
alloc_sendfile_buf_ring: specified file too small.
file must be larger than send_width * send_size
we see what happens when the file is too small. Here:
$ netperf -H lag -F /boot/vmlinuz-2.6.8-1-686 -t TCP_SENDFILE -- -s 128K -S 128K
TCP SENDFILE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
131072 221184 221184 10.02 81.83
we resolve that issue by selecting a larger file.
File: netperf.info, Node: UDP_STREAM, Next: XTI_TCP_STREAM, Prev: TCP_SENDFILE, Up: Options common to TCP UDP and SCTP tests
5.2.4 UDP_STREAM
----------------
A UDP_STREAM test is similar to a *note TCP_STREAM:: test except UDP is
used as the transport rather than TCP.
A UDP_STREAM test has no end-to-end flow control - UDP provides none
and neither does netperf. However, if you wish, you can configure
netperf with `--enable-intervals=yes' to enable the global command-line
`-b' and `-w' options to pace bursts of traffic onto the network.
This has a number of implications.
The biggest of these implications is the data which is sent might not
be received by the remote. For this reason, the output of a UDP_STREAM
test shows both the sending and receiving throughput. On some
platforms, it may be possible for the sending throughput to be reported
as a value greater than the maximum rate of the link. This is common
when the CPU(s) are faster than the network and there is no
"intra-stack" flow-control.
Here is an example of a UDP_STREAM test between two systems connected
by a 10 Gigabit Ethernet link:
$ netperf -t UDP_STREAM -H 192.168.2.125 -- -m 32768
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.2.125 (192.168.2.125) port 0 AF_INET
Socket Message Elapsed Messages
Size Size Time Okay Errors Throughput
bytes bytes secs # # 10^6bits/sec
124928 32768 10.00 105672 0 2770.20
135168 10.00 104844 2748.50
The first line of numbers are statistics from the sending (netperf)
side. The second line of numbers are from the receiving (netserver)
side. In this case, 105672 - 104844 or 828 messages did not make it
all the way to the remote netserver process.
If the value of the `-m' option is larger than the local send socket
buffer size (`-s' option) netperf will likely abort with an error
message about how the send call failed:
netperf -t UDP_STREAM -H 192.168.2.125
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.2.125 (192.168.2.125) port 0 AF_INET
udp_send: data send error: Message too long
If the value of the `-m' option is larger than the remote socket
receive buffer, the reported receive throughput will likely be zero as
the remote UDP will discard the messages as being too large to fit into
the socket buffer.
$ netperf -t UDP_STREAM -H 192.168.2.125 -- -m 65000 -S 32768
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.2.125 (192.168.2.125) port 0 AF_INET
Socket Message Elapsed Messages
Size Size Time Okay Errors Throughput
bytes bytes secs # # 10^6bits/sec
124928 65000 10.00 53595 0 2786.99
65536 10.00 0 0.00
The example above was between a pair of systems running a "Linux"
kernel. Notice that the remote Linux system returned a value larger
than that passed-in to the `-S' option. In fact, this value was larger
than the message size set with the `-m' option. That the remote socket
buffer size is reported as 65536 bytes would suggest to any sane person
that a message of 65000 bytes would fit, but the socket isn't _really_
65536 bytes, even though Linux is telling us so. Go figure.
File: netperf.info, Node: XTI_TCP_STREAM, Next: XTI_UDP_STREAM, Prev: UDP_STREAM, Up: Options common to TCP UDP and SCTP tests
5.2.5 XTI_TCP_STREAM
--------------------
An XTI_TCP_STREAM test is simply a *note TCP_STREAM:: test using the XTI
rather than BSD Sockets interface. The test-specific `-X '
option can be used to specify the name of the local and/or remote XTI
device files, which is required by the `t_open()' call made by netperf
XTI tests.
The XTI_TCP_STREAM test is only present if netperf was configured
with `--enable-xti=yes'. The remote netserver must have also been
configured with `--enable-xti=yes'.
File: netperf.info, Node: XTI_UDP_STREAM, Next: SCTP_STREAM, Prev: XTI_TCP_STREAM, Up: Options common to TCP UDP and SCTP tests
5.2.6 XTI_UDP_STREAM
--------------------
An XTI_UDP_STREAM test is simply a *note UDP_STREAM:: test using the XTI
rather than BSD Sockets Interface. The test-specific `-X '
option can be used to specify the name of the local and/or remote XTI
device files, which is required by the `t_open()' call made by netperf
XTI tests.
The XTI_UDP_STREAM test is only present if netperf was configured
with `--enable-xti=yes'. The remote netserver must have also been
configured with `--enable-xti=yes'.
File: netperf.info, Node: SCTP_STREAM, Next: DLCO_STREAM, Prev: XTI_UDP_STREAM, Up: Options common to TCP UDP and SCTP tests
5.2.7 SCTP_STREAM
-----------------
An SCTP_STREAM test is essentially a *note TCP_STREAM:: test using the
SCTP rather than TCP. The `-D' option will set SCTP_NODELAY, which is
much like the TCP_NODELAY option for TCP. The `-C' option is not
applicable to an SCTP test as there is no corresponding SCTP_CORK
option. The author is still figuring-out what the test-specific `-N'
option does :)
The SCTP_STREAM test is only present if netperf was configured with
`--enable-sctp=yes'. The remote netserver must have also been
configured with `--enable-sctp=yes'.
File: netperf.info, Node: DLCO_STREAM, Next: DLCL_STREAM, Prev: SCTP_STREAM, Up: Options common to TCP UDP and SCTP tests
5.2.8 DLCO_STREAM
-----------------
A DLPI Connection Oriented Stream (DLCO_STREAM) test is very similar in
concept to a *note TCP_STREAM:: test. Both use reliable,
connection-oriented protocols. The DLPI test differs from the TCP test
in that its protocol operates only at the link-level and does not
include TCP-style segmentation and reassembly. This last difference
means that the value passed-in with the `-m' option must be less than
the interface MTU. Otherwise, the `-m' and `-M' options are just like
their TCP/UDP/SCTP counterparts.
Other DLPI-specific options include:
`-D '
This option is used to provide the fully-qualified names for the
local and/or remote DPLI device files. The syntax is otherwise
identical to that of a "sizespec".
`-p '
This option is used to specify the local and/or remote DLPI PPA(s).
The PPA is used to identify the interface over which traffic is to
be sent/received. The syntax of a "ppaspec" is otherwise the same
as a "sizespec".
`-s sap'
This option specifies the 802.2 SAP for the test. A SAP is
somewhat like either the port field of a TCP or UDP header or the
protocol field of an IP header. The specified SAP should not
conflict with any other active SAPs on the specified PPA's (`-p'
option).
`-w '
This option specifies the local send and receive window sizes in
units of frames on those platforms which support setting such
things.
`-W '
This option specifies the remote send and receive window sizes in
units of frames on those platforms which support setting such
things.
The DLCO_STREAM test is only present if netperf was configured with
`--enable-dlpi=yes'. The remote netserver must have also been
configured with `--enable-dlpi=yes'.
File: netperf.info, Node: DLCL_STREAM, Next: STREAM_STREAM, Prev: DLCO_STREAM, Up: Options common to TCP UDP and SCTP tests
5.2.9 DLCL_STREAM
-----------------
A DLPI ConnectionLess Stream (DLCL_STREAM) test is analogous to a *note
UDP_STREAM:: test in that both make use of unreliable/best-effort,
connection-less transports. The DLCL_STREAM test differs from the
*note UDP_STREAM:: test in that the message size (`-m' option) must
always be less than the link MTU as there is no IP-like fragmentation
and reassembly available and netperf does not presume to provide one.
The test-specific command-line options for a DLCL_STREAM test are the
same as those for a *note DLCO_STREAM:: test.
The DLCL_STREAM test is only present if netperf was configured with
`--enable-dlpi=yes'. The remote netserver must have also been
configured with `--enable-dlpi=yes'.
File: netperf.info, Node: STREAM_STREAM, Next: DG_STREAM, Prev: DLCL_STREAM, Up: Options common to TCP UDP and SCTP tests
5.2.10 STREAM_STREAM
--------------------
A Unix Domain Stream Socket Stream test (STREAM_STREAM) is similar in
concept to a *note TCP_STREAM:: test, but using Unix Domain sockets.
It is, naturally, limited to intra-machine traffic. A STREAM_STREAM
test shares the `-m', `-M', `-s' and `-S' options of the other _STREAM
tests. In a STREAM_STREAM test the `-p' option sets the directory in
which the pipes will be created rather than setting a port number. The
default is to create the pipes in the system default for the
`tempnam()' call.
The STREAM_STREAM test is only present if netperf was configured with
`--enable-unixdomain=yes'. The remote netserver must have also been
configured with `--enable-unixdomain=yes'.
File: netperf.info, Node: DG_STREAM, Prev: STREAM_STREAM, Up: Options common to TCP UDP and SCTP tests
5.2.11 DG_STREAM
----------------
A Unix Domain Datagram Socket Stream test (SG_STREAM) is very much like
a *note TCP_STREAM:: test except that message boundaries are preserved.
In this way, it may also be considered similar to certain flavors of
SCTP test which can also preserve message boundaries.
All the options of a *note STREAM_STREAM:: test are applicable to a
DG_STREAM test.
The DG_STREAM test is only present if netperf was configured with
`--enable-unixdomain=yes'. The remote netserver must have also been
configured with `--enable-unixdomain=yes'.
File: netperf.info, Node: Using Netperf to Measure Request/Response, Next: Using Netperf to Measure Aggregate Performance, Prev: Using Netperf to Measure Bulk Data Transfer, Up: Top
6 Using Netperf to Measure Request/Response
*******************************************
Request/response performance is often overlooked, yet it is just as
important as bulk-transfer performance. While things like larger
socket buffers and TCP windows, and stateless offloads like TSO and LRO
can cover a multitude of latency and even path-length sins, those sins
cannot easily hide from a request/response test. The convention for a
request/response test is to have a _RR suffix. There are however a few
"request/response" tests that have other suffixes.
A request/response test, particularly synchronous, one transaction at
at time test such as those found by default in netperf, is particularly
sensitive to the path-length of the networking stack. An _RR test can
also uncover those platforms where the NIC's are strapped by default
with overbearing interrupt avoidance settings in an attempt to increase
the bulk-transfer performance (or rather, decrease the CPU utilization
of a bulk-transfer test). This sensitivity is most acute for small
request and response sizes, such as the single-byte default for a
netperf _RR test.
While a bulk-transfer test reports its results in units of bits or
bytes transfered per second, by default a mumble_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. If one is confident
about the symmetry of the connection, the average one-way latency can
be taken as one-half the average round-trip latency. As of version
2.5.0 (actually slightly before) netperf still does not do the latter,
but will do the former if one sets the verbosity to 2 for a classic
netperf test, or includes the apropriate *note output selector: Omni
Output Selectors. in an *note omni test: The Omni Tests. It will also
allow the user to switch the throughput units from transactions per
secont to bits or bytes per second with the global `-f' option.
* Menu:
* Issues in Request/Response::
* Options Common to TCP UDP and SCTP _RR tests::
File: netperf.info, Node: Issues in Request/Response, Next: Options Common to TCP UDP and SCTP _RR tests, Prev: Using Netperf to Measure Request/Response, Up: Using Netperf to Measure Request/Response
6.1 Issues in Request/Response
==============================
Most if not all the *note Issues in Bulk Transfer:: apply to
request/response. The issue of round-trip latency is even more
important as netperf generally only has one transaction outstanding at
a time.
A single instance of a one transaction outstanding _RR test should
_never_ completely saturate the CPU of a system. If testing between
otherwise evenly matched systems, the symmetric nature of a _RR test
with equal request and response sizes should result in equal CPU
loading on both systems. However, this may not hold true on MP systems,
particularly if one CPU binds the netperf and netserver differently via
the global `-T' option.
For smaller request and response sizes packet loss is a bigger issue
as there is no opportunity for a "fast retransmit" or retransmission
prior to a retransmission timer expiring.
Virtualization may considerably increase the effective path length of
a networking stack. While this may not preclude achieving link-rate on
a comparatively slow link (eg 1 Gigabit Ethernet) on a _STREAM test, it
can show-up as measurably fewer transactions per second on an _RR test.
However, this may still be masked by interrupt coalescing in the
NIC/driver.
Certain NICs have ways to minimize the number of interrupts sent to
the host. If these are strapped badly they can significantly reduce
the performance of something like a single-byte request/response test.
Such setups are distinguised by seriously low reported CPU utilization
and what seems like a low (even if in the thousands) transaction per
second rate. Also, if you run such an OS/driver combination on faster
or slower hardware and do not see a corresponding change in the
transaction rate, chances are good that the drvier is strapping the NIC
with aggressive interrupt avoidance settings. Good for bulk
throughput, but bad for latency.
Some drivers may try to automagically adjust the interrupt avoidance
settings. If they are not terribly good at it, you will see
considerable run-to-run variation in reported transaction rates.
Particularly if you "mix-up" _STREAM and _RR tests.
File: netperf.info, Node: Options Common to TCP UDP and SCTP _RR tests, Prev: Issues in Request/Response, Up: Using Netperf to Measure Request/Response
6.2 Options Common to TCP UDP and SCTP _RR tests
================================================
Many "test-specific" options are actually common across the different
tests. For those tests involving TCP, UDP and SCTP, whether using the
BSD Sockets or the XTI interface those common options include:
`-h'
Display the test-suite-specific usage string and exit. For a TCP_
or UDP_ test this will be the usage string from the source file
`nettest_bsd.c'. For an XTI_ test, this will be the usage string
from the source file `src/nettest_xti.c'. For an SCTP test, this
will be the usage string from the source file `src/nettest_sctp.c'.
`-H '
Normally, the remote hostname|IP and address family information is
inherited from the settings for the control connection (eg global
command-line `-H', `-4' and/or `-6' options. The test-specific
`-H' will override those settings for the data (aka test)
connection only. Settings for the control connection are left
unchanged. This might be used to cause the control and data
connections to take different paths through the network.
`-L '
The test-specific `-L' option is identical to the test-specific
`-H' option except it affects the local hostname|IP and address
family information. As with its global command-line counterpart,
this is generally only useful when measuring though those evil,
end-to-end breaking things called firewalls.
`-P '
Set the local and/or remote port numbers for the data connection.
`-r '
This option sets the request (first value) and/or response (second
value) sizes for an _RR test. By default the units are bytes, but a
suffix of "G," "M," or "K" will specify the units to be 2^30 (GB),
2^20 (MB) or 2^10 (KB) respectively. A suffix of "g," "m" or "k"
will specify units of 10^9, 10^6 or 10^3 bytes respectively. For
example:
`-r 128,16K'
Will set the request size to 128 bytes and the response size to 16
KB or 16384 bytes. [Default: 1 - a single-byte request and
response ]
`-s '
This option sets the local (netperf) send and receive socket buffer
sizes for the data connection to the value(s) specified. Often,
this will affect the advertised and/or effective TCP or other
window, but on some platforms it may not. By default the units are
bytes, but a suffix of "G," "M," or "K" will specify the units to
be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of
"g," "m" or "k" will specify units of 10^9, 10^6 or 10^3 bytes
respectively. For example:
`-s 128K'
Will request the local send (netperf) and receive socket buffer
sizes to be 128KB or 131072 bytes.
While the historic expectation is that setting the socket buffer
size has a direct effect on say the TCP window, today that may not
hold true for all stacks. When running under Windows a value of 0
may be used which will be an indication to the stack the user
wants to enable a form of copy avoidance. [Default: -1 - use the
system's default socket buffer sizes]
`-S '
This option sets the remote (netserver) send and/or receive socket
buffer sizes for the data connection to the value(s) specified.
Often, this will affect the advertised and/or effective TCP or
other window, but on some platforms it may not. By default the
units are bytes, but a suffix of "G," "M," or "K" will specify the
units to be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A
suffix of "g," "m" or "k" will specify units of 10^9, 10^6 or 10^3
bytes respectively. For example:
`-s 128K'
Will request the remote (netserver) send and receive socket buffer
sizes to be 128KB or 131072 bytes.
While the historic expectation is that setting the socket buffer
size has a direct effect on say the TCP window, today that may not
hold true for all stacks. When running under Windows a value of 0
may be used which will be an indication to the stack the user
wants to enable a form of copy avoidance. [Default: -1 - use the
system's default socket buffer sizes]
`-4'
Set the local and remote address family for the data connection to
AF_INET - ie use IPv4 addressing only. Just as with their global
command-line counterparts the last of the `-4', `-6', `-H' or `-L'
option wins for their respective address families.
`-6'
This option is identical to its `-4' cousin, but requests IPv6
addresses for the local and remote ends of the data connection.
* Menu:
* TCP_RR::
* TCP_CC::
* TCP_CRR::
* UDP_RR::
* XTI_TCP_RR::
* XTI_TCP_CC::
* XTI_TCP_CRR::
* XTI_UDP_RR::
* DLCL_RR::
* DLCO_RR::
* SCTP_RR::
File: netperf.info, Node: TCP_RR, Next: TCP_CC, Prev: Options Common to TCP UDP and SCTP _RR tests, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.1 TCP_RR
------------
A TCP_RR (TCP Request/Response) test is requested by passing a value of
"TCP_RR" to the global `-t' command-line option. A TCP_RR test can be
thought-of as a user-space to user-space `ping' with no think time - it
is by default a synchronous, one transaction at a time,
request/response test.
The transaction rate is the number of complete transactions exchanged
divided by the length of time it took to perform those transactions.
If the two Systems Under Test are otherwise identical, a TCP_RR test
with the same request and response size should be symmetric - it should
not matter which way the test is run, and the CPU utilization measured
should be virtually the same on each system. If not, it suggests that
the CPU utilization mechanism being used may have some, well, issues
measuring CPU utilization completely and accurately.
Time to establish the TCP connection is not counted in the result.
If you want connection setup overheads included, you should consider the
*note TPC_CC: TCP_CC. or *note TCP_CRR: TCP_CRR. tests.
If specifying the `-D' option to set TCP_NODELAY and disable the
Nagle Algorithm increases the transaction rate reported by a TCP_RR
test, it implies the stack(s) over which the TCP_RR test is running
have a broken implementation of the Nagle Algorithm. Likely as not
they are interpreting Nagle on a segment by segment basis rather than a
user send by user send basis. You should contact your stack vendor(s)
to report the problem to them.
Here is an example of two systems running a basic TCP_RR test over a
10 Gigabit Ethernet link:
netperf -t TCP_RR -H 192.168.2.125
TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.2.125 (192.168.2.125) 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
16384 87380 1 1 10.00 29150.15
16384 87380
In this example the request and response sizes were one byte, the
socket buffers were left at their defaults, and the test ran for all of
10 seconds. The transaction per second rate was rather good for the
time :)
File: netperf.info, Node: TCP_CC, Next: TCP_CRR, Prev: TCP_RR, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.2 TCP_CC
------------
A TCP_CC (TCP Connect/Close) test is requested by passing a value of
"TCP_CC" to the global `-t' option. A TCP_CC test simply measures how
fast the pair of systems can open and close connections between one
another in a synchronous (one at a time) manner. While this is
considered an _RR test, no request or response is exchanged over the
connection.
The issue of TIME_WAIT reuse is an important one for a TCP_CC test.
Basically, TIME_WAIT reuse is when a pair of systems churn through
connections fast enough that they wrap the 16-bit port number space in
less time than the length of the TIME_WAIT state. While it is indeed
theoretically possible to "reuse" a connection in TIME_WAIT, the
conditions under which such reuse is possible are rather rare. An
attempt to reuse a connection in TIME_WAIT can result in a non-trivial
delay in connection establishment.
Basically, any time the connection churn rate approaches:
Sizeof(clientportspace) / Lengthof(TIME_WAIT)
there is the risk of TIME_WAIT reuse. To minimize the chances of
this happening, netperf will by default select its own client port
numbers from the range of 5000 to 65535. On systems with a 60 second
TIME_WAIT state, this should allow roughly 1000 transactions per
second. The size of the client port space used by netperf can be
controlled via the test-specific `-p' option, which takes a "sizespec"
as a value setting the minimum (first value) and maximum (second value)
port numbers used by netperf at the client end.
Since no requests or responses are exchanged during a TCP_CC test,
only the `-H', `-L', `-4' and `-6' of the "common" test-specific
options are likely to have an effect, if any, on the results. The `-s'
and `-S' options _may_ have some effect if they alter the number and/or
type of options carried in the TCP SYNchronize segments, such as Window
Scaling or Timestamps. The `-P' and `-r' options are utterly ignored.
Since connection establishment and tear-down for TCP is not
symmetric, a TCP_CC test is not symmetric in its loading of the two
systems under test.
File: netperf.info, Node: TCP_CRR, Next: UDP_RR, Prev: TCP_CC, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.3 TCP_CRR
-------------
The TCP Connect/Request/Response (TCP_CRR) test is requested by passing
a value of "TCP_CRR" to the global `-t' command-line option. A TCP_CRR
test is like a merger of a *note TCP_RR:: and *note TCP_CC:: test which
measures the performance of establishing a connection, exchanging a
single request/response transaction, and tearing-down that connection.
This is very much like what happens in an HTTP 1.0 or HTTP 1.1
connection when HTTP Keepalives are not used. In fact, the TCP_CRR
test was added to netperf to simulate just that.
Since a request and response are exchanged the `-r', `-s' and `-S'
options can have an effect on the performance.
The issue of TIME_WAIT reuse exists for the TCP_CRR test just as it
does for the TCP_CC test. Similarly, since connection establishment
and tear-down is not symmetric, a TCP_CRR test is not symmetric even
when the request and response sizes are the same.
File: netperf.info, Node: UDP_RR, Next: XTI_TCP_RR, Prev: TCP_CRR, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.4 UDP_RR
------------
A UDP Request/Response (UDP_RR) test is requested by passing a value of
"UDP_RR" to a global `-t' option. It is very much the same as a TCP_RR
test except UDP is used rather than TCP.
UDP does not provide for retransmission of lost UDP datagrams, and
netperf does not add anything for that either. This means that if
_any_ request or response is lost, the exchange of requests and
responses will stop from that point until the test timer expires.
Netperf will not really "know" this has happened - the only symptom
will be a low transaction per second rate. If `--enable-burst' was
included in the `configure' command and a test-specific `-b' option
used, the UDP_RR test will "survive" the loss of requests and responses
until the sum is one more than the value passed via the `-b' option. It
will though almost certainly run more slowly.
The netperf side of a UDP_RR test will call `connect()' on its data
socket and thenceforth use the `send()' and `recv()' socket calls. The
netserver side of a UDP_RR test will not call `connect()' and will use
`recvfrom()' and `sendto()' calls. This means that even if the request
and response sizes are the same, a UDP_RR test is _not_ symmetric in
its loading of the two systems under test.
Here is an example of a UDP_RR test between two otherwise identical
two-CPU systems joined via a 1 Gigabit Ethernet network:
$ netperf -T 1 -H 192.168.1.213 -t UDP_RR -c -C
UDP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.213 (192.168.1.213) port 0 AF_INET
Local /Remote
Socket Size Request Resp. Elapsed Trans. CPU CPU S.dem S.dem
Send Recv Size Size Time Rate local remote local remote
bytes bytes bytes bytes secs. per sec % I % I us/Tr us/Tr
65535 65535 1 1 10.01 15262.48 13.90 16.11 18.221 21.116
65535 65535
This example includes the `-c' and `-C' options to enable CPU
utilization reporting and shows the asymmetry in CPU loading. The `-T'
option was used to make sure netperf and netserver ran on a given CPU
and did not move around during the test.
File: netperf.info, Node: XTI_TCP_RR, Next: XTI_TCP_CC, Prev: UDP_RR, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.5 XTI_TCP_RR
----------------
An XTI_TCP_RR test is essentially the same as a *note TCP_RR:: test only
using the XTI rather than BSD Sockets interface. It is requested by
passing a value of "XTI_TCP_RR" to the `-t' global command-line option.
The test-specific options for an XTI_TCP_RR test are the same as
those for a TCP_RR test with the addition of the `-X ' option
to specify the names of the local and/or remote XTI device file(s).
File: netperf.info, Node: XTI_TCP_CC, Next: XTI_TCP_CRR, Prev: XTI_TCP_RR, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.6 XTI_TCP_CC
----------------
An XTI_TCP_CC test is essentially the same as a *note TCP_CC: TCP_CC.
test, only using the XTI rather than BSD Sockets interface.
The test-specific options for an XTI_TCP_CC test are the same as
those for a TCP_CC test with the addition of the `-X ' option
to specify the names of the local and/or remote XTI device file(s).
File: netperf.info, Node: XTI_TCP_CRR, Next: XTI_UDP_RR, Prev: XTI_TCP_CC, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.7 XTI_TCP_CRR
-----------------
The XTI_TCP_CRR test is essentially the same as a *note TCP_CRR:
TCP_CRR. test, only using the XTI rather than BSD Sockets interface.
The test-specific options for an XTI_TCP_CRR test are the same as
those for a TCP_RR test with the addition of the `-X ' option
to specify the names of the local and/or remote XTI device file(s).
File: netperf.info, Node: XTI_UDP_RR, Next: DLCL_RR, Prev: XTI_TCP_CRR, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.8 XTI_UDP_RR
----------------
An XTI_UDP_RR test is essentially the same as a UDP_RR test only using
the XTI rather than BSD Sockets interface. It is requested by passing
a value of "XTI_UDP_RR" to the `-t' global command-line option.
The test-specific options for an XTI_UDP_RR test are the same as
those for a UDP_RR test with the addition of the `-X ' option
to specify the name of the local and/or remote XTI device file(s).
File: netperf.info, Node: DLCL_RR, Next: DLCO_RR, Prev: XTI_UDP_RR, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.9 DLCL_RR
-------------
File: netperf.info, Node: DLCO_RR, Next: SCTP_RR, Prev: DLCL_RR, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.10 DLCO_RR
--------------
File: netperf.info, Node: SCTP_RR, Prev: DLCO_RR, Up: Options Common to TCP UDP and SCTP _RR tests
6.2.11 SCTP_RR
--------------
File: netperf.info, Node: Using Netperf to Measure Aggregate Performance, Next: Using Netperf to Measure Bidirectional Transfer, Prev: Using Netperf to Measure Request/Response, Up: Top
7 Using Netperf to Measure Aggregate Performance
************************************************
Ultimately, *note Netperf4: Netperf4. will be the preferred benchmark to
use when one wants to measure aggregate performance because netperf has
no support for explicit synchronization of concurrent tests. Until
netperf4 is ready for prime time, one can make use of the heuristics
and procedures mentioned here for the 85% solution.
Basically, there are two ways to measure aggregate performance with
netperf. The first is to run multiple, concurrent netperf tests and
can be applied to any of the netperf tests. The second is to configure
netperf with `--enable-burst' and is applicable to the TCP_RR test.
* Menu:
* Running Concurrent Netperf Tests::
* Using --enable-burst::
File: netperf.info, Node: Running Concurrent Netperf Tests, Next: Using --enable-burst, Prev: Using Netperf to Measure Aggregate Performance, Up: Using Netperf to Measure Aggregate Performance
7.1 Running Concurrent Netperf Tests
====================================
*note Netperf4: Netperf4. is the preferred benchmark to use when one
wants to measure aggregate performance because netperf has no support
for explicit synchronization of concurrent tests. This leaves netperf2
results vulnerable to "skew" errors.
However, since there are times when netperf4 is unavailable it may be
necessary to run netperf. The skew error can be minimized by making use
of the confidence interval functionality. Then one simply launches
multiple tests from the shell using a `for' loop or the like:
for i in 1 2 3 4
do
netperf -t TCP_STREAM -H tardy.cup.hp.com -i 10 -P 0 &
done
which will run four, concurrent *note TCP_STREAM: TCP_STREAM. tests
from the system on which it is executed to tardy.cup.hp.com. Each
concurrent netperf will iterate 10 times thanks to the `-i' option and
will omit the test banners (option `-P') for brevity. The output looks
something like this:
87380 16384 16384 10.03 235.15
87380 16384 16384 10.03 235.09
87380 16384 16384 10.03 235.38
87380 16384 16384 10.03 233.96
We can take the sum of the results and be reasonably confident that
the aggregate performance was 940 Mbits/s.
If you see warnings about netperf not achieving the confidence
intervals, the best thing to do is to increase the number of iterations
with `-i' and/or increase the run length of each iteration with `-l'.
You can also enable local (`-c') and/or remote (`-C') CPU
utilization:
for i in 1 2 3 4
do
netperf -t TCP_STREAM -H tardy.cup.hp.com -i 10 -P 0 -c -C &
done
87380 16384 16384 10.03 235.47 3.67 5.09 10.226 14.180
87380 16384 16384 10.03 234.73 3.67 5.09 10.260 14.225
87380 16384 16384 10.03 234.64 3.67 5.10 10.263 14.231
87380 16384 16384 10.03 234.87 3.67 5.09 10.253 14.215
If the CPU utilizations reported for the same system are the same or
very very close you can be reasonably confident that skew error is
minimized. Presumeably one could then omit `-i' but that is not
advised, particularly when/if the CPU utilization approaches 100
percent. In the example above we see that the CPU utilization on the
local system remains the same for all four tests, and is only off by
0.01 out of 5.09 on the remote system. As the number of CPUs in the
system increases, and so too the odds of saturating a single CPU, the
accuracy of similar CPU utilization implying little skew error is
diminished. This is also the case for those increasingly rare single
CPU systems if the utilization is reported as 100% or very close to it.
NOTE: It is very important to rememeber that netperf is calculating
system-wide CPU utilization. When calculating the service demand
(those last two columns in the output above) each netperf assumes
it is the only thing running on the system. This means that for
concurrent tests the service demands reported by netperf will be
wrong. One has to compute service demands for concurrent tests by
hand.
If you wish you can add a unique, global `-B' option to each command
line to append the given string to the output:
for i in 1 2 3 4
do
netperf -t TCP_STREAM -H tardy.cup.hp.com -B "this is test $i" -i 10 -P 0 &
done
87380 16384 16384 10.03 234.90 this is test 4
87380 16384 16384 10.03 234.41 this is test 2
87380 16384 16384 10.03 235.26 this is test 1
87380 16384 16384 10.03 235.09 this is test 3
You will notice that the tests completed in an order other than they
were started from the shell. This underscores why there is a threat of
skew error and why netperf4 is the preferred tool for aggregate tests.
Even if you see the Netperf Contributing Editor acting to the
contrary!-)
* Menu:
* Issues in Running Concurrent Tests::
File: netperf.info, Node: Issues in Running Concurrent Tests, Prev: Running Concurrent Netperf Tests, Up: Running Concurrent Netperf Tests
7.1.1 Issues in Running Concurrent Tests
----------------------------------------
In addition to the aforementioned issue of skew error, there can be
other issues to consider when running concurrent netperf tests.
For example, when running concurrent tests over multiple interfaces,
one is not always assured that the traffic one thinks went over a given
interface actually did so. In particular, the Linux networking stack
takes a particularly strong stance on its following the so called `weak
end system model'. As such, it is willing to answer ARP requests for
any of its local IP addresses on any of its interfaces. If multiple
interfaces are connected to the same broadcast domain, then even if
they are configured into separate IP subnets there is no a priori way
of knowing which interface was actually used for which connection(s).
This can be addressed by setting the `arp_ignore' sysctl before
configuring interfaces.
As it is quite important, we will repeat that it is very important to
rememeber that each concurrent netperf instance is calculating
system-wide CPU utilization. When calculating the service demand each
netperf assumes it is the only thing running on the system. This means
that for concurrent tests the service demands reported by netperf will
be wrong. One has to compute service demands for concurrent tests by
hand
File: netperf.info, Node: Using --enable-burst, Prev: Running Concurrent Netperf Tests, Up: Using Netperf to Measure Aggregate Performance
7.2 Using -enable-burst
=======================
Starting in version 2.5.0 `--enable-burst=yes' is the default, which
means one no longer must:
configure --enable-burst
To have burst-mode functionality present in netperf. This enables a
test-specific `-b num' option in *note TCP_RR: TCP_RR, *note UDP_RR:
UDP_RR. and *note omni: The Omni Tests. tests.
Normally, netperf will attempt to ramp-up the number of outstanding
requests to `num' plus one transactions in flight at one time. The
ramp-up is to avoid transactions being smashed together into a smaller
number of segments when the transport's congestion window (if any) is
smaller at the time than what netperf wants to have outstanding at one
time. If, however, the user specifies a negative value for `num' this
ramp-up is bypassed and the burst of sends is made without
consideration of transport congestion window.
This burst-mode is used as an alternative to or even in conjunction
with multiple-concurrent _RR tests and as a way to implement a
single-connection, bidirectional bulk-transfer test. When run with
just a single instance of netperf, increasing the burst size can
determine the maximum number of transactions per second which can be
serviced by a single process:
for b in 0 1 2 4 8 16 32
do
netperf -v 0 -t TCP_RR -B "-b $b" -H hpcpc108 -P 0 -- -b $b
done
9457.59 -b 0
9975.37 -b 1
10000.61 -b 2
20084.47 -b 4
29965.31 -b 8
71929.27 -b 16
109718.17 -b 32
The global `-v' and `-P' options were used to minimize the output to
the single figure of merit which in this case the transaction rate.
The global `-B' option was used to more clearly label the output, and
the test-specific `-b' option enabled by `--enable-burst' increase the
number of transactions in flight at one time.
Now, since the test-specific `-D' option was not specified to set
TCP_NODELAY, the stack was free to "bundle" requests and/or responses
into TCP segments as it saw fit, and since the default request and
response size is one byte, there could have been some considerable
bundling even in the absense of transport congestion window issues. If
one wants to try to achieve a closer to one-to-one correspondence
between a request and response and a TCP segment, add the test-specific
`-D' option:
for b in 0 1 2 4 8 16 32
do
netperf -v 0 -t TCP_RR -B "-b $b -D" -H hpcpc108 -P 0 -- -b $b -D
done
8695.12 -b 0 -D
19966.48 -b 1 -D
20691.07 -b 2 -D
49893.58 -b 4 -D
62057.31 -b 8 -D
108416.88 -b 16 -D
114411.66 -b 32 -D
You can see that this has a rather large effect on the reported
transaction rate. In this particular instance, the author believes it
relates to interactions between the test and interrupt coalescing
settings in the driver for the NICs used.
NOTE: Even if you set the `-D' option that is still not a
guarantee that each transaction is in its own TCP segments. You
should get into the habit of verifying the relationship between the
transaction rate and the packet rate via other means.
You can also combine `--enable-burst' functionality with concurrent
netperf tests. This would then be an "aggregate of aggregates" if you
like:
for i in 1 2 3 4
do
netperf -H hpcpc108 -v 0 -P 0 -i 10 -B "aggregate $i -b 8 -D" -t TCP_RR -- -b 8 -D &
done
46668.38 aggregate 4 -b 8 -D
44890.64 aggregate 2 -b 8 -D
45702.04 aggregate 1 -b 8 -D
46352.48 aggregate 3 -b 8 -D
Since each netperf did hit the confidence intervals, we can be
reasonably certain that the aggregate transaction per second rate was
the sum of all four concurrent tests, or something just shy of 184,000
transactions per second. To get some idea if that was also the packet
per second rate, we could bracket that `for' loop with something to
gather statistics and run the results through beforeafter
(ftp://ftp.cup.hp.com/dist/networking/tools):
/usr/sbin/ethtool -S eth2 > before
for i in 1 2 3 4
do
netperf -H 192.168.2.108 -l 60 -v 0 -P 0 -B "aggregate $i -b 8 -D" -t TCP_RR -- -b 8 -D &
done
wait
/usr/sbin/ethtool -S eth2 > after
52312.62 aggregate 2 -b 8 -D
50105.65 aggregate 4 -b 8 -D
50890.82 aggregate 1 -b 8 -D
50869.20 aggregate 3 -b 8 -D
beforeafter before after > delta
grep packets delta
rx_packets: 12251544
tx_packets: 12251550
This example uses `ethtool' because the system being used is running
Linux. Other platforms have other tools - for example HP-UX has
lanadmin:
lanadmin -g mibstats
and of course one could instead use `netstat'.
The `wait' is important because we are launching concurrent netperfs
in the background. Without it, the second ethtool command would be run
before the tests finished and perhaps even before the last of them got
started!
The sum of the reported transaction rates is 204178 over 60 seconds,
which is a total of 12250680 transactions. Each transaction is the
exchange of a request and a response, so we multiply that by 2 to
arrive at 24501360.
The sum of the ethtool stats is 24503094 packets which matches what
netperf was reporting very well.
Had the request or response size differed, we would need to know how
it compared with the "MSS" for the connection.
Just for grins, here is the excercise repeated, using `netstat'
instead of `ethtool'
netstat -s -t > before
for i in 1 2 3 4
do
netperf -l 60 -H 192.168.2.108 -v 0 -P 0 -B "aggregate $i -b 8 -D" -t TCP_RR -- -b 8 -D & done
wait
netstat -s -t > after
51305.88 aggregate 4 -b 8 -D
51847.73 aggregate 2 -b 8 -D
50648.19 aggregate 3 -b 8 -D
53605.86 aggregate 1 -b 8 -D
beforeafter before after > delta
grep segments delta
12445708 segments received
12445730 segments send out
1 segments retransmited
0 bad segments received.
The sums are left as an excercise to the reader :)
Things become considerably more complicated if there are non-trvial
packet losses and/or retransmissions.
Of course all this checking is unnecessary if the test is a UDP_RR
test because UDP "never" aggregates multiple sends into the same UDP
datagram, and there are no ACKnowledgements in UDP. The loss of a
single request or response will not bring a "burst" UDP_RR test to a
screeching halt, but it will reduce the number of transactions
outstanding at any one time. A "burst" UDP_RR test will come to a halt
if the sum of the lost requests and responses reaches the value
specified in the test-specific `-b' option.
File: netperf.info, Node: Using Netperf to Measure Bidirectional Transfer, Next: The Omni Tests, Prev: Using Netperf to Measure Aggregate Performance, Up: Top
8 Using Netperf to Measure Bidirectional Transfer
*************************************************
There are two ways to use netperf to measure the perfomance of
bidirectional transfer. The first is to run concurrent netperf tests
from the command line. The second is to configure netperf with
`--enable-burst' and use a single instance of the *note TCP_RR: TCP_RR.
test.
While neither method is more "correct" than the other, each is doing
so in different ways, and that has possible implications. For
instance, using the concurrent netperf test mechanism means that
multiple TCP connections and multiple processes are involved, whereas
using the single instance of TCP_RR there is only one TCP connection
and one process on each end. They may behave differently, especially
on an MP system.
* Menu:
* Bidirectional Transfer with Concurrent Tests::
* Bidirectional Transfer with TCP_RR::
* Implications of Concurrent Tests vs Burst Request/Response::
File: netperf.info, Node: Bidirectional Transfer with Concurrent Tests, Next: Bidirectional Transfer with TCP_RR, Prev: Using Netperf to Measure Bidirectional Transfer, Up: Using Netperf to Measure Bidirectional Transfer
8.1 Bidirectional Transfer with Concurrent Tests
================================================
If we had two hosts Fred and Ethel, we could simply run a netperf *note
TCP_STREAM: TCP_STREAM. test on Fred pointing at Ethel, and a
concurrent netperf TCP_STREAM test on Ethel pointing at Fred, but since
there are no mechanisms to synchronize netperf tests and we would be
starting tests from two different systems, there is a considerable risk
of skew error.
Far better would be to run simultaneous TCP_STREAM and *note
TCP_MAERTS: TCP_MAERTS. tests from just one system, using the concepts
and procedures outlined in *note Running Concurrent Netperf Tests:
Running Concurrent Netperf Tests. Here then is an example:
for i in 1
do
netperf -H 192.168.2.108 -t TCP_STREAM -B "outbound" -i 10 -P 0 -v 0 \
-- -s 256K -S 256K &
netperf -H 192.168.2.108 -t TCP_MAERTS -B "inbound" -i 10 -P 0 -v 0 \
-- -s 256K -S 256K &
done
892.66 outbound
891.34 inbound
We have used a `for' loop in the shell with just one iteration
because that will be much easier to get both tests started at more or
less the same time than doing it by hand. The global `-P' and `-v'
options are used because we aren't interested in anything other than
the throughput, and the global `-B' option is used to tag each output
so we know which was inbound and which outbound relative to the system
on which we were running netperf. Of course that sense is switched on
the system running netserver :) The use of the global `-i' option is
explained in *note Running Concurrent Netperf Tests: Running Concurrent
Netperf Tests.
Beginning with version 2.5.0 we can accomplish a similar result with
the *note the omni tests: The Omni Tests. and *note output selectors:
Omni Output Selectors.:
for i in 1
do
netperf -H 192.168.1.3 -t omni -l 10 -P 0 -- \
-d stream -s 256K -S 256K -o throughput,direction &
netperf -H 192.168.1.3 -t omni -l 10 -P 0 -- \
-d maerts -s 256K -S 256K -o throughput,direction &
done
805.26,Receive
828.54,Send
File: netperf.info, Node: Bidirectional Transfer with TCP_RR, Next: Implications of Concurrent Tests vs Burst Request/Response, Prev: Bidirectional Transfer with Concurrent Tests, Up: Using Netperf to Measure Bidirectional Transfer
8.2 Bidirectional Transfer with TCP_RR
======================================
Starting with version 2.5.0 the `--enable-burst' configure option
defaults to `yes', and starting some time before version 2.5.0 but
after 2.4.0 the global `-f' option would affect the "throughput"
reported by request/response tests. If one uses the test-specific `-b'
option to have several "transactions" in flight at one time and the
test-specific `-r' option to increase their size, the test looks more
and more like a single-connection bidirectional transfer than a simple
request/response test.
So, putting it all together one can do something like:
netperf -f m -t TCP_RR -H 192.168.1.3 -v 2 -- -b 6 -r 32K -S 256K -S 256K
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.3 (192.168.1.3) port 0 AF_INET : interval : first burst 6
Local /Remote
Socket Size Request Resp. Elapsed
Send Recv Size Size Time Throughput
bytes Bytes bytes bytes secs. 10^6bits/sec
16384 87380 32768 32768 10.00 1821.30
524288 524288
Alignment Offset RoundTrip Trans Throughput
Local Remote Local Remote Latency Rate 10^6bits/s
Send Recv Send Recv usec/Tran per sec Outbound Inbound
8 0 0 0 2015.402 3473.252 910.492 910.492
to get a bidirectional bulk-throughput result. As one can see, the -v
2 output will include a number of interesting, related values.
NOTE: The logic behind `--enable-burst' is very simple, and there
are no calls to `poll()' or `select()' which means we want to make
sure that the `send()' calls will never block, or we run the risk
of deadlock with each side stuck trying to call `send()' and
neither calling `recv()'.
Fortunately, this is easily accomplished by setting a "large enough"
socket buffer size with the test-specific `-s' and `-S' options.
Presently this must be performed by the user. Future versions of
netperf might attempt to do this automagically, but there are some
issues to be worked-out.
File: netperf.info, Node: Implications of Concurrent Tests vs Burst Request/Response, Prev: Bidirectional Transfer with TCP_RR, Up: Using Netperf to Measure Bidirectional Transfer
8.3 Implications of Concurrent Tests vs Burst Request/Response
==============================================================
There are perhaps subtle but important differences between using
concurrent unidirectional tests vs a burst-mode request to measure
bidirectional performance.
Broadly speaking, a single "connection" or "flow" of traffic cannot
make use of the services of more than one or two CPUs at either end.
Whether one or two CPUs will be used processing a flow will depend on
the specifics of the stack(s) involved and whether or not the global
`-T' option has been used to bind netperf/netserver to specific CPUs.
When using concurrent tests there will be two concurrent connections
or flows, which means that upwards of four CPUs will be employed
processing the packets (global `-T' used, no more than two if not),
however, with just a single, bidirectional request/response test no
more than two CPUs will be employed (only one if the global `-T' is not
used).
If there is a CPU bottleneck on either system this may result in
rather different results between the two methods.
Also, with a bidirectional request/response test there is something
of a natural balance or synchronization between inbound and outbound - a
response will not be sent until a request is received, and (once the
burst level is reached) a subseqent request will not be sent until a
response is received. This may mask favoritism in the NIC between
inbound and outbound processing.
With two concurrent unidirectional tests there is no such
synchronization or balance and any favoritism in the NIC may be exposed.
File: netperf.info, Node: The Omni Tests, Next: Other Netperf Tests, Prev: Using Netperf to Measure Bidirectional Transfer, Up: Top
9 The Omni Tests
****************
Beginning with version 2.5.0, netperf begins a migration to the `omni'
tests or "Two routines to measure them all." The code for the omni
tests can be found in `src/nettest_omni.c' and the goal is to make it
easier for netperf to support multiple protocols and report a great
many additional things about the systems under test. Additionally, a
flexible output selection mechanism is present which allows the user to
chose specifically what values she wishes to have reported and in what
format.
The omni tests are included by default in version 2.5.0. To disable
them, one must:
./configure --enable-omni=no ...
and remake netperf. Remaking netserver is optional because even in
2.5.0 it has "unmigrated" netserver side routines for the classic (eg
`src/nettest_bsd.c') tests.
* Menu:
* Native Omni Tests::
* Migrated Tests::
* Omni Output Selection::
File: netperf.info, Node: Native Omni Tests, Next: Migrated Tests, Prev: The Omni Tests, Up: The Omni Tests
9.1 Native Omni Tests
=====================
One access the omni tests "natively" by using a value of "OMNI" with
the global `-t' test-selection option. This will then cause netperf to
use the code in `src/nettest_omni.c' and in particular the
test-specific options parser for the omni tests. The test-specific
options for the omni tests are a superset of those for "classic" tests.
The options added by the omni tests are:
`-c'
This explicitly declares that the test is to include connection
establishment and tear-down as in either a TCP_CRR or TCP_CC test.
`-d '
This option sets the direction of the test relative to the netperf
process. As of version 2.5.0 one can use the following in a
case-insenstive manner:
`send, stream, transmit, xmit or 2'
Any of which will cause netperf to send to the netserver.
`recv, receive, maerts or 4'
Any of which will cause netserver to send to netperf.
`rr or 6'
Either of which will cause a request/response test.
Additionally, one can specify two directions separated by a '|'
character and they will be OR'ed together. In this way one can use
the "Send|Recv" that will be emitted by the *note DIRECTION: Omni
Output Selectors. *note output selector: Omni Output Selection.
when used with a request/reponse test.
`-k [*note output selector: Omni Output Selection.]'
This option sets the style of output to "keyval" where each line of
output has the form:
key=value
For example:
$ netperf -t omni -- -d rr -k "THROUGHPUT,THROUGHPUT_UNITS"
OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
THROUGHPUT=59092.65
THROUGHPUT_UNITS=Trans/s
Using the `-k' option will override any previous, test-specific
`-o' or `-O' option.
`-o [*note output selector: Omni Output Selection.]'
This option sets the style of output to "CSV" where there will be
one line of comma-separated values, preceeded by one line of column
names unless the global `-P' option is used with a value of 0:
$ netperf -t omni -- -d rr -o "THROUGHPUT,THROUGHPUT_UNITS"
OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
Throughput,Throughput Units
60999.07,Trans/s
Using the `-o' option will override any previous, test-specific
`-k' or `-O' option.
`-O [*note output selector: Omni Output Selection.]'
This option sets the style of output to "human readable" which will
look quite similar to classic netperf output:
$ netperf -t omni -- -d rr -O "THROUGHPUT,THROUGHPUT_UNITS"
OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
Throughput Throughput
Units
60492.57 Trans/s
Using the `-O' option will override any previous, test-specific
`-k' or `-o' option.
`-t'
This option explicitly sets the socket type for the test's data
connection. As of version 2.5.0 the known socket types include
"stream" and "dgram" for SOCK_STREAM and SOCK_DGRAM respectively.
`-T '
This option is used to explicitly set the protocol used for the
test. It is case-insensitive. As of version 2.5.0 the protocols
known to netperf include:
`TCP'
Select the Transmission Control Protocol
`UDP'
Select the User Datagram Procotol
`SDP'
Select the Sockets Direct Protocol
`DCCP'
Select the Datagram Congestion Control Protocol
`SCTP'
Select the Stream Control Transport Protocol
`udplite'
Select UDP Lite
The default is implicit based on other settings.
The omni tests also extend the interpretation of some of the classic,
test-specific options for the BSD Sockets tests:
`-m '
This can set the send size for either or both of the netperf and
netserver sides of the test:
-m 32K
sets only the netperf-side send size to 32768 bytes, and or's-in
transmit for the direction. This is effectively the same behaviour
as for the classic tests.
-m ,32K
sets only the netserver side send size to 32768 bytes and or's-in
receive for the direction.
-m 16K,32K
sets the netperf side send size to 16284 bytes, the netserver side
send size to 32768 bytes and the direction will be "Send|Recv."
`-M '
This can set the receive size for either or both of the netperf and
netserver sides of the test:
-M 32K
sets only the netserver side receive size to 32768 bytes and
or's-in send for the test direction.
-M ,32K
sets only the netperf side receive size to 32768 bytes and or's-in
receive for the test direction.
-M 16K,32K
sets the netserver side receive size to 16384 bytes and the netperf
side receive size to 32768 bytes and the direction will be
"Send|Recv."
File: netperf.info, Node: Migrated Tests, Next: Omni Output Selection, Prev: Native Omni Tests, Up: The Omni Tests
9.2 Migrated Tests
==================
As of version 2.5.0 several tests have been migrated to use the omni
code in `src/nettest_omni.c' for the core of their testing. A migrated
test retains all its previous output code and so should still "look and
feel" just like a pre-2.5.0 test with one exception - the first line of
the test banners will include the word "MIGRATED" at the beginning as
in:
$ netperf
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 16384 16384 10.00 27175.27
The tests migrated in version 2.5.0 are:
* TCP_STREAM
* TCP_MAERTS
* TCP_RR
* TCP_CRR
* UDP_STREAM
* UDP_RR
It is expected that future releases will have additional tests
migrated to use the "omni" functionality.
If one uses "omni-specific" test-specific options in conjunction
with a migrated test, instead of using the classic output code, the new
omni output code will be used. For example if one uses the `-k'
test-specific option with a value of "MIN_LATENCY,MAX_LATENCY" with a
migrated TCP_RR test one will see:
$ netperf -t tcp_rr -- -k THROUGHPUT,THROUGHPUT_UNITS
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
THROUGHPUT=60074.74
THROUGHPUT_UNITS=Trans/s
rather than:
$ netperf -t tcp_rr
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
16384 87380 1 1 10.00 59421.52
16384 87380
File: netperf.info, Node: Omni Output Selection, Prev: Migrated Tests, Up: The Omni Tests
9.3 Omni Output Selection
=========================
The omni test-specific `-k', `-o' and `-O' options take an optional
`output selector' by which the user can configure what values are
reported. The output selector can take several forms:
``filename''
The output selections will be read from the named file. Within the
file there can be up to four lines of comma-separated output
selectors. This controls how many multi-line blocks of output are
emitted when the `-O' option is used. This output, while not
identical to "classic" netperf output, is inspired by it.
Multiple lines have no effect for `-k' and `-o' options. Putting
output selections in a file can be useful when the list of
selections is long.
`comma and/or semi-colon-separated list'
The output selections will be parsed from a comma and/or
semi-colon-separated list of output selectors. When the list is
given to a `-O' option a semi-colon specifies a new output block
should be started. Semi-colons have the same meaning as commas
when used with the `-k' or `-o' options. Depending on the command
interpreter being used, the semi-colon may have to be escaped
somehow to keep it from being interpreted by the command
interpreter. This can often be done by enclosing the entire list
in quotes.
`all'
If the keyword all is specified it means that all known output
values should be displayed at the end of the test. This can be a
great deal of output. As of version 2.5.0 there are 157 different
output selectors.
`?'
If a "?" is given as the output selection, the list of all known
output selectors will be displayed and no test actually run. When
passed to the `-O' option they will be listed one per line.
Otherwise they will be listed as a comma-separated list. It may
be necessary to protect the "?" from the command interpreter by
escaping it or enclosing it in quotes.
`no selector'
If nothing is given to the `-k', `-o' or `-O' option then the code
selects a default set of output selectors inspired by classic
netperf output. The format will be the `human readable' format
emitted by the test-specific `-O' option.
The order of evaluation will first check for an output selection. If
none is specified with the `-k', `-o' or `-O' option netperf will
select a default based on the characterists of the test. If there is
an output selection, the code will first check for `?', then check to
see if it is the magic `all' keyword. After that it will check for
either `,' or `;' in the selection and take that to mean it is a comma
and/or semi-colon-separated list. If none of those checks match,
netperf will then assume the output specification is a filename and
attempt to open and parse the file.
* Menu:
* Omni Output Selectors::
File: netperf.info, Node: Omni Output Selectors, Prev: Omni Output Selection, Up: Omni Output Selection
9.3.1 Omni Output Selectors
---------------------------
As of version 2.5.0 the output selectors are:
`OUTPUT_NONE'
This is essentially a null output. For `-k' output it will simply
add a line that reads "OUTPUT_NONE=" to the output. For `-o' it
will cause an empty "column" to be included. For `-O' output it
will cause extra spaces to separate "real" output.
`SOCKET_TYPE'
This will cause the socket type (eg SOCK_STREAM, SOCK_DGRAM) for
the data connection to be output.
`PROTOCOL'
This will cause the protocol used for the data connection to be
displayed.
`DIRECTION'
This will display the data flow direction relative to the netperf
process. Units: Send or Recv for a unidirectional bulk-transfer
test, or Send|Recv for a request/response test.
`ELAPSED_TIME'
This will display the elapsed time in seconds for the test.
`THROUGHPUT'
This will display the througput for the test. Units: As requested
via the global `-f' option and displayed by the THROUGHPUT_UNITS
output selector.
`THROUGHPUT_UNITS'
This will display the units for what is displayed by the
`THROUGHPUT' output selector.
`LSS_SIZE_REQ'
This will display the local (netperf) send socket buffer size (aka
SO_SNDBUF) requested via the command line. Units: Bytes.
`LSS_SIZE'
This will display the local (netperf) send socket buffer size
(SO_SNDBUF) immediately after the data connection socket was
created. Peculiarities of different networking stacks may lead to
this differing from the size requested via the command line.
Units: Bytes.
`LSS_SIZE_END'
This will display the local (netperf) send socket buffer size
(SO_SNDBUF) immediately before the data connection socket is
closed. Peculiarities of different networking stacks may lead
this to differ from the size requested via the command line and/or
the size immediately after the data connection socket was created.
Units: Bytes.
`LSR_SIZE_REQ'
This will display the local (netperf) receive socket buffer size
(aka SO_RCVBUF) requested via the command line. Units: Bytes.
`LSR_SIZE'
This will display the local (netperf) receive socket buffer size
(SO_RCVBUF) immediately after the data connection socket was
created. Peculiarities of different networking stacks may lead to
this differing from the size requested via the command line.
Units: Bytes.
`LSR_SIZE_END'
This will display the local (netperf) receive socket buffer size
(SO_RCVBUF) immediately before the data connection socket is
closed. Peculiarities of different networking stacks may lead
this to differ from the size requested via the command line and/or
the size immediately after the data connection socket was created.
Units: Bytes.
`RSS_SIZE_REQ'
This will display the remote (netserver) send socket buffer size
(aka SO_SNDBUF) requested via the command line. Units: Bytes.
`RSS_SIZE'
This will display the remote (netserver) send socket buffer size
(SO_SNDBUF) immediately after the data connection socket was
created. Peculiarities of different networking stacks may lead to
this differing from the size requested via the command line.
Units: Bytes.
`RSS_SIZE_END'
This will display the remote (netserver) send socket buffer size
(SO_SNDBUF) immediately before the data connection socket is
closed. Peculiarities of different networking stacks may lead
this to differ from the size requested via the command line and/or
the size immediately after the data connection socket was created.
Units: Bytes.
`RSR_SIZE_REQ'
This will display the remote (netserver) receive socket buffer
size (aka SO_RCVBUF) requested via the command line. Units: Bytes.
`RSR_SIZE'
This will display the remote (netserver) receive socket buffer size
(SO_RCVBUF) immediately after the data connection socket was
created. Peculiarities of different networking stacks may lead to
this differing from the size requested via the command line.
Units: Bytes.
`RSR_SIZE_END'
This will display the remote (netserver) receive socket buffer size
(SO_RCVBUF) immediately before the data connection socket is
closed. Peculiarities of different networking stacks may lead
this to differ from the size requested via the command line and/or
the size immediately after the data connection socket was created.
Units: Bytes.
`LOCAL_SEND_SIZE'
This will display the size of the buffers netperf passed in any
"send" calls it made on the data connection for a
non-request/response test. Units: Bytes.
`LOCAL_RECV_SIZE'
This will display the size of the buffers netperf passed in any
"receive" calls it made on the data connection for a
non-request/response test. Units: Bytes.
`REMOTE_SEND_SIZE'
This will display the size of the buffers netserver passed in any
"send" calls it made on the data connection for a
non-request/response test. Units: Bytes.
`REMOTE_RECV_SIZE'
This will display the size of the buffers netserver passed in any
"receive" calls it made on the data connection for a
non-request/response test. Units: Bytes.
`REQUEST_SIZE'
This will display the size of the requests netperf sent in a
request-response test. Units: Bytes.
`RESPONSE_SIZE'
This will display the size of the responses netserver sent in a
request-response test. Units: Bytes.
`LOCAL_CPU_UTIL'
This will display the overall CPU utilization during the test as
measured by netperf. Units: 0 to 100 percent.
`LOCAL_CPU_METHOD'
This will display the method used by netperf to measure CPU
utilization. Units: single character denoting method.
`LOCAL_SD'
This will display the service demand, or units of CPU consumed per
unit of work, as measured by netperf. Units: microsconds of CPU
consumed per either KB (K==1024) of data transferred or
request/response transaction.
`REMOTE_CPU_UTIL'
This will display the overall CPU utilization during the test as
measured by netserver. Units 0 to 100 percent.
`REMOTE_CPU_METHOD'
This will display the method used by netserver to measure CPU
utilization. Units: single character denoting method.
`REMOTE_SD'
This will display the service demand, or units of CPU consumed per
unit of work, as measured by netserver. Units: microseconds of CPU
consumed consumed per either KB (K==1024) of data transferred or
request/response transaction.
`SD_UNITS'
This will display the units for LOCAL_SD and REMOTE_SD
`CONFIDENCE_LEVEL'
This will display the confidence level requested by the user either
explicitly via the global `-I' option, or implicitly via the
global `-i' option. The value will be either 95 or 99 if
confidence intervals have been requested or 0 if they were not.
Units: Percent
`CONFIDENCE_INTERVAL'
This will display the width of the confidence interval requested
either explicitly via the global `-I' option or implicitly via the
global `-i' option. Units: Width in percent of mean value
computed. A value of -1.0 means that confidence intervals were not
requested.
`CONFIDENCE_ITERATION'
This will display the number of test iterations netperf undertook,
perhaps while attempting to achieve the requested confidence
interval and level. If confidence intervals were requested via the
command line then the value will be between 3 and 30. If
confidence intervals were not requested the value will be 1.
Units: Iterations
`THROUGHPUT_CONFID'
This will display the width of the confidence interval actually
achieved for `THROUGHPUT' during the test. Units: Width of
interval as percentage of reported throughput value.
`LOCAL_CPU_CONFID'
This will display the width of the confidence interval actually
achieved for overall CPU utilization on the system running netperf
(`LOCAL_CPU_UTIL') during the test, if CPU utilization measurement
was enabled. Units: Width of interval as percentage of reported
CPU utilization.
`REMOTE_CPU_CONFID'
This will display the width of the confidence interval actually
achieved for overall CPU utilization on the system running
netserver (`REMOTE_CPU_UTIL') during the test, if CPU utilization
measurement was enabled. Units: Width of interval as percentage of
reported CPU utilization.
`TRANSACTION_RATE'
This will display the transaction rate in transactions per second
for a request/response test even if the user has requested a
throughput in units of bits or bytes per second via the global `-f'
option. It is undefined for a non-request/response test. Units:
Transactions per second.
`RT_LATENCY'
This will display the average round-trip latency for a
request/response test, accounting for number of transactions in
flight at one time. It is undefined for a non-request/response
test. Units: Microseconds per transaction
`BURST_SIZE'
This will display the "burst size" or added transactions in flight
in a request/response test as requested via a test-specific `-b'
option. The number of transactions in flight at one time will be
one greater than this value. It is undefined for a
non-request/response test. Units: added Transactions in flight.
`LOCAL_TRANSPORT_RETRANS'
This will display the number of retransmissions experienced on the
data connection during the test as determined by netperf. A value
of -1 means the attempt to determine the number of retransmissions
failed or the concept was not valid for the given protocol or the
mechanism is not known for the platform. A value of -2 means it
was not attempted. As of version 2.5.0 the meaning of values are
in flux and subject to change. Units: number of retransmissions.
`REMOTE_TRANSPORT_RETRANS'
This will display the number of retransmissions experienced on the
data connection during the test as determined by netserver. A
value of -1 means the attempt to determine the number of
retransmissions failed or the concept was not valid for the given
protocol or the mechanism is not known for the platform. A value
of -2 means it was not attempted. As of version 2.5.0 the meaning
of values are in flux and subject to change. Units: number of
retransmissions.
`TRANSPORT_MSS'
This will display the Maximum Segment Size (aka MSS) or its
equivalent for the protocol being used during the test. A value
of -1 means either the concept of an MSS did not apply to the
protocol being used, or there was an error in retrieving it.
Units: Bytes.
`LOCAL_SEND_THROUGHPUT'
The throughput as measured by netperf for the successful "send"
calls it made on the data connection. Units: as requested via the
global `-f' option and displayed via the `THROUGHPUT_UNITS' output
selector.
`LOCAL_RECV_THROUGHPUT'
The throughput as measured by netperf for the successful "receive"
calls it made on the data connection. Units: as requested via the
global `-f' option and displayed via the `THROUGHPUT_UNITS' output
selector.
`REMOTE_SEND_THROUGHPUT'
The throughput as measured by netserver for the successful "send"
calls it made on the data connection. Units: as requested via the
global `-f' option and displayed via the `THROUGHPUT_UNITS' output
selector.
`REMOTE_RECV_THROUGHPUT'
The throughput as measured by netserver for the successful
"receive" calls it made on the data connection. Units: as
requested via the global `-f' option and displayed via the
`THROUGHPUT_UNITS' output selector.
`LOCAL_CPU_BIND'
The CPU to which netperf was bound, if at all, during the test. A
value of -1 means that netperf was not explicitly bound to a CPU
during the test. Units: CPU ID
`LOCAL_CPU_COUNT'
The number of CPUs (cores, threads) detected by netperf. Units:
CPU count.
`LOCAL_CPU_PEAK_UTIL'
The utilization of the CPU most heavily utilized during the test,
as measured by netperf. This can be used to see if any one CPU of a
multi-CPU system was saturated even though the overall CPU
utilization as reported by `LOCAL_CPU_UTIL' was low. Units: 0 to
100%
`LOCAL_CPU_PEAK_ID'
The id of the CPU most heavily utilized during the test as
determined by netperf. Units: CPU ID.
`LOCAL_CPU_MODEL'
Model information for the processor(s) present on the system
running netperf. Assumes all processors in the system (as
perceived by netperf) on which netperf is running are the same
model. Units: Text
`LOCAL_CPU_FREQUENCY'
The frequency of the processor(s) on the system running netperf, at
the time netperf made the call. Assumes that all processors
present in the system running netperf are running at the same
frequency. Units: MHz
`REMOTE_CPU_BIND'
The CPU to which netserver was bound, if at all, during the test. A
value of -1 means that netperf was not explicitly bound to a CPU
during the test. Units: CPU ID
`REMOTE_CPU_COUNT'
The number of CPUs (cores, threads) detected by netserver. Units:
CPU count.
`REMOTE_CPU_PEAK_UTIL'
The utilization of the CPU most heavily utilized during the test,
as measured by netserver. This can be used to see if any one CPU
of a multi-CPU system was saturated even though the overall CPU
utilization as reported by `REMOTE_CPU_UTIL' was low. Units: 0 to
100%
`REMOTE_CPU_PEAK_ID'
The id of the CPU most heavily utilized during the test as
determined by netserver. Units: CPU ID.
`REMOTE_CPU_MODEL'
Model information for the processor(s) present on the system
running netserver. Assumes all processors in the system (as
perceived by netserver) on which netserver is running are the same
model. Units: Text
`REMOTE_CPU_FREQUENCY'
The frequency of the processor(s) on the system running netserver,
at the time netserver made the call. Assumes that all processors
present in the system running netserver are running at the same
frequency. Units: MHz
`SOURCE_PORT'
The port ID/service name to which the data socket created by
netperf was bound. A value of 0 means the data socket was not
explicitly bound to a port number. Units: ASCII text.
`SOURCE_ADDR'
The name/address to which the data socket created by netperf was
bound. A value of 0.0.0.0 means the data socket was not explicitly
bound to an address. Units: ASCII text.
`SOURCE_FAMILY'
The address family to which the data socket created by netperf was
bound. A value of 0 means the data socket was not explicitly
bound to a given address family. Units: ASCII text.
`DEST_PORT'
The port ID to which the data socket created by netserver was
bound. A value of 0 means the data socket was not explicitly bound
to a port number. Units: ASCII text.
`DEST_ADDR'
The name/address of the data socket created by netserver. Units:
ASCII text.
`DEST_FAMILY'
The address family to which the data socket created by netserver
was bound. A value of 0 means the data socket was not explicitly
bound to a given address family. Units: ASCII text.
`LOCAL_SEND_CALLS'
The number of successful "send" calls made by netperf against its
data socket. Units: Calls.
`LOCAL_RECV_CALLS'
The number of successful "receive" calls made by netperf against
its data socket. Units: Calls.
`LOCAL_BYTES_PER_RECV'
The average number of bytes per "receive" call made by netperf
against its data socket. Units: Bytes.
`LOCAL_BYTES_PER_SEND'
The average number of bytes per "send" call made by netperf against
its data socket. Units: Bytes.
`LOCAL_BYTES_SENT'
The number of bytes successfully sent by netperf through its data
socket. Units: Bytes.
`LOCAL_BYTES_RECVD'
The number of bytes successfully received by netperf through its
data socket. Units: Bytes.
`LOCAL_BYTES_XFERD'
The sum of bytes sent and received by netperf through its data
socket. Units: Bytes.
`LOCAL_SEND_OFFSET'
The offset from the alignment of the buffers passed by netperf in
its "send" calls. Specified via the global `-o' option and
defaults to 0. Units: Bytes.
`LOCAL_RECV_OFFSET'
The offset from the alignment of the buffers passed by netperf in
its "receive" calls. Specified via the global `-o' option and
defaults to 0. Units: Bytes.
`LOCAL_SEND_ALIGN'
The alignment of the buffers passed by netperf in its "send" calls
as specified via the global `-a' option. Defaults to 8. Units:
Bytes.
`LOCAL_RECV_ALIGN'
The alignment of the buffers passed by netperf in its "receive"
calls as specified via the global `-a' option. Defaults to 8.
Units: Bytes.
`LOCAL_SEND_WIDTH'
The "width" of the ring of buffers through which netperf cycles as
it makes its "send" calls. Defaults to one more than the local
send socket buffer size divided by the send size as determined at
the time the data socket is created. Can be used to make netperf
more processor data cache unfiendly. Units: number of buffers.
`LOCAL_RECV_WIDTH'
The "width" of the ring of buffers through which netperf cycles as
it makes its "receive" calls. Defaults to one more than the local
receive socket buffer size divided by the receive size as
determined at the time the data socket is created. Can be used to
make netperf more processor data cache unfiendly. Units: number of
buffers.
`LOCAL_SEND_DIRTY_COUNT'
The number of bytes to "dirty" (write to) before netperf makes a
"send" call. Specified via the global `-k' option, which requires
that -enable-dirty=yes was specificed with the configure command
prior to building netperf. Units: Bytes.
`LOCAL_RECV_DIRTY_COUNT'
The number of bytes to "dirty" (write to) before netperf makes a
"recv" call. Specified via the global `-k' option which requires
that -enable-dirty was specified with the configure command prior
to building netperf. Units: Bytes.
`LOCAL_RECV_CLEAN_COUNT'
The number of bytes netperf should read "cleanly" before making a
"receive" call. Specified via the global `-k' option which
requires that -enable-dirty was specified with configure command
prior to building netperf. Clean reads start were dirty writes
ended. Units: Bytes.
`LOCAL_NODELAY'
Indicates whether or not setting the test protocol-specific "no
delay" (eg TCP_NODELAY) option on the data socket used by netperf
was requested by the test-specific `-D' option and successful.
Units: 0 means no, 1 means yes.
`LOCAL_CORK'
Indicates whether or not TCP_CORK was set on the data socket used
by netperf as requested via the test-specific `-C' option. 1 means
yes, 0 means no/not applicable.
`REMOTE_SEND_CALLS'
`REMOTE_RECV_CALLS'
`REMOTE_BYTES_PER_RECV'
`REMOTE_BYTES_PER_SEND'
`REMOTE_BYTES_SENT'
`REMOTE_BYTES_RECVD'
`REMOTE_BYTES_XFERD'
`REMOTE_SEND_OFFSET'
`REMOTE_RECV_OFFSET'
`REMOTE_SEND_ALIGN'
`REMOTE_RECV_ALIGN'
`REMOTE_SEND_WIDTH'
`REMOTE_RECV_WIDTH'
`REMOTE_SEND_DIRTY_COUNT'
`REMOTE_RECV_DIRTY_COUNT'
`REMOTE_RECV_CLEAN_COUNT'
`REMOTE_NODELAY'
`REMOTE_CORK'
These are all like their "LOCAL_" counterparts only for the
netserver rather than netperf.
`LOCAL_SYSNAME'
The name of the OS (eg "Linux") running on the system on which
netperf was running. Units: ASCII Text
`LOCAL_SYSTEM_MODEL'
The model name of the system on which netperf was running. Units:
ASCII Text.
`LOCAL_RELEASE'
The release name/number of the OS running on the system on which
netperf was running. Units: ASCII Text
`LOCAL_VERSION'
The version number of the OS running on the system on which netperf
was running. Units: ASCII Text
`LOCAL_MACHINE'
The machine architecture of the machine on which netperf was
running. Units: ASCII Text.
`REMOTE_SYSNAME'
`REMOTE_SYSTEM_MODEL'
`REMOTE_RELEASE'
`REMOTE_VERSION'
`REMOTE_MACHINE'
These are all like their "LOCAL_" counterparts only for the
netserver rather than netperf.
`LOCAL_INTERFACE_NAME'
The name of the probable egress interface through which the data
connection went on the system running netperf. Example: eth0.
Units: ASCII Text.
`LOCAL_INTERFACE_VENDOR'
The vendor ID of the probable egress interface through which
traffic on the data connection went on the system running netperf.
Units: Hexadecimal IDs as might be found in a `pci.ids' file or at
the PCI ID Repository (http://pciids.sourceforge.net/).
`LOCAL_INTERFACE_DEVICE'
The device ID of the probable egress interface through which
traffic on the data connection went on the system running netperf.
Units: Hexadecimal IDs as might be found in a `pci.ids' file or at
the PCI ID Repository (http://pciids.sourceforge.net/).
`LOCAL_INTERFACE_SUBVENDOR'
The sub-vendor ID of the probable egress interface through which
traffic on the the data connection went on the system running
netperf. Units: Hexadecimal IDs as might be found in a `pci.ids'
file or at the PCI ID Repository (http://pciids.sourceforge.net/).
`LOCAL_INTERFACE_SUBDEVICE'
The sub-device ID of the probable egress interface through which
traffic on the data connection went on the system running netperf.
Units: Hexadecimal IDs as might be found in a `pci.ids' file or at
the PCI ID Repository (http://pciids.sourceforge.net/).
`LOCAL_DRIVER_NAME'
The name of the driver used for the probable egress interface
through which traffic on the data connection went on the system
running netperf. Units: ASCII Text.
`LOCAL_DRIVER_VERSION'
The version string for the driver used for the probable egress
interface through which traffic on the data connection went on the
system running netperf. Units: ASCII Text.
`LOCAL_DRIVER_FIRMWARE'
The firmware version for the driver used for the probable egress
interface through which traffic on the data connection went on the
system running netperf. Units: ASCII Text.
`LOCAL_DRIVER_BUS'
The bus address of the probable egress interface through which
traffic on the data connection went on the system running netperf.
Units: ASCII Text.
`LOCAL_INTERFACE_SLOT'
The slot ID of the probable egress interface through which traffic
on the data connection went on the system running netperf. Units:
ASCII Text.
`REMOTE_INTERFACE_NAME'
`REMOTE_INTERFACE_VENDOR'
`REMOTE_INTERFACE_DEVICE'
`REMOTE_INTERFACE_SUBVENDOR'
`REMOTE_INTERFACE_SUBDEVICE'
`REMOTE_DRIVER_NAME'
`REMOTE_DRIVER_VERSION'
`REMOTE_DRIVER_FIRMWARE'
`REMOTE_DRIVER_BUS'
`REMOTE_INTERFACE_SLOT'
These are all like their "LOCAL_" counterparts only for the
netserver rather than netperf.
`LOCAL_INTERVAL_USECS'
The interval at which bursts of operations (sends, receives,
transactions) were attempted by netperf. Specified by the global
`-w' option which requires -enable-intervals to have been
specified with the configure command prior to building netperf.
Units: Microseconds (though specified by default in milliseconds
on the command line)
`LOCAL_INTERVAL_BURST'
The number of operations (sends, receives, transactions depending
on the test) which were attempted by netperf each
LOCAL_INTERVAL_USECS units of time. Specified by the global `-b'
option which requires -enable-intervals to have been specified
with the configure command prior to building netperf. Units:
number of operations per burst.
`REMOTE_INTERVAL_USECS'
The interval at which bursts of operations (sends, receives,
transactions) were attempted by netserver. Specified by the
global `-w' option which requires -enable-intervals to have been
specified with the configure command prior to building netperf.
Units: Microseconds (though specified by default in milliseconds
on the command line)
`REMOTE_INTERVAL_BURST'
The number of operations (sends, receives, transactions depending
on the test) which were attempted by netperf each
LOCAL_INTERVAL_USECS units of time. Specified by the global `-b'
option which requires -enable-intervals to have been specified
with the configure command prior to building netperf. Units:
number of operations per burst.
`LOCAL_SECURITY_TYPE_ID'
`LOCAL_SECURITY_TYPE'
`LOCAL_SECURITY_ENABLED_NUM'
`LOCAL_SECURITY_ENABLED'
`LOCAL_SECURITY_SPECIFIC'
`REMOTE_SECURITY_TYPE_ID'
`REMOTE_SECURITY_TYPE'
`REMOTE_SECURITY_ENABLED_NUM'
`REMOTE_SECURITY_ENABLED'
`REMOTE_SECURITY_SPECIFIC'
A bunch of stuff related to what sort of security mechanisms (eg
SELINUX) were enabled on the systems during the test.
`RESULT_BRAND'
The string specified by the user with the global `-B' option.
Units: ASCII Text.
`UUID'
The universally unique identifier associated with this test, either
generated automagically by netperf, or passed to netperf via an
omni test-specific `-u' option. Note: Future versions may make this
a global command-line option. Units: ASCII Text.
`MIN_LATENCY'
The minimum "latency" or operation time (send, receive or
request/response exchange depending on the test) as measured on the
netperf side when the global `-j' option was specified. Units:
Microseconds.
`MAX_LATENCY'
The maximum "latency" or operation time (send, receive or
request/response exchange depending on the test) as measured on the
netperf side when the global `-j' option was specified. Units:
Microseconds.
`P50_LATENCY'
The 50th percentile value of "latency" or operation time (send,
receive or request/response exchange depending on the test) as
measured on the netperf side when the global `-j' option was
specified. Units: Microseconds.
`P90_LATENCY'
The 90th percentile value of "latency" or operation time (send,
receive or request/response exchange depending on the test) as
measured on the netperf side when the global `-j' option was
specified. Units: Microseconds.
`P99_LATENCY'
The 99th percentile value of "latency" or operation time (send,
receive or request/response exchange depending on the test) as
measured on the netperf side when the global `-j' option was
specified. Units: Microseconds.
`MEAN_LATENCY'
The average "latency" or operation time (send, receive or
request/response exchange depending on the test) as measured on the
netperf side when the global `-j' option was specified. Units:
Microseconds.
`STDDEV_LATENCY'
The standard deviation of "latency" or operation time (send,
receive or request/response exchange depending on the test) as
measured on the netperf side when the global `-j' option was
specified. Units: Microseconds.
`COMMAND_LINE'
The full command line used when invoking netperf. Units: ASCII
Text.
`OUTPUT_END'
While emitted with the list of output selectors, it is ignored when
specified as an output selector.
File: netperf.info, Node: Other Netperf Tests, Next: Address Resolution, Prev: The Omni Tests, Up: Top
10 Other Netperf Tests
**********************
Apart from the typical performance tests, netperf contains some tests
which can be used to streamline measurements and reporting. These
include CPU rate calibration (present) and host identification (future
enhancement).
* Menu:
* CPU rate calibration::
* UUID Generation::
File: netperf.info, Node: CPU rate calibration, Next: UUID Generation, Prev: Other Netperf Tests, Up: Other Netperf Tests
10.1 CPU rate calibration
=========================
Some of the CPU utilization measurement mechanisms of netperf work by
comparing the rate at which some counter increments when the system is
idle with the rate at which that same counter increments when the
system is running a netperf test. The ratio of those rates is used to
arrive at a CPU utilization percentage.
This means that netperf must know the rate at which the counter
increments when the system is presumed to be "idle." If it does not
know the rate, netperf will measure it before starting a data transfer
test. This calibration step takes 40 seconds for each of the local or
remote ystems, and if repeated for each netperf test would make taking
repeated measurements rather slow.
Thus, the netperf CPU utilization options `-c' and and `-C' can take
an optional calibration value. This value is used as the "idle rate"
and the calibration step is not performed. To determine the idle rate,
netperf can be used to run special tests which only report the value of
the calibration - they are the LOC_CPU and REM_CPU tests. These return
the calibration value for the local and remote system respectively. A
common way to use these tests is to store their results into an
environment variable and use that in subsequent netperf commands:
LOC_RATE=`netperf -t LOC_CPU`
REM_RATE=`netperf -H -t REM_CPU`
netperf -H -c $LOC_RATE -C $REM_RATE ... -- ...
...
netperf -H -c $LOC_RATE -C $REM_RATE ... -- ...
If you are going to use netperf to measure aggregate results, it is
important to use the LOC_CPU and REM_CPU tests to get the calibration
values first to avoid issues with some of the aggregate netperf tests
transferring data while others are "idle" and getting bogus calibration
values. When running aggregate tests, it is very important to remember
that any one instance of netperf does not know about the other
instances of netperf. It will report global CPU utilization and will
calculate service demand believing it was the only thing causing that
CPU utilization. So, you can use the CPU utilization reported by
netperf in an aggregate test, but you have to calculate service demands
by hand.
File: netperf.info, Node: UUID Generation, Prev: CPU rate calibration, Up: Other Netperf Tests
10.2 UUID Generation
====================
Beginning with version 2.5.0 netperf can generate Universally Unique
IDentifiers (UUIDs). This can be done explicitly via the "UUID" test:
$ netperf -t UUID
2c8561ae-9ebd-11e0-a297-0f5bfa0349d0
In and of itself, this is not terribly useful, but used in conjuction
with the test-specific `-u' option of an "omni" test to set the UUID
emitted by the *note UUID: Omni Output Selectors. output selector, it
can be used to tie-together the separate instances of an aggregate
netperf test. Say, for instance if they were inserted into a database
of some sort.
File: netperf.info, Node: Address Resolution, Next: Enhancing Netperf, Prev: Other Netperf Tests, Up: Top
11 Address Resolution
*********************
Netperf versions 2.4.0 and later have merged IPv4 and IPv6 tests so the
functionality of the tests in `src/nettest_ipv6.c' has been subsumed
into the tests in `src/nettest_bsd.c' This has been accomplished in
part by switching from `gethostbyname()'to `getaddrinfo()' exclusively.
While it was theoretically possible to get multiple results for a
hostname from `gethostbyname()' it was generally unlikely and netperf's
ignoring of the second and later results was not much of an issue.
Now with `getaddrinfo' and particularly with AF_UNSPEC it is
increasingly likely that a given hostname will have multiple associated
addresses. The `establish_control()' routine of `src/netlib.c' will
indeed attempt to chose from among all the matching IP addresses when
establishing the control connection. Netperf does not _really_ care if
the control connection is IPv4 or IPv6 or even mixed on either end.
However, the individual tests still ass-u-me that the first result in
the address list is the one to be used. Whether or not this will
turn-out to be an issue has yet to be determined.
If you do run into problems with this, the easiest workaround is to
specify IP addresses for the data connection explicitly in the
test-specific `-H' and `-L' options. At some point, the netperf tests
_may_ try to be more sophisticated in their parsing of returns from
`getaddrinfo()' - straw-man patches to
would of course be most welcome :)
Netperf has leveraged code from other open-source projects with
amenable licensing to provide a replacement `getaddrinfo()' call on
those platforms where the `configure' script believes there is no
native getaddrinfo call. As of this writing, the replacement
`getaddrinfo()' as been tested on HP-UX 11.0 and then presumed to run
elsewhere.
File: netperf.info, Node: Enhancing Netperf, Next: Netperf4, Prev: Address Resolution, Up: Top
12 Enhancing Netperf
********************
Netperf is constantly evolving. If you find you want to make
enhancements to netperf, by all means do so. If you wish to add a new
"suite" of tests to netperf the general idea is to:
1. Add files `src/nettest_mumble.c' and `src/nettest_mumble.h' where
mumble is replaced with something meaningful for the test-suite.
2. Add support for an apropriate `--enable-mumble' option in
`configure.ac'.
3. Edit `src/netperf.c', `netsh.c', and `netserver.c' as required,
using #ifdef WANT_MUMBLE.
4. Compile and test
However, with the addition of the "omni" tests in version 2.5.0 it
is preferred that one attempt to make the necessary changes to
`src/nettest_omni.c' rather than adding new source files, unless this
would make the omni tests entirely too complicated.
If you wish to submit your changes for possible inclusion into the
mainline sources, please try to base your changes on the latest
available sources. (*Note Getting Netperf Bits::.) and then send email
describing the changes at a high level to
or perhaps .
If the concensus is positive, then sending context `diff' results to
is the next step. From that point, it
is a matter of pestering the Netperf Contributing Editor until he gets
the changes incorporated :)
File: netperf.info, Node: Netperf4, Next: Concept Index, Prev: Enhancing Netperf, Up: Top
13 Netperf4
***********
Netperf4 is the shorthand name given to version 4.X.X of netperf. This
is really a separate benchmark more than a newer version of netperf,
but it is a decendant of netperf so the netperf name is kept. The
facetious way to describe netperf4 is to say it is the
egg-laying-woolly-milk-pig version of netperf :) The more respectful
way to describe it is to say it is the version of netperf with support
for synchronized, multiple-thread, multiple-test, multiple-system,
network-oriented benchmarking.
Netperf4 is still undergoing evolution. Those wishing to work with or
on netperf4 are encouraged to join the netperf-dev
(http://www.netperf.org/cgi-bin/mailman/listinfo/netperf-dev) mailing
list and/or peruse the current sources
(http://www.netperf.org/svn/netperf4/trunk).
File: netperf.info, Node: Concept Index, Next: Option Index, Prev: Netperf4, Up: Top
Concept Index
*************
[index ]
* Menu:
* Aggregate Performance: Using Netperf to Measure Aggregate Performance.
(line 6)
* Bandwidth Limitation: Installing Netperf Bits.
(line 64)
* Connection Latency: TCP_CC. (line 6)
* CPU Utilization: CPU Utilization. (line 6)
* Design of Netperf: The Design of Netperf.
(line 6)
* Installation: Installing Netperf. (line 6)
* Introduction: Introduction. (line 6)
* Latency, Connection Establishment <1>: XTI_TCP_CRR. (line 6)
* Latency, Connection Establishment <2>: XTI_TCP_CC. (line 6)
* Latency, Connection Establishment <3>: TCP_CRR. (line 6)
* Latency, Connection Establishment: TCP_CC. (line 6)
* Latency, Request-Response <1>: SCTP_RR. (line 6)
* Latency, Request-Response <2>: DLCO_RR. (line 6)
* Latency, Request-Response <3>: DLCL_RR. (line 6)
* Latency, Request-Response <4>: XTI_UDP_RR. (line 6)
* Latency, Request-Response <5>: XTI_TCP_CRR. (line 6)
* Latency, Request-Response <6>: XTI_TCP_RR. (line 6)
* Latency, Request-Response <7>: UDP_RR. (line 6)
* Latency, Request-Response <8>: TCP_CRR. (line 6)
* Latency, Request-Response: TCP_RR. (line 6)
* Limiting Bandwidth <1>: UDP_STREAM. (line 9)
* Limiting Bandwidth: Installing Netperf Bits.
(line 64)
* Measuring Latency: TCP_RR. (line 6)
* Packet Loss: UDP_RR. (line 6)
* Port Reuse: TCP_CC. (line 13)
* TIME_WAIT: TCP_CC. (line 13)
File: netperf.info, Node: Option Index, Prev: Concept Index, Up: Top
Option Index
************
[index ]
* Menu:
* --enable-burst, Configure: Using Netperf to Measure Aggregate Performance.
(line 6)
* --enable-cpuutil, Configure: Installing Netperf Bits.
(line 24)
* --enable-dlpi, Configure: Installing Netperf Bits.
(line 30)
* --enable-histogram, Configure: Installing Netperf Bits.
(line 64)
* --enable-intervals, Configure: Installing Netperf Bits.
(line 64)
* --enable-omni, Configure: Installing Netperf Bits.
(line 36)
* --enable-sctp, Configure: Installing Netperf Bits.
(line 30)
* --enable-unixdomain, Configure: Installing Netperf Bits.
(line 30)
* --enable-xti, Configure: Installing Netperf Bits.
(line 30)
* -4, Global: Global Options. (line 489)
* -4, Test-specific <1>: Options Common to TCP UDP and SCTP _RR tests.
(line 88)
* -4, Test-specific: Options common to TCP UDP and SCTP tests.
(line 110)
* -6 Test-specific: Options Common to TCP UDP and SCTP _RR tests.
(line 94)
* -6, Global: Global Options. (line 498)
* -6, Test-specific: Options common to TCP UDP and SCTP tests.
(line 116)
* -A, Global: Global Options. (line 18)
* -a, Global: Global Options. (line 6)
* -B, Global: Global Options. (line 29)
* -b, Global: Global Options. (line 22)
* -C, Global: Global Options. (line 42)
* -c, Global: Global Options. (line 33)
* -c, Test-specific: Native Omni Tests. (line 13)
* -D, Global: Global Options. (line 56)
* -d, Global: Global Options. (line 47)
* -d, Test-specific: Native Omni Tests. (line 17)
* -F, Global: Global Options. (line 76)
* -f, Global: Global Options. (line 67)
* -H, Global: Global Options. (line 95)
* -h, Global: Global Options. (line 91)
* -H, Test-specific: Options Common to TCP UDP and SCTP _RR tests.
(line 17)
* -h, Test-specific <1>: Options Common to TCP UDP and SCTP _RR tests.
(line 10)
* -h, Test-specific: Options common to TCP UDP and SCTP tests.
(line 10)
* -i, Global: Global Options. (line 179)
* -I, Global: Global Options. (line 130)
* -j, Global: Global Options. (line 205)
* -k, Test-specific: Native Omni Tests. (line 37)
* -L, Global: Global Options. (line 263)
* -l, Global: Global Options. (line 242)
* -L, Test-specific <1>: Options Common to TCP UDP and SCTP _RR tests.
(line 26)
* -L, Test-specific: Options common to TCP UDP and SCTP tests.
(line 25)
* -M, Test-specific: Options common to TCP UDP and SCTP tests.
(line 48)
* -m, Test-specific: Options common to TCP UDP and SCTP tests.
(line 32)
* -N, Global: Global Options. (line 293)
* -n, Global: Global Options. (line 275)
* -O, Global: Global Options. (line 338)
* -o, Global: Global Options. (line 329)
* -O, Test-specific: Native Omni Tests. (line 62)
* -o, Test-specific: Native Omni Tests. (line 50)
* -P, Global: Global Options. (line 363)
* -p, Global: Global Options. (line 343)
* -P, Test-specific <1>: Options Common to TCP UDP and SCTP _RR tests.
(line 33)
* -P, Test-specific: Options common to TCP UDP and SCTP tests.
(line 61)
* -r, Test-specific: Options Common to TCP UDP and SCTP _RR tests.
(line 36)
* -S Test-specific: Options common to TCP UDP and SCTP tests.
(line 87)
* -S, Global: Global Options. (line 381)
* -s, Global: Global Options. (line 372)
* -S, Test-specific: Options Common to TCP UDP and SCTP _RR tests.
(line 68)
* -s, Test-specific <1>: Options Common to TCP UDP and SCTP _RR tests.
(line 48)
* -s, Test-specific: Options common to TCP UDP and SCTP tests.
(line 64)
* -T, Global: Global Options. (line 423)
* -t, Global: Global Options. (line 391)
* -T, Test-specific: Native Omni Tests. (line 81)
* -t, Test-specific: Native Omni Tests. (line 76)
* -V, Global: Global Options. (line 468)
* -v, Global: Global Options. (line 440)
* -W, Global: Global Options. (line 480)
* -w, Global: Global Options. (line 473)
Tag Table:
Node: Top439
Node: Introduction1476
Node: Conventions4150
Node: Installing Netperf5913
Node: Getting Netperf Bits7467
Node: Installing Netperf Bits9326
Node: Verifying Installation17822
Node: The Design of Netperf18526
Node: CPU Utilization20122
Node: CPU Utilization in a Virtual Guest28845
Node: Global Command-line Options30432
Node: Command-line Options Syntax30971
Node: Global Options32367
Node: Using Netperf to Measure Bulk Data Transfer56521
Node: Issues in Bulk Transfer57194
Node: Options common to TCP UDP and SCTP tests61455
Node: TCP_STREAM67780
Node: TCP_MAERTS71864
Node: TCP_SENDFILE73101
Node: UDP_STREAM75601
Node: XTI_TCP_STREAM79037
Node: XTI_UDP_STREAM79682
Node: SCTP_STREAM80327
Node: DLCO_STREAM81027
Node: DLCL_STREAM83000
Node: STREAM_STREAM83874
Node: DG_STREAM84732
Node: Using Netperf to Measure Request/Response85413
Node: Issues in Request/Response87731
Node: Options Common to TCP UDP and SCTP _RR tests90104
Node: TCP_RR95128
Node: TCP_CC97528
Node: TCP_CRR99762
Node: UDP_RR100824
Node: XTI_TCP_RR103128
Node: XTI_TCP_CC103711
Node: XTI_TCP_CRR104216
Node: XTI_UDP_RR104728
Node: DLCL_RR105305
Node: DLCO_RR105458
Node: SCTP_RR105610
Node: Using Netperf to Measure Aggregate Performance105746
Node: Running Concurrent Netperf Tests106725
Node: Issues in Running Concurrent Tests110974
Node: Using --enable-burst112483
Node: Using Netperf to Measure Bidirectional Transfer119352
Node: Bidirectional Transfer with Concurrent Tests120483
Node: Bidirectional Transfer with TCP_RR122839
Node: Implications of Concurrent Tests vs Burst Request/Response125223
Node: The Omni Tests127036
Node: Native Omni Tests128083
Node: Migrated Tests133360
Node: Omni Output Selection135465
Node: Omni Output Selectors138446
Node: Other Netperf Tests166164
Node: CPU rate calibration166599
Node: UUID Generation168966
Node: Address Resolution169681
Node: Enhancing Netperf171657
Node: Netperf4173151
Node: Concept Index174055
Node: Option Index176381
End Tag Table
0707010003bb99000041ed0000000000000000000000024f45c9f100000000000000b500010002ffffffffffffffff0000001300000000root/usr/local/bin 0707010003bb9a000081ed0000000000000000000000014f45c14a00030e88000000b500010002ffffffffffffffff0000001b00000000root/usr/local/bin/netperf ELF R4
4 ( 4 4 o X* X* X* X* @ , , /usr/lib/ld.so.1
" $ % ' * , - . / 0 2 4 6 8 9 <