I am using a single instance of RabbitMQ on a kubernetes cluster. The RabbitMQ pod has access to 15Go of RAM and is setup with a high watermark of 10Go.
After a few hours of usage (and a few queues storing 60 Millions persistent messages) the UI of RabbitMQ show a usage of 4GB (out of the 10GB high watermark) but the rabbitMQ pod is using almost 12GB of RAM.
Nothing else than RabbitMQ is running on this pod.
Running a ps
command on the pod show that the command /usr/lib/erlang/erts-8.3/bin/beam.smp -W w -A 64 -P 1048576 -t 5000000 -st
is using almost 10GB of memory :
root@rabbitmq-0:/# ps -aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
rabbitmq 1 0.0 0.0 4340 152 ? Ss Apr25 0:00 /bin/sh -e /usr
rabbitmq 131 0.0 0.0 11492 116 ? S Apr25 0:00 /usr/lib/erlang
rabbitmq 266 256 66.7 15384208 10272940 ? Sl Apr25 3596:13 /usr/lib/erlan
rabbitmq 364 0.0 0.0 4220 400 ? Ss Apr25 0:01 erl_child_setup
rabbitmq 376 0.0 0.0 11456 108 ? Ss Apr25 0:00 inet_gethost 4
rabbitmq 377 0.0 0.0 13552 1140 ? S Apr25 0:00 inet_gethost 4
root 406 0.0 0.0 20292 2508 ? Ss+ Apr25 0:00 bash
root 17817 0.0 0.0 20296 3280 ? Ss 14:35 0:00 bash
root 18322 0.0 0.0 17504 2068 ? R+ 15:05 0:00 ps -aux
Is this difference between 4GB and 10GB normal or a memory leak?
rabbitmqctl report
command result :
{memory,
[{total,4165388576},
{connection_readers,677672},
{connection_writers,282352},
{connection_channels,1721776},
{connection_other,2916512},
{queue_procs,2559842512},
{queue_slave_procs,0},
{plugins,7852776},
{other_proc,33485720},
{mnesia,120680},
{metrics,12540648},
{mgmt_db,5339864},
{msg_index,142928},
{other_ets,19053856},
{binary,1476618400},
{code,24747054},
{atom,1033401},
{other_system,31550241}]},
RabbitMQ 3.6.9, Erlang 19.3