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, writters 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 writters 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.
For further information, consult the RabbitMQ [runtime](https://www.rabbitmq.com/runtime.html documentation).