On this page
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.
Related
Where this gets done
The work behind this page, run by the same engineers who wrote it.
- 24/7 RabbitMQ support15-minute emergency SLA, versions back to 3.8.x
- Managed RabbitMQ servicesWe run the brokers, on your infrastructure or hosted
- RabbitMQ consultingArchitecture, migration and remediation from senior engineers
- RabbitMQ health checkEngineer-led assessment with a prioritised fix list
- Extended LTS support for RabbitMQ 3.xCVE backports for versions the community no longer patches
- RabbitMQ commercial licensingTanzu RabbitMQ licences from an authorized Broadcom partner
- RabbitMQ troubleshootingLive incidents and recurring faults
- RabbitMQ upgrades3.x to 4.x, planned and executed in your window
- RabbitMQ migrationsFrom IBM MQ, Kafka, cloud brokers or older RabbitMQ
- RabbitMQ implementation and architectureCluster design, DR and go-live
- RabbitMQ corporate trainingAdmin and developer courses taught by working engineers
Other RabbitMQ guides, comparisons and research
- GuideThe RabbitMQ Reliability Guide: Ten Failure Patterns and Their FixesRead the guide
- GuideThe RabbitMQ Disaster Recovery GuideRead the guide
- GuideThe RabbitMQ on Kubernetes GuideRead the guide
- GuideThe RabbitMQ Migration GuideRead the guide
- GuideThe RabbitMQ Security and Hardening GuideRead the guide
- ComparisonManaged RabbitMQ Options ComparedSee the comparison
- ResearchWhat Breaks in Production RabbitMQ: 145 Support Tickets, 2023 to 2026Read the research
- ResearchRabbitMQ in Production 2026: What 22 Assessed Estates Actually RunRead the research
- ResearchThe RabbitMQ CVE Register, 2026 EditionRead the research
Recent RabbitMQ articles
- RabbitMQ End of Life Dates by Version (3.x and 4.x)Sep 2026
- RabbitMQ Incident Response: The First 15 MinutesSep 2026
- Upgrading RabbitMQ 3.x to 4.x Without DowntimeSep 2026
- RabbitMQ HA & Disaster Recovery: Cluster SizingSep 2026
- What a RabbitMQ Health Check Actually DeliversSep 2026
- VMware Licensing Cost in 2026Sep 2026
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.