[rabbitmq-discuss] RabbitMQ perfomance testing & troubles

Matthias Radestock matthias at lshift.net
Wed Apr 16 13:48:22 BST 2008


Andrew V. Statsenko wrote:
> В Срд, 09/04/2008 в 22:50 +0100, Matthias Radestock пишет:
>> I have some concerns about the "-smp 
>> auto", given how old a version of Erlang/OTP are running. Did you test 
>> that adding the flag indeed improves performance?
> Yes. Then I use -smp flag the Erlang/OTP eating all 8 CPU core, without
> - 1.
> [...]
> I am newbe man in Erlang/OTP system and correctly configuring a local
> cluster 
> is not easy for me. With SMP mode beam.smp can utilize up to 790% off
> this server.

Erlang in SMP mode will indeed happily use all your CPUs. It won't 
necessarily go any faster though. In our experience - and I should 
stress that this is for RabbitMQ and R11B-x only - it doesn't.

You don't need to know anything about Erlang to configure a local 
cluster. Take a look at the http://www.rabbitmq.com/clustering.html - if 
anything isn't clear in those instructions then please let us know ...

OTOH, you should only look into clustering once the other issues have 
been resolved.

>> - The queues are not auto-deleting and aren't being deleted explicitly, 
>> and your queue/exchange naming scheme is deterministic. Unless you 
>> restart the server between tests or subsequent tests will be affected by 
>> the queues from earlier tests. I'd also recommend clearing the mnesia 
>> dir prior to starting rabbit, just to make sure that there aren't any 
>> stray exchanges, queues or persistent messages.
> Well,
> # invoke-rc.d rabbitmq-server stop
> Stopping rabbitmq-server: rabbitmq-server.
> # rm -f /var/lib/rabbitmq/mnesia/rabbit/*
> # invoke-rc.d rabbitmq-server start
> Starting rabbitmq-server: SUCCESS
> rabbitmq-server.

ok. As long as you remember to run that between tests you should be fine.

>> - The consumer explicitly acknowledges each message. Would 
>> bulk-acknowledgment or auto-acknowledgment be an option?
> OK, I was delete the acknowledges each message code
> - // channel.basicAck(envelope.getDeliveryTag(), false);

That's not sufficient. You need to change channel.basicConsume(...) 
invocation to enable auto-ack. Otherwise your above change will result 
in the server hanging on to all messages.

> Well, the I start signle producer/consumer thread all looks good:
> $ sh ./runjava.sh com.rabbitmq.examples.MulticastMain -h host.domain.tld
> -a

You should limit the sending rate with the -r flag. Otherwise the 
producers will flood the server.

> $ sh ./runjava.sh com.rabbitmq.examples.MulticastMain
> -h host.domain.tld -a -x 100 -y 100 | grep recving

Note that this will result in the consumers receiving the messages from 
*all* producers. The program is called "MulticastMain" for a reason :)


More information about the rabbitmq-discuss mailing list