[rabbitmq-discuss] Memory Usage in Management API

Arun Rao arunrao.seattle at gmail.com
Fri May 2 20:45:42 BST 2014


Thanks for your response.

I am looking for overall Heap usage stats (Available Heap
(vm_memory_high_watermark), Heap Used) for RabbitMQ server functionality
(excluding Management APIs, etc.,) and Garbage Collection Pause time.

I am trying to index these data into Splunk so I can do post-mortem
analysis. For example, when i see a huge backup of messages (within the
heap limits) in one cluster, after the messages were delivered Erlang would
try to garbage collect, I would like to get visibility into pause time in
this scenario.
Does Erlang use multiple CPUs for garbage collection?

I am sorry I know this is beyond your scope but your thoughts/learnings are
much appreciated.


On Fri, May 2, 2014 at 1:21 AM, Simon MacMullen <simon at rabbitmq.com> wrote:

> These are rather general questions, so it would help a great deal if I
> knew what you were trying to do.
>
>
> On 02/05/2014 08:54, Arun Rao wrote:
>
>> Can someone please clarify the following:
>>
>> 1. Memory Usage (by node) shown in Management API: Sum of
>> total_heap_size of all registered processes (including
>> rabbit_mgmt_agent_sup, rabbit_mgmt_sup etc.,)?
>>
>
> The memory use per node is that reported by erlang:memory(total). This
> includes all processes, registered and unregistered as well as all
> binaries, atoms, ETS tables, code and so on. It's supposed to correspond to
> how much memory is used at the OS level. Sadly in practice it doesn't take
> account of memory fragmentation so it can differ, but it's the closest
> thing Erlang gives us.
>
>
>  2. Where does virtual hosts/exchanges/queues live? Everything related to
>> rabbitmq amqp server functionality is on "rabbit" erlang process?
>>
>
> No, not at all. That process is the top of the tree but there are many
> others. All the objects (i.e. vhosts, exchanges, queues and so on) exist as
> records in Mnesia / ETS tables, and queues also exist as processes.
>
>
>  3. Has anyone had success with erlang:trace? I am trying the following
>> but couldnt get this to work:
>>
>> rabbitmqctl eval
>> 'PID=erlang:whereis(rabbit),erlang:trace(PID,gc_start,info).'
>>
>
> Well, the second argument to trace/3 is a boolean, and the third is a list
> of flags, of which 'info' is not one. But trace/3 is very low level. You
> probably want to use the debugger instead?
>
> Cheers, Simon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140502/ececdab5/attachment.html>


More information about the rabbitmq-discuss mailing list