Disk Free limit relative to total instead of allocated memory - RabbitMQ Conf

677 views
Skip to first unread message

Nicolas Mylle

unread,
Oct 28, 2019, 12:40:54 PM10/28/19
to rabbitmq-users
Hello,

I was recently configuring production servers in order to have the maximum safety in case of failure. I followed this documentation https://www.rabbitmq.com/production-checklist.html aswell as other standards from my firm.

I configured :
vm_memory_high_watermark.relative=0.66

As recommended in the doc i did not got to more that 0.7, and the doc is both clear and good, considering the server needs some memory to perform operations others than rabbit.

but for the 
disk_free_limit.relative = 2.0
Which is the recommended configuration for maximum safety, i don't understand.
This limit is using the TOTAL memory of the server, instead of the memory allocated to rabbitmq. I don't understand that. Considering the disk_free_limit is recommended to be twice the memory allocated to rabbitmq in order to be able to save all operations in case of a shutdown, what would be the point to have a disk_free_limit relative to the TOTAL memory of the server instead of the memory ALLOCATED ?

I need to understand why it is like this in order to provide the best configuration to my production servers.

Best regards,

Nicolas

Luke Bakken

unread,
Oct 28, 2019, 3:03:03 PM10/28/19
to rabbitmq-users
Hi Nicolas,

Considering the disk_free_limit is recommended to be twice the memory allocated to rabbitmq...

Where exactly did you read the above statement? The word "allocated" is not used anywhere on the production checklist page.

Using a disk free limit twice the amount of total memory guarantees there will be space available for RabbitMQ to start up should the entire contents of RAM (impossible, since RMQ won't use 100% of RAM) have to be flushed to disk.

In your case, feel free to calculate the maximum allocated value for RabbitMQ, double that, and use that as the disk free space value. Or, just use 2.0 if you have the space available.

Thanks,
Luke

Nicolas Mylle

unread,
Oct 29, 2019, 5:12:03 AM10/29/19
to rabbitmq-users
Hi Luke,


What i don't understand, is the reason for the {disk_free_limit, {mem_relative, 2.0}} to be relative to the total memory on the server instead of the memory that is really allocated to rabbitmq. Admitting i need to flush the entire content of Rabbitmq's RAM i don't understand why the mem_relative is relative to the total ram of the server instead of the Rabbitmq's RAM. I have a server that has 96GB of RAM, 66% of it is allocated to rabbitmq. The difference is huge between having to get a 126 GO disk for rabbit or a 200Go, and it is just for safety, not even for storage.

Thanks for your time !
Nicolas

Luke Bakken

unread,
Oct 29, 2019, 10:04:55 AM10/29/19
to rabbitmq-users
Hi Nicolas,

I was pretty clear in my response as to the reason for the safety of using total memory and a value of 2.0.

If you don't want to use 2.0, use a value based on the 66% allocation to RabbitMQ... 2.0 * (0.66 * 96) = 126GiB of free space, like you mention.

Thanks,
Luke

Nicolas Mylle

unread,
Oct 29, 2019, 10:10:01 AM10/29/19
to rabbitmq-users
Hi Luke,

It is not clear to me. I think we missunderstood, I'm not here to whine about the RabbitMQ product, I just want to understand why it is like it is in order to get the best conclusions for my needs.

Best Regards,

Nicolas
Reply all
Reply to author
Forward
0 new messages