[rabbitmq-discuss] Simple client/server running on different OS are lagging

Matthew Sackman matthew at lshift.net
Tue Feb 2 16:48:17 GMT 2010

Hi Frank,

On Tue, Feb 02, 2010 at 04:26:58PM +0000, Matthew Sackman wrote:
> Not really too sure what to suggest, but others on the list have
> reported better throughput when increasing buffers in Rabbit

Also, you're using the python client, to do performance testing, which
is a little questionable - in our experience the python clients tend to
perform badly. I'd suggest you test using our Java client which contains
an example program called MulticastMain which is pretty flexible for
testing performance and sustainable throughput.

>From the rabbitmq-java-client directory:
ant clean dist
cd build/dist
sh runjava.sh com/rabbitmq/examples/MulticastMain -s 1000000 -r 25 -a -z 20 -q 1

where the -s parameter specifies the size, in bytes, the -r parameter
specifies the sending rate, -a turns on auto-ack, which you may want for
this, -z says how long to run the test for (in seconds) and -q sets the
qos on the consumer to 1.

This will create one producer and one consumer on the same box. You
should vary the rate (-r) until the sending rates and receiving rates
are balanced and sustainable (I tend to watch the reported latencies -
if they keep increasing, then it's not balanced).

Other if you just provide -? then it'll print out all the options. If
you want to use different machines for producer and consumer then you
can use -x 0 to turn off producers, and -y 0 to turn off consumers on
each box respectively. If you do do that, then you'll also need to
specify at least -e to name the exchange, and likely set -t to fanout
otherwise it'll attempt to use a private queue of the default direct
exchange and thus not route messages to the consumer. Also, start the
consumer first.

So, the consumer might look like this:

sh runjava.sh com/rabbitmq/examples/MulticastMain -s 10000000 -r 1 -a -z 20 -q 1 -x 0 -e my_exchage -t fanout

whilst the producer looks like:

sh runjava.sh com/rabbitmq/examples/MulticastMain -s 10000000 -r 1 -a -z 20 -q 1 -y 0 -e my_exchage -t fanout

These certainly work for me.


More information about the rabbitmq-discuss mailing list