Problem
What's the latency and throughput of my OpenAMQ installation?
Explanation
1. Get 0MQ source code from Subversion
$ svn checkout http://svn.fastmq.org/svn/zeromq/trunk zeromq
2. Build 0MQ with performance testing framework
$ cd zeromq
$ ./autogen.sh
$ ./configure --with-perf
$ make
3. Build OpenAMQ tests
$ export IBASE=...
$ export PATH=$PATH:$IBASE/bin
$ export BOOM_MODEL=mt,release
$ cd perf/tests/openamq
$ c -l -p local_lat.cpp
$ c -l -p remote_lat.cpp
$ c -l -p local_thr.cpp
$ c -l -p remote_thr.cpp
4. Run the broker on box A
$ amq_server
5. Run latency test
a.) Run local executable on box B (server is running on box A, message size is 1 byte, test consists of 100,000 iterations)
./local_lat A 1 100000
b.) Run remote executable on box C (server is running on box A, message size is 1 byte, test consists of 100,000 iterations)
./remote_lat A 1 100000
c.) local_lat reports average end-to-end latency for OpenAMQ
6. Run throughput test
a.) Run local executable on box B (server is running on box A, message size is 1 byte, test consists of 1,000,000 iterations, we are using single stream of messages)
./local_thr A 1 1000000 1
a.) Run local executable on box C (server is running on box A, message size is 1 byte, test consists of 1,000,000 iterations, we are using single stream of messages)
./remote_thr A 1 1000000 1
c.) local_thr reports average throughput for OpenAMQ
Comments
Edit | Files | Tags | Source | Print
Author
Martin Sustrik <moc.qmtsaf|kirtsus#moc.qmtsaf|kirtsus>
All tutorials
Performance Tests: This tutorial explains how to do OpenAMQ performance tests using 0MQ performance testing framework.
Broker federation: How to setup a geographically distributed federation of OpenAMQ brokers and how to define dataflows between individual geographical locations.
The ESB cookbook: How to implement your own Enterprise Service Bus, step by step, using OpenAMQ.
Publishing contents: How to publish contents at high speed without bizarre memory issues.
Tuning OpenAMQ for low latency: How to tune your operating system and hardware to get the lowest latency, i.e. the best response times, from your OpenAMQ broker.
The mandatory and immediate flags: How to use the 'mandatory' and 'immediate' flags on the Basic.Publish method.
Load balancing: How to use OpenAMQ to distribute work between multiple applications, a technique called "load balancing".
Content based routing: How to route messages based on their header properties. It is a fast and simple way to do 'content based routing' without needing to inspect entire messages. We explain the principles and provide worked examples.
Transient or durable subscriptions: How to make subscriptions that are transient (come and go with their consuming applications) or durable (stay around).
The AMQ model: How the AMQ model works: this is a basic backgrounder for anyone starting to use OpenAMQ in their applications.
Developing on Windows: How to build OpenAMQ client applications using MSVC on Windows
Handling Ctrl-C in applications: How to properly detect an interrupt (Ctrl-C) and shut-down gracefully in C/C++ WireAPI applications.






