Skip to content

Benchmarking of the messaging C-libs for zmq and nanomsg

Notifications You must be signed in to change notification settings

medizinmensch/msg-benchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZMQ vs nanomsg Benchmarking for XREQ / XREP

Benchmarking of C-Libraries for both ZMQ (czmq) as well as nanomsg for a XREQ/XREP pattern.

Similar to a XPUB/XSUB pattern which utilizes multiple publisher and subscriber nodes, this XREQ/XREP has multiple processes sending messages to a single master process via a router/proxy process.

How to run (Unix)

Make sure have the czmq and/or the nanomsg library installed. You can compile and execute yourself, or you directly start with the benchmark which will take care of everything itself.

Compilation

Compiles czmq or nanomsg and saves in the ./dist folder. Example:

./compile.sh czmq|nanomsg

Running

Runs proxy, master and a number of clients with a url (tcp (both) or ipc(nanomsg)) for a msg size up to 2^x. Example:

./run.sh frontend_url backend_url amount_of_clients biggest_msg_size_exponent czmq|nanomsg
# Exanmple:
./run.sh "tcp://localhost:5559" "tcp://localhost:5560" 1 20 czmq

Benchmark

The Benchmarking script will compile and run on your behalf.

You need 4 Arguments:

  1. target (czmq or nanomsg)
  2. Protocoll (ipc or tcp)
  3. maximum amount of clients as power (base is 2)
  4. The power of the biggest msg size you want to send (base is 2)\n" printf 'A good starting point would me: \n\t: ./benchmark.sh czmq ipc 4 16\n\t-> Results in a max msg size of 64KiB and 128 clients\n' printf 'Note that this cmq implementation does not does not with IPC.\n\n'

Example:

./benchmark.sh czmq ipc 2 12

You can pipe > to_some_file.txt to save the results. Do a regex ^(?![GE]).*\n to get rid of all non-csv data and import it into the tool of your choice.

About

Benchmarking of the messaging C-libs for zmq and nanomsg

Resources

Stars

Watchers

Forks