[rabbitmq-discuss] Memory grows very fast

Matthias Radestock matthias at rabbitmq.com
Tue May 14 12:22:06 BST 2013

On 14/05/13 08:13, rabbit15 wrote:
> This is my status output
> ./rabbitmqctl status
> Status of node rabbit at katlabucs2 ...
> [{pid,6225},
>   {running_applications,
>       [{rabbitmq_perfmon,"Embedded Rabbit Perfmon","0.0.0"},

What is that? I suggest you remove it, in order to eliminate it as a 
potential source of the memory usage.

>        {rabbitmq_tracing,"RabbitMQ message logging / tracing","3.1.0"},
>        {rabbitmq_management,"RabbitMQ Management Console","3.1.0"},

I suggest you disable these two for testing.

>   {erlang_version,
>       "Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:24:24]
> [async-threads:30] [hipe] [kernel-poll:true]\n"},

I suggest you upgrade to R16B.

>   {memory,
>       [{total,31946238720},
>        {connection_procs,526019096},
>        {queue_procs,3060711792},
>        {plugins,1325624},
>        {other_proc,1414282513},
>        {mnesia,820584},
>        {mgmt_db,14060336},
>        {msg_index,262032},
>        {other_ets,3983176},
>        {binary,26892354848},
>        {code,18609290},
>        {atom,703377},
>        {other_system,13106052}]},

That's a lot of memory for 600k messages of 609 bytes.

Here's what I'm seeing on my system:

$ rabbitmqctl list_queues -q
amq.gen-Gy2b_JHk7bMO3qi_4aSEkg	600000
$ rabbitmqctl status -q
                         {mnesia,"MNESIA  CXC 138 12","4.8"},
                         {os_mon,"CPO  CXC 138 46","2.2.11"},
                         {xmerl,"XML parser","1.3.3"},
                         {sasl,"SASL  CXC 138 11","2.3.1"},
                         {stdlib,"ERTS  CXC 138 10","1.19.1"},
                         {kernel,"ERTS  CXC 138 10","2.16.1"}]},
  {erlang_version,"Erlang R16B (erts-5.10.1) [source] [64-bit] [smp:8:8] 
[async-threads:30] [hipe] [kernel-poll:true]\n"},

As you can see, that's using just ~900MB of memory.

I used the MulticastMain program that ships with the Java client for 

$ runjava.sh com.rabbitmq.examples.MulticastMain -q 1 -n 2 -s 609 -C 600000

You may want to try that too, in order to ascertain whether the results 
differ from your own test program.



More information about the rabbitmq-discuss mailing list