In this recipe, we will appreciate some steps useful to obtain the maximum performance from RabbitMQ. We will cover the following topics:
The
vm_memory_high_watermark
configuration (http://www.rabbitmq.com/memory.html)Erlang High Performance Erlang (HiPE) (http://erlang.org/doc/apps/hipe/)
The vm_memory_high_watermark
configuration is the maximum percentage of the system memory used to cache messages before they are consumed or cached to the disk.
Before the limit is reached, by default, at fifty percent of vm_memory_high_watermark
, (or properly setting the vm_memory_high_watermark_paging_ratio
parameter, set to 0.5
by default), RabbitMQ will start to move messages from memory to on-disk paging space.
If neither this paging mechanism, nor the consumers are able to keep pace with the producers, the limit will be reached, and then RabbitMQ will block the producers.
In some cases, it is possible to enlarge these parameters, in order to avoid starting to page messages to the disk too...