pcp
[Top] [All Lists]

Re: [pcp] Floating point problem

To: Brendan Gregg <bgregg@xxxxxxxxxxx>
Subject: Re: [pcp] Floating point problem
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu, 31 Jul 2014 08:59:57 +1000
Cc: Martin Spier <mspier@xxxxxxxxxxx>, pcp@xxxxxxxxxxx, Amer Ather <aather@xxxxxxxxxxx>, Coburn Watson <cwatson@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <CAJN39oi=_+NkcsKGcuVdiqT=m8cqoB0wF6v1xakSOPQmYdV4-g@xxxxxxxxxxxxxx>
References: <CAEp4+dU2kE9JJztBPc=N5oSyoEyBvN5Of19rohC3DxXGeomuRw@xxxxxxxxxxxxxx> <033501cfa8a4$fd091ed0$f71b5c70$@internode.on.net> <CAEp4+dUH6fEQ2E=o5O2q8LKfR2xUypM-AeOwQhWy9sEntvO-AQ@xxxxxxxxxxxxxx> <53D6CE6A.8030309@xxxxxxxxxxxxxxxx> <CAJN39oi=_+NkcsKGcuVdiqT=m8cqoB0wF6v1xakSOPQmYdV4-g@xxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0
On 31/07/14 08:00, Brendan Gregg wrote:
..

I actually like 2. It's simple.

I'd like to not just fetch per-second metrics, but possibly other
intervals at the same time, including per-hour and per-day. And possibly
from multiple clients. And possibly ad-hoc queries. With 2, I simply
stash away whatever cumulative values and timestamp pairs, and use them
later when needed.

Excellent.

2. is more consistent with the PCP philosophy where rate conversion (which is but one form of aggregation) is preferably the domain of the clients consuming the performance data, rather than the producers of the data.

You'll need to stash the timestamps from the fetches also to do the rate conversion (or other temporal averaging) based on the consistent timestamps at the source of the data.

If you start to do serious aggregation, you'll also need the metadata to know if a metric is a counter or not and to allow correct scaling, e.g. to get the units of time for the CPU metrics, so you can scale as required before dividing by the delta in the timestamps.

This has all be done before (as Frank points out!), so lemme know if you need any assistance.

<Prev in Thread] Current Thread [Next in Thread>