a9s Messaging Resources Considerations
This document describes concerns and limitations to be considered when allocating resources for your a9s Messaging plans.
Disk and Memory Usage
RabbitMQ uses both disk and memory to store queues, and some configuration parameters might affect
the performance and usability. a9s Messaging configures the process with
vm_memory_high_watermark.relative = 0.42 and
vm_memory_high_watermark_paging_ratio = 0.5, when
the process starts using more than half of
42% of the total memory (
21% of the total memory),
RabbitMQ starts to move messages from memory to the disk.
E.g., in a
2GB of memory machine, with
1GB of persistent disk, your total memory usage for
RabbitMQ would be
860MB. If this limit hits, users connection will be blocked until there is
memory available again. Bear in mind that the garbage collector and other internal RabbitMQ
processes can take up to double the current memory usage. Memory for a9s Logstash, a9s Backup
Agent, and a9s Consul must also be reserved.
Once usage hits
430MB, messages start to get moved to the disk, giving a maximum of
available space (shared across connections, messages, etc.) for the RabbitMQ process, right before
the writers connections start to get blocked. Still, before this reaches this critical point,
a9s-parachute should kick in (when storage hit
80%), and the process will be stopped.
Keep in mind that the disk space is also shared with durable and lazy queues.
Furthermore, RabbitMQ requires
(disk_free_limit_mem_relative * total memory) GB as reserved disk
space in order to ensure proper function. The default value for the
parameter is 1.5, the minimum recommended value is 1.0. E.g. when
is set to 1.0 in a
10GB of memory machine, with
15GB of disk space the actual usable disk
space is around
5GB. When the available disk space is under this threshold the messaging broker
will start blocking clients.
For further information, consult the RabbitMQ [runtime](https://www.rabbitmq.com/runtime.html documentation).