ipbench - latency test

About the test

The ipbench latency test allows you to measure latency between a number of distributed clients and a target device.
The aim is to keep the load on each client low, so it can make accurate measurements, regardless of the load on the target.

Running the test

Client Machine

The client machine need only be running the ipbenchd daemon.

Controller

Running the test

There are a number of options that can be passed to the test.  The options should be passed with the --test-args command line paramater in a simple "command=value,command1=value1" format (note no whitespace).   The test options are

Argument
Description
Example
Default
Notes
bps|Mbps
Throughput to attempt in bits per second or millions of bits per second for each client (i.e. total to attempt is  this argument * number of clients)
bps=100000000
Mbps=100
10Mbps

size
Size of message in bytes
size=1024
100
Small packet sizes will increasingly not work with increasing throughputs.  Experimentation is best, but be careful about things like fragmentation that may effect results.
sockopts
Set socket options on the client.  You can currently set most standard socket options with this command.  See the socket (7) man page for more details about these options.
  • SO_KEEPALIVE
  • SO_REUSEADDR
  • SO_BROADCAST
  • SO_NODELAY
  • SO_LOWDELAY
  • SO_THROUGHPUT
  • SO_SNDBUF=number
  • SO_RCVBUF=number
  • SO_SNDLOWAT=number
  • SO_RCVLOWAT=number
  • SO_SNDTIMEO=number
  • SO_RCVTIMEO=number
Options should be separated with a semi-colon (;)
sockopts=SO_NODELAY;SO_RCVBUF=16384
N/A

warmup
Warmup time in seconds
warmup=20
5
If you are using the companion test, make sure you pass the same warmup and cooldown times with the --target-args command so the target knows what results to ignore.

cooldown
Cooldown time in seconds
cooldown=20
5
socktype
Socket type (UDP or TCP)
socktype=udp
tcp

drop
Time before considering a UDP packet dropped, in seconds
drop=5
2


Test output

The test output is a simple list of comma separated numbers in the following format

Requested Throughput,Achieved Throughput,Sent Throughput,Packet Size,Min,Avg,Max,Standard Deviation,Median

Measure
Description
Units
Notes
Requested Throughput
The throughput requested with the bps argument
bits per second

Achieved Throughput
(The number of packets received * the packet size) / (test time)
bits per second
Each client works out its achieved throughput, the total shown is the sum of each client's individal throughput
Sent Throughput
(The number of packets sent * the packet size) / (test time)
bits per second
This allows you to determine two things
  • If the sent throughput is not almost exactly equal to the requested throughput, then the sending machine (s) could not keep up with the requested rate.
  • If the sent throughput is not almost exactly equal to the achieved throughput then the other end is dropping packets and hence can not keep up.
Packet Size
Size of packets sent
bytes

Min
Minimum latency measured
microseconds
Each client returns all of its data to the controller where these figures are calculated.
Avg
Average latency measured
microseconds
Max
Maxiumum latency measured
microseconds
Standard Deviation
Standard deviation of measured latencies.
microseconds
Median
Median latency
microseconds

Target Machine

The target machine need only be running a standard echo service.  There are a number of ways you can achieve this.
  1. Enable the echo service via inetd
  2. There are two included stand-alone echo servers, tcp-echo and udp-echo.  These are in doc/programs
If you want to measure CPU usage on the target machine with the latency companion test, the ipbenchtd daemon must be running on it.   Specify the hostname of the target machine  with the --target option, and pass in arguments via --target-args.  There are only two arguments, warmup and cooldown; these should be passed as mentioned above.

Example

See the example run