Comment 0 for bug 1908043

Revision history for this message
Trent Lloyd (lathiat) wrote :

RabbitMQ by default allows itself to use up to 40% of installed RAM, based on the default setting vm_memory_high_watermark.relative (0.4 = 40%).

Once that watermark is hit, it attempts to free RAM by flushing messages to disk instead of RAM (while blocking clients). Various details of this are explained here: https://www.rabbitmq.com/memory.html

On our current deployments memory is not limited, and RabbitMQ takes this value from the full amount of host RAM - so tries to use up to 40% of 256GB/512GB/768GB. It also does not take HugePages into account, so even if 90% of RAM is permanently allocated to hugepages it does not reduce it's configuration.

The charm should expose and configure a better default watermark based on vm_memory_high_watermark.absolute instead set to some kind of sensible value which should be determined, some number of GB. We could also consider whether RabbitMQ will see and respect an LXD memory limit or if not try to have the charm detect such a limit.