[rabbitmq-discuss] Difference betweeen rabbitmqctl and management plugin
Matthias Radestock
matthias at rabbitmq.com
Thu Aug 23 04:31:25 BST 2012
Seth,
On 23/08/12 02:12, Seth Mason wrote:
> Hello, I'm getting different results from the management API than I am
> from rabbitmqctl when looking at memory.
>
> GET /api/queues/test?columns=name,memory
> [
> {
> "memory": 17280,
> "name": "queueone"
> },
> {
> "memory": 7656,
> "name": "queuetwo"
> }
> ]
>
>> rabbitmqctl list_queues -p test -q name memory
> queuetwo 21952
> queueone 58560
>
>
> Is the API returning a different stat than rabbitmqctl or did I miss
> some documentation somewhere?
The stats for the management API are gathered through passive sampling -
queues etc send stats to a collector at regular intervals when active
and the query retrieves the stats from the collector.
The stats for rabbitmqctl are gathered by a direct query of the
resources involved.
What you are observing above is most likely due to difference in
hibernation behaviour induced by the different strategies.
Just before a queue goes into hibernation (due to being idle) it
compacts some of its state, and then sends a final stats report to the
collector. Those stats will then be returned by the management API for
the entire duration the queue is hibernating.
By contrast, rabbitmqctl will wake up hibernating queues, which a) is
expensive and b) increases their memory footprint (until they hibernate
again).
Matthias.
More information about the rabbitmq-discuss
mailing list