[rabbitmq-discuss] RabbitMQ 1.6.0 Memory Usage

Gavin M. Roy gmr at myyearbook.com
Thu Sep 24 14:35:24 BST 2009

On Thu, Sep 24, 2009 at 4:57 AM, Matthias Radestock <matthias at lshift.net>wrote:

> Gavin,
> Next time this happens I suggest you gather some diagnostics with
>  rabbitmqctl list_queues name messages_ready messages_unacknowledged
> consumers

I made sure there were no messages in the stack, but since it's still
hanging out with the memory allocated:

[root at mq07 ~]# /opt/rabbitmq/sbin/rabbitmqctl list_queues name
messages_ready messages_unacknowledged
Listing queues ...
Notification 0 0

If the consumer count is 0 then there are no consumers. If you have a
> consumer count above 0 and a messages_ready count above 0, and the
> broker appears to be idle, then that is a good indication that the
> consumers are there but stuck and the tcp connection to them is backlogged.

Yeah I pulled off the consumers when it was done to see if that was why the
memory wasn't given back.

lsof and netstat do not indicate any open sockets (in any state) to Rabbit
from the consumer box.

> It is quite common for a gc'ed VM to hold on to large chunks of memory
> instead of handing them back to the OS.

Is it safe to assume the VM will make use of what it's holding on to and
it's not a leak of some sort?

> Are you monitoring queues with rabbitmqctl or Alice? If that happens
> more frequently than once per second then the queue processes are kept
> active, which delays the freeing up of memory.

Primarily Alice, and the monitor interval I am using is ~10 seconds.

> To get some diagnostics on where the memory has gone, shell into rabbit
> (erl -sname shell -remsh rabbit@<hostname>) and run
>  memory().

[root at mq07 ~]# erl -sname shell -remsh rabbit at mq07
Erlang R13B (erts-5.7.1) [source] [64-bit] [smp:8:8] [rq:8]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.1  (abort with ^G)
(rabbit at mq07)1> memory().
(rabbit at mq07)2>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090924/b62eff4e/attachment.htm 

More information about the rabbitmq-discuss mailing list