Introducing the new override rabbitmq_memory_high_watermark

The override rabbitmq_memory_high_watermark can be used to
alter the overall memory consumption of rabbitMQ and more
importantly define when the garbage collection (gc) is happening.
The old default value of 0.4 can lead up to 80% memory usage
during gc which can lead to OOM scenarios.
The new default value is set to 0.2, lowering the maximum memory
usage to 40%

Change-Id: Iedbb459a5d17f16bbb204b0b8e989ae84c77f8a6
This commit is contained in:
Bjoern Teipel 2019-03-11 10:35:00 -05:00
parent 3c40f53f5e
commit 6f5946d2cc
3 changed files with 23 additions and 0 deletions

View File

@ -115,6 +115,9 @@ rabbitmq_ssl_self_signed_subject: "/C=US/ST=Texas/L=San Antonio/O=IT/CN={{ ansib
rabbitmq_async_threads: 128
rabbitmq_process_limit: 1048576
# Limit memory consumption of the erlang VM
rabbitmq_memory_high_watermark: 0.2
# RabbitMQ collect statistics interval
rabbitmq_collect_statistics_interval: 5000

View File

@ -0,0 +1,19 @@
---
features:
- |
The override ``rabbitmq_memory_high_watermark`` can be used to set the
maximum size of the erlang Virtual Machine before the garbage collection
is triggered. The default is lowered to ``0.2``, from ``0.4`` as the
garbage collection can require 2x of allocated amount during its
operation. This can result in a equivalent use of ``0.4``, resulting in
40% of memory usage, visible to the rabbitMQ container. The original
default setting of ``0.4`` can lead to 80% memory allocation of rabbitMQ,
potentially leading to a scenario where the underlying Linux kernel
is killing the process due to shortage of virtual memory.
upgrade:
- |
The rabbitMQ high watermark is set to ``0.2`` rather than ``0.4`` to
prevent possible OOM situations, which limits the maximum memory usage
by rabbitMQ to 40% rather than 80% of the memory visible to the rabbitMQ
container. The override ``rabbitmq_memory_high_watermark`` can be used
to alter the limit.

View File

@ -14,6 +14,7 @@
{fail_if_no_peer_cert,false}]}
{% if rabbitmq_cluster_partition_handling != 'ignore' %},{cluster_partition_handling, {{ rabbitmq_cluster_partition_handling }}}{% endif %}
{% if rabbitmq_hipe_compile | bool %},{hipe_compile, true}{% endif %}
,{vm_memory_high_watermark, {{ rabbitmq_memory_high_watermark }}}
]},
{rabbitmq_management, [{rates_mode, {{ rabbitmq_management_rates_mode }} }] }
].