pcp
[Top] [All Lists]

Re: [pcp] Calculated/derived metrics?

To: Marko Myllynen <myllynen@xxxxxxxxxx>
Subject: Re: [pcp] Calculated/derived metrics?
From: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Date: Fri, 8 May 2015 14:16:08 -0400
Cc: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>, pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <554CC4ED.4090209@xxxxxxxxxx>
References: <5534EBA8.4030509@xxxxxxxxxx> <1644393599.3651017.1429563442835.JavaMail.zimbra@xxxxxxxxxx> <55364606.1000503@xxxxxxxxxx> <55472B40.7050800@xxxxxxxxxx> <5547DE11.5050800@xxxxxxxxxxxxxxxx> <5549E4CD.5000408@xxxxxxxxxx> <554AFE4E.80000@xxxxxxxxxxxxxxxx> <y0mwq0kf7mm.fsf@xxxxxxxx> <554BEB16.7030208@xxxxxxxxxxxxxxxx> <554CC4ED.4090209@xxxxxxxxxx>
User-agent: Mutt/1.4.2.2i
Hi -

On Fri, May 08, 2015 at 05:15:09PM +0300, Marko Myllynen wrote:
> [...]
> >> Is the rate() derived-metrics function applicable here?
> > 
> > If I understand Marko's requirement he'd like to get something close to
> > the I/O rate of the process over its life, rather than over the last
> > time period (hotproc.io.write_bytes by itself will give you the latter,
> > as will rate(hotproc.io.write_bytes) in a derived metric).
> 
> yes, I think there are certainly use cases for both, in this particular
> case I was thinking checking e.g. with pmval or pmdumptext "hot"
> processes' I/O activity for an application which does its I/O in bursts,
> with rate() most often the result would be zero but with value() it'd
> give instantly some sort of general idea what app has been up to
> I/O-wise (so it'd be a perfect match for this derived convenience metric).

So you still want rate, but smoothed or over a longer time period.  A
counter-value() operator seems like a good expedient, but a longer
term and more robust (overflow-aware etc.) way would be to have a
rate(metric,'10 minutes') or exponential_smooth(rate(metric),0.9)
types of things.

(Probably this and the pmie expression syntaxes should be unified.)


- FChE

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