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
|