[rabbitmq-discuss] Statistics gathering

Simon MacMullen simon at rabbitmq.com
Thu Jul 25 12:28:15 BST 2013

On 25/07/2013 10:45AM, Flavio Pompermaier wrote:
> Yes, probably what I need is to correctly set those two parameters:
>   - sample_retention_policies
>   - collect_statistics_interval

It's not obvious to me that you want to change collect_statistics_interval.

> Are they strictly related or they serve different purposes?

Well, they both have to do with statistics.

collect_statistics_interval controls how frequently the various 
components in RabbitMQ emit stats events. It therefore controls the 
maximum possible resolution of stats you can get. The expectation is 
usually that you would leave it alone, but if you had a huge number of 
not-quite-idle queues / channels / connections you might want to 
increase it so that your server does not spend all its time emitting 
stats events.

sample_retention_policies controls how long the management plugin holds 
onto statistics, and with what resolution. You might want to change this 
if you want it to hold statistics for longer.

> How do I ask for global/basic/detailed cumulative stats (like those
> collected by sample_retention_policies)?

Those names refer to different classes of stats you can get through the 
web UI / HTTP API. See 
http://www.rabbitmq.com/management.html#sample-retention for the mapping.

> I think that I need those metrics..
> With a small collect_statistics_interval (1 s) I have more precise data
> but more overhead on the broker,


> but changing this parameters require also to change
> sample_retention_policies right?


> Or it just run every 5 s and thus collects 5 samples (for default global
> conf for example)..?

Not sure what you mean. If collect_statistics_interval is shorter than 
the shortest resolution in sample_retention_policies you'll be doing 
more work for no gain.

Cheers, Simon

> Best,
> Flavio
> On Thu, Jul 25, 2013 at 11:28 AM, Simon MacMullen <simon at rabbitmq.com
> <mailto:simon at rabbitmq.com>> wrote:
>     On 24/07/2013 6:17PM, Flavio Pompermaier wrote:
>         have you ever tried to set statistics interval to something like
>         a week?
>     I assume you mean sample_retention_policies (i.e. how long we hold
>     stats for) rather than collect_statistics_interval (i.e. how
>     frequently the broker should emit stats for the management plugin to
>     collect).
>     No I haven't, although you should be fine as long as you reduce the
>     resolution for data that's held for longer. Or put up with increased
>     memory use.
>         Does it affect performance?
>     Shouldn't do particularly.
>     Cheers, Simon

More information about the rabbitmq-discuss mailing list