How to check RABBITMQ_DISTRIBUTION_BUFFER_SIZE
search cancel

How to check RABBITMQ_DISTRIBUTION_BUFFER_SIZE

book

Article ID: 293164

calendar_today

Updated On:

Products

VMware RabbitMQ

Issue/Introduction

Background:

The RABBITMQ_DISTRIBUTION_BUFFER_SIZE is an environment variable used in RabbitMQ, that determines the maximum number of messages that can be held in the distribution buffer at any given time. When the buffer reaches its capacity, RabbitMQ will start back pressuring the publishers, meaning it will slow down or stop accepting new messages until there is space available in the buffer.

When the buffer is hovering around full capacity, nodes will log a warning mentioning a busy distribution port (busy_dist_port):
 
2019-04-06 22:48:19.031 [warning] <0.242.0> rabbit_sysmon_handler busy_dist_port <0.1401.0>

Increasing buffer size may help increase throughput and/or reduce latency. 

​​To set the RABBITMQ_DISTRIBUTION_BUFFER_SIZE in RabbitMQ, you can follow the steps here.

Question: How to check the current RABBITMQ_DISTRIBUTION_BUFFER_SIZE

Resolution

Here are a couple of ways to check the current RABBITMQ_DISTRIBUTION_BUFFER_SIZE
 
The DISTRIBUTION_BUFFER_SIZE is a value that's converted into an Erlang VM flag, -zdbbl. So the command below can be used to check the value.
 
ps aux | grep beam | grep zdbbl

The following command can also be used to get the value from the running node.
 
rabbitmqctl eval 'erlang:system_info(dist_buf_busy_limit).'

References:

Inter-node Communication Buffer Size
Erlang Flags