How to Run Performance Tests

Locating the Performance Tests

Following executables form ØMQ performance tests suite:

  • inproc_lat
  • local_lat
  • remote_lat
  • inproc_thr
  • local_thr
  • remote_thr

When building ØMQ using autotools (configure/make-style) performance tests executables will be located at the same directory level as the perf subdirectory (not inside).

When building ØMQ using Microsoft Visual Studio, performance tests will be located in bin subdirectory.

Running Latency Test

Latency test consists of local_lat and remote_lat. These are to be placed on two boxes that you wish to measure latency between.

First start local_lat. Specify address to bind to, message size and number of roundtips that message has to pass during the test:

$ local_lat tcp://eth0:5555 1 100000

Then start remote_lat. Specify address where local_lat is running, message size and roundtrip count:

$ remote_lat tcp://192.168.0.111:5555 1 100000

You'll get something like the following report:

message size: 1 [B]
roundtrip count: 100000
average latency: 30.915 [us]

Note that latency reported is the one-way latency, not the latency of the roundtrip.

Also note that latency is strongly dependent on your network setup and topology.

To run an inter-thread latency test, use inproc_lat instead of the above. It is a single executable and doesn't require specifying an endpoint:

$ inproc_lat 1 100000

Running Throughput Test

Throughput test consists of local_thr and remote_thr. These are to be placed on two boxes that you wish to measure throughput between.

First start local_thr. Specify address to bind to, message size and number of messages to pass between the boxes:

$ local_thr tcp://eth0:5555 1 100000

Then start remote_lat. Specify address where local_lat is running, message size and message count:

$ remote_thr tcp://192.168.0.111:5555 1 100000

You'll get something like the following report:

message size: 1 [B]
message count: 1000000
mean throughput: 5554568 [msg/s]
mean throughput: 44.437 [Mb/s]

Note that throughput in terms of megabits per second can be easily computed from message size and message throughput. Still, throughput test does the computation for you.

To run an inter-thread throughput test, use inproc_thr instead of the above. It is a single executable and doesn't require specifying an endpoint:

$ inproc_thr 1 100000