Guide · RabbitMQ

The RabbitMQ Performance Tuning Guide

Ten checks, in the order that finds the problem fastest. Most slow RabbitMQ clusters are not misconfigured brokers: they are under-provisioned hosts, slow disks, or applications that open a connection per message. The thresholds here are the ones published in RabbitMQ's production deployment guidelines for the 4.3 series, checked on 20 September 2026.

Tyler Eastridge

By Tyler Eastridge, Head of Operations

LinkedIn · Updated

5 min read10 sections
On this page
Tuning in one paragraph

Tuning in one paragraph

Measure first, then work outward from the host to the application. Give each node at least 4 cores, 4 GiB of RAM and fast local storage. Keep the memory watermark between 0.4 and 0.7, set disk_free_limit to about the size of the watermark, and allow 50,000 or more file descriptors. Make connections and channels long-lived, separate publishers from consumers, and stop polling. Tune prefetch against measured consumer utilisation. Put large backlogs on streams and durable work on quorum queues. Check the network with the bandwidth formula, and split into separate clusters before node counts reach double digits.

Measure before you change anything

Most RabbitMQ tuning fails because the change was made before the bottleneck was found. Get three things on a graph first: publish and deliver rates per queue, publisher confirm latency measured in the application, and node-level CPU, memory, disk latency and network throughput. RabbitMQ's own production guidelines put it bluntly: monitoring, benchmarking and measuring are required to find the best setting for an environment. Then reproduce the load with PerfTest, the RabbitMQ team's load-testing tool, so that each change is tested against the same traffic.

Check the hardware floor

The documented production minimum per node is 4 CPU cores and 4 GiB of RAM, with no other data service or I/O-heavy application on the host. RabbitMQ was not designed for single-core environments. A surprising share of slow clusters turn out to be under this floor or sharing a host with a database.

Storage matters more than it used to, because quorum queues and streams are built for durable storage with stable latency. Prefer local SSD or NVMe to network-attached storage, never share a data directory between nodes, and do not put node data on a distributed filesystem: the storage layer assumes local fsync semantics that those filesystems often do not honour.

Set the memory watermark deliberately

By default a node stops accepting new messages when it uses more than 60% of available memory (vm_memory_high_watermark.relative = 0.6). The recommended range is 0.4 to 0.7. Going above 0.7 is the classic false economy: the operating system and filesystem need at least 30% of memory for the page cache, and starving them causes paging that slows every disk operation the broker makes. If publishers are being blocked, the fix is almost always faster consumers or more nodes, not a higher watermark.

Raise the disk free limit

The default disk_free_limit is 50 MB, a value chosen so that RabbitMQ boots on small development partitions. In production it is far too low: a node that runs out of disk fails writes and can lose data. The guideline is to set the limit to roughly the size of the memory watermark, so a node with a 4 GB watermark gets disk_free_limit.absolute = 4G. Overprovision the disk as well, because quorum queues and streams do not always reclaim space from consumed messages quickly.

Raise the open file handle limit

Every connection and every queue uses file descriptors. Allow at least 50,000 for the RabbitMQ user. The sizing rule from the documentation: take the 95th percentile of concurrent connections, multiply by two, and add the number of queues. Limits as high as 500,000 cost almost nothing and are recommended for production. A node that hits this limit stops accepting connections, which looks like a performance problem and is not one.

Fix connection and channel behaviour in the applications

Application behaviour is the largest single source of RabbitMQ performance problems, and no broker setting compensates for it. The rules are few. Connections and channels should be long-lived: opening a connection per message is expensive and causes connection churn that exhausts file handles and memory. Use separate connections for publishing and consuming, so consumers are not caught in flow control applied to a publisher. Do not set heartbeat timeouts below 5 seconds, which produces false disconnects under load. Use the client library's automatic connection recovery where it exists. And avoid polling with basic.get; it is inherently inefficient compared with a subscribed consumer.

Tune prefetch and acknowledgements

Prefetch is the consumer-side setting with the most effect on throughput. Too low and consumers sit idle waiting for the network; too high and one slow consumer hoards messages while others starve, and memory climbs with the unacknowledged backlog. Start from the processing time per message, measure consumer utilisation, and adjust. Acknowledge in batches where ordering allows it.

Match the queue type to the workload

Queue type sets the performance ceiling. Quorum queues replicate and flush every write, so their throughput falls as replica count rises; replicate to a majority of nodes rather than all of them on larger clusters. Streams were designed for throughput and large backlogs and use little broker memory, at the cost of queue features such as dead-lettering. Classic queues are for transient work only. A queue that must hold millions of messages is a stream, not a bigger quorum queue.

Check the network can carry the load

The documentation gives a rule of thumb for the minimum bandwidth each node needs: 95th percentile message rate, times 95th percentile message size, times 110% for protocol overhead, times 8 bits. At 20,000 messages a second and 6 KB payloads that is just over 1 gigabit per second, before replication traffic between nodes. TLS adds measurable CPU cost on both broker and clients, so include it in the benchmark rather than adding it afterwards.

Scale the cluster the right way

Use an odd number of nodes so a majority is always identifiable. More nodes help with connection counts, provided a load balancer spreads the connections. They do not help indefinitely: all metadata is replicated to every node and most metadata changes are synchronous, so the cost of each declaration grows with cluster size. The documented advice for anyone heading toward double-digit node counts is to split the system into independent clusters instead.

Frequently asked questions

How do I improve RabbitMQ performance?

In order: measure publish and deliver rates, confirm latency and node resources; confirm each node has at least 4 cores, 4 GiB of RAM and fast local disks; fix application behaviour such as connection churn and polling; tune consumer prefetch; and choose the right queue type. Broker settings matter less than application behaviour and storage.

What should vm_memory_high_watermark be set to?

The default is 0.6 and the recommended range is 0.4 to 0.7. Values above 0.7 starve the operating system page cache and usually make performance worse. If publishers are being blocked, add consumer capacity or nodes rather than raising the watermark.

What is the right disk_free_limit for production?

The 50 MB default is for development. Set it to about the same size as the memory high watermark, for example 4G on a node with a 4 GB watermark, and overprovision the disk.

How many file descriptors does RabbitMQ need?

At least 50,000. Size it as twice the 95th percentile of concurrent connections plus the number of queues. Values up to 500,000 are inexpensive and recommended for production.

Does adding nodes make RabbitMQ faster?

It raises connection capacity if a load balancer spreads clients across nodes. It does not raise the throughput of a single queue, and quorum queue throughput falls as replicas are added. Very large clusters slow metadata operations, so beyond about ten nodes use separate clusters.

RabbitMQ services

Where this gets done

The work behind this page, run by the same engineers who wrote it.

More resources

Other RabbitMQ guides, comparisons and research

From the blog

Recent RabbitMQ articles

Next step

Need this done on your cluster?

AceMQ's senior RabbitMQ engineers support 130+ enterprise clients in 26+ countries under a 15-minute emergency SLA, with direct escalation to the RabbitMQ core team.