pcp
[Top] [All Lists]

Re: Archive interpolation mode question

To: pcp@xxxxxxxxxxx
Subject: Re: Archive interpolation mode question
From: "Nathan Scott" <nathans@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Jun 2000 10:38:09 -0500
In-reply-to: Michal Kara <lemming@xxxxxxxxxxxxxxxxxxx> "Archive interpolation mode question" (Jun 9, 1:41am)
References: <20000608150505.23607@xxxxxxxxxxxxxxxxxxx>
Sender: owner-pcp@xxxxxxxxxxx
hi,

On Jun 9,  1:41am, Michal Kara wrote:
> Subject: Archive interpolation mode question
>    Hello!
> 
>    I have added archive mode to PCPMON. It works fine, but when I use the
> "interpolation" mode, PCP refuses to fetch first two (or three?) metrics

(i think you mean the first 2/3 values for metrics, not the first
2/3 metrics?)

> from the archive. I guess it is because the interpolation algorithm needs few
> previous values, I just want to be sure. 
> 

pfft - which bit of the code in libpcp/src/interp.c didn't you
understand?  (all of it?  join the club!!)  8-)

this is truly complex stuff ... Ken may have it in him to offer
the real truth on this stuff when he gets back from his trip
(cos he wrote this code, as noone here will ever let him forget ;)
but these are just some of the factors off the top of my head
(i'm sure theres heaps more, like counter wrap) which affect
archive mode, with interpolation mode switched on:

- the semantics of the metric (counter/discrete/instant) - counters
need to be handled very differently cos we're rate converting them

- the "delta" argument to pmSetMode ... and where the values
fall (timestamps) in the archive wrt where each delta ends as
we step through the timespan covered by the archive.  you can
see how counters become complex here cos we need to pick two
values just before the start and just before the end of the
delta (i think!?!) in order to rate convert 'em, whereas for the
other types we need to get the value closest to the end of the
delta (hmm .., i'm not 100% on how this calculation is done,
but conceptually it should be something like the above ...
another scheme would be to average the values between the start
and end of the deltas ... just not sure exactly what we do here)

- the "when" argument to pmSetMode ... whereabouts (timewise) in
the archive we're starting (before the first value, just
after it, right on it, or somewhere else entirely, for example)

- whether we're going forwards or backwards in the archive

- ...and probably a few other things too.

>                                       Thanks,
>                                          Michal Kara
> 
> P.S.: If it is as I think, it would be nice to leave a note in pmSetMode(3)
> manpage.

this could easily be the subject of a lengthy white paper, i'm sure.

cheers.

-- 
Nathan

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