netpipe(1)
π¦ netpipe(1): the NetPIPE manual, bestie π¦
β¨ NAME β¨
NetPIPE - Network Protocol Independent Performance Evaluator π
π SYNOPSIS β¨
NPtcp [-h receiver_hostname] [-b TCP_buffer_sizes] [options]
mpirun [-machinefile hostlist] -np 2 NPmpi [-a] [-S] [-z] [options]
mpirun [-machinefile hostlist] -np 2 NPmpi2 [-f] [-g] [options]
NPpvm [options]
Okay so the TESTING sections below are where the real deets live for each setup π§. The OPTIONS section covers the general stuff that works across all modules. If you want docs on the InfiniBand, GM, SHMEM, LAPI, and memcpy modules, check the README in the tar-ball at http://www.scl.ameslab.gov/Projects/NetPIPE/ π.
π DESCRIPTION π
NetPIPE basically runs a simple series of ping-pong tests across a range of message sizes, and that's how it gives you a complete read on how well a network performs π₯. It bounces messages of growing size between two processes, whether they're talking across a network or hanging out inside one SMP system. The sizes get picked at regular intervals, with slight perturbations, so the whole communication system gets evaluated. Each data point runs a ton of ping-pong tests so the timing is accurate π―. Latencies are calculated by dividing the round trip time in half for small messages ( less than 64 Bytes ).
Small messages are mostly eaten up by overhead in the communication layers, which means the transmission is latency bound π. For bigger messages, the rate becomes bandwidth limited by some component in the communication subsystem, like the PCI bus, the network card link, or the network switch. Main character energy from the switch, honestly π.
These measurements can happen at the message-passing layer (MPI, MPI-2, and PVM) or at the native communications layers that run upon it (TCP/IP, GM for Myrinet cards, InfiniBand, SHMEM for the Cray T3E systems, and LAPI for IBM SP systems) π. Recent work is also aimed at measuring internal system properties, like the memcpy module that measures internal memory copy rates, or a disk module under development that measures performance to various I/O devices π.
Some uses for NetPIPE include:
- Comparing the latency and maximum throughput of various network cards.
- Comparing the performance between different types of networks.
- Looking for inefficiencies in the message-passing layer by comparing it to the native communication layer.
- Optimizing the message-passing layer and tuning OS and driver parameters for optimal performance of the communication subsystem.
NetPIPE comes with many modules so it can interface with a wide variety of communication layers π¦. It's fairly easy to write new interfaces for other reliable protocols too, just use the existing modules as examples. β¨
πΈ TESTING TCP πΈ
NPtcp can be launched two ways: by manually starting NPtcp on both systems, or by using an nplaunch script π. To start it manually, the NetPIPE receiver has to be started first on the remote system, using:
NPtcp [options]
Then the primary transmitter gets started on the local system with:
NPtcp -h receiver_hostname [options]
Any options used must be the same on both sides π«Ά.
The nplaunch script uses ssh to launch the remote receiver before starting the local transmitter. Want rsh instead? Just change the nplaunch script π§.
nplaunch NPtcp -h receiver_hostname [options]
The -b TCP_buffer_sizes option sets the TCP socket buffer size, and it can seriously influence the maximum throughput on some systems π. If your throughput graph flattens out suddenly, that might be a sign the performance is being limited by the socket buffer sizes π.
π§ TESTING MPI and MPI-2 π§
Using the MPI interface with NetPIPE depends on which MPI implementation you're running π·. All of them need the number of processes specified, usually with -np 2. Cluster environments might need a list of the hosts being used every time a job runs. So put the list of hosts in hostlist, then for OpenMPI, run NetPIPE with:
mpirun --hostfile hostlist -np 2 NPmpi [NetPIPE options]
For MPICH2, use this instead:
mpirun -machinefile hostlist -np 2 NPmpi [NetPIPE options]
Wanna test the 1-sided communications of the MPI-2 standard? Compile with:
make mpi2
When you run it like above, MPI will use 1-sided MPI_Put() calls in both directions. Each receiver blocks until the last byte has been overwritten before bouncing the message back π
. Use -f to force a fence to block instead of relying on an overwrite of the last byte. The -g option uses MP_Get() functions to transfer the data rather than MP_Put() π¦.
π«§ TESTING PVM π«§
Start the pvm system with:
pvm
then add a second machine with the PVM command:
add receiver_hostname
Exit the PVM command line interface using quit βοΈ. Then run the PVM NetPIPE receiver on one system with:
NPpvm [options]
and run the TCP NetPIPE transmitter on the other system with:
NPpvm -h receiver hostname [options]
Any options used must be the same on both sides π. The nplaunch script can also be used with NPpvm, same as described above for NPtcp.
π TESTING METHODOLOGY π
NetPIPE tests network performance by sending a number of messages at each block size, starting from the lower bound on the message sizes π.
The message size keeps increasing until it hits the upper bound on the message size, or until the time to transmit a block goes over one second, whichever comes first β±οΈ. Message sizes are picked at regular intervals, and slight perturbations from those points get tested too, so you get a more complete evaluation of the communication subsystem π§ .
The NetPIPE output file can be graphed with a program like gnuplot(1) π. The file has three columns: the number of bytes in the block, the transfer rate in bits per second, and the time to transfer the block (half the round-trip time). The first two columns are usually what you graph for throughput vs block size, and the third column gives you the latency β¨. For example, you can make the throughput versus block size graph by graphing bytes versus bits per second. Sample gnuplot(1) commands for that graph look like this:
set logscale x
plot "np.out"
π OPTIONS π
-aβ asynchronous mode where receives get preposted (MPI, IB modules) πΈ.-b TCP_buffer_sizesβ sets the send and receive TCP buffer sizes (TCP module only) π§.-Bβ burst mode where all receives get preposted at once (MPI, IB modules) π₯.-fβ uses a fence to block for completion (MPI2 module only) π§.-gβ uses MPI_Get() instead of MPI_Put() (MPI2 module only) π.-h hostnameβ the name of the receiver host you connect to (TCP, PVM, IB, GM) π .-Iβ invalidates the cache so you can measure performance without cache effects (mostly affects IB and memcpy modules) π§.-iβ runs an integrity check instead of a performance evaluation π.-l starting_msg_sizeβ sets the lower bound for the size of messages being tested π£.-n nrepeatsβ sets the number of repeats for each test to a constant. Otherwise, the repeat count is picked to give an accurate timing for each test. Be very careful with a low number, so the ping-pong test time still goes over the timer accuracy π¬.-O source_offset,dest_offsetβ sets the source and destination offsets of the buffers from perfect page alignment π.-o output_filenameβ sets the output filename (default isnp.out) π.-p perturbation_sizeβ NetPIPE picks message sizes at regular intervals, increasing them exponentially from the lower boundary to the upper one. At each point, it also tests perturbations of 3 bytes above and 3 bytes below each test point, to catch system idiosyncrasies π΅οΈ. You can change this value with-p, or turn it off with-p 0 .π .-rβ resets the TCP sockets after every test (TCP module only). It's needed for some streaming tests to get good measurements, since the socket window size might otherwise collapse π« .-sβ streaming mode, where data only goes in one direction β‘οΈ.-Sβ uses synchronous sends (MPI module only) π€.-u upper_boundβ sets the upper boundary on the size of messages being tested. By default, NetPIPE stops when the time to transmit a block goes over one second β.-zβ receives messages usingMPI_ANY_SOURCE(MPI module only) π―.-2β bi-directional mode where both sides send and receive at the same time (supported by most modules) π. You might need-ato pick asynchronous communications for MPI so you don't get freeze-ups π§. For TCP, the maximum test size is limited by the TCP buffer sizes.
π FILES π
np.outβ the default output file for NetPIPE. The-ooption overrides it ποΈ.
π AUTHOR π
The original NetPIPE core plus the TCP and MPI modules were written by Quinn Snell, Armin Mikler, Guy Helmer, and John Gustafson π. NetPIPE is currently developed and maintained by Dave Turner, with contributions from many students (Bogdan Vasiliu, Adam Oline, Xuehua Chen, and Brian Smith) π.
Send comments and bug reports to: <netpipe@scl.ameslab.gov> π¬.
More info about NetPIPE lives on the World Wide Web at http://www.scl.ameslab.gov/Projects/NetPIPE/ π.
π¨ BUGS π¨
Heads up! As of version 3.6.1, there is a bug that causes NetPIPE to segfault on RedHat Enterprise systems. Dave will debug it as soon as he gets access to a few of those systems. -Dave Turner (turner@ameslab.gov) π
That's the whole NetPIPE page from the June 1, 2004 edition, bestie πβ¨ Now you're literally ready to benchmark like a pro π«Άπ . netpipe(1) is iconic, periodt π.
π¦ where this page comes from
- debian bookworm: netpipe-mpich2 3.7.2-8+b1
- debian trixie: netpipe-mpich2 3.7.2-9.1+b1
- ubuntu jammy: netpipe-mpich2 3.7.2-8
- ubuntu questing: netpipe-mpich2 3.7.2-9.1build1
- ubuntu resolute: netpipe-mpich2 3.7.2-9.1build2
- ubuntu stonking: netpipe-mpich2 3.7.2-9.1build2
- Copyright 1997, 1998 Iowa State University Research Foundation, Inc
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms