[rabbitmq-discuss] Optimizing RabbitMQ

Emile Joubert emile at rabbitmq.com
Wed Aug 15 12:07:16 BST 2012


On 14/08/12 21:32, Tom Wrigg wrote:
> Is there a way to turn off acknowledgements? would this make things faster?

Yes, you can consume in auto-ack mode. Or you can impact performance
much less and get the advantages of acknowledgements if you acknowledge
messages in batches.

> Are there any other methods I could use to increase speed/ reduce latency?

Here are some suggestions, which you should benchmark with your own

Use a larger prefetch count. Small values hurt performance.

A topic exchange is slower than a direct or a fanout exchange.

Make sure queues stay short. Longer queues impose more processing overhead.

If you care about latency and message rates then use smaller messages.
Use an efficient format (e.g. avoid XML) or compress the payload.

Experiment with HiPE, which helps performance.

Avoid transactions and persistence. Also avoid publishing in immediate
or mandatory mode. Avoid HA. Clustering can also impact performance.

You will achieve better throughput on a multi-core system if you have
multiple queues and consumers.

Use at least v2.8.1, which introduces flow control. Make sure the memory
and disk space alarms never trigger.

Virtualisation can impose a small performance penalty.

Tune your OS and network stack. Make sure you provide more than enough
RAM. Provide fast cores and RAM.


You may also want to look at the blog entries that pertain to performance:



More information about the rabbitmq-discuss mailing list