[collectd] [PATCH] Random write timeout for rrdtool plugin

Mariusz Gronczewski xani666 at gmail.com
Tue Aug 18 13:08:30 CEST 2009


> That's true. However, (unless I'm missing something, didn't have a
> coffee yet ;-)) that should only make a difference during start-up -
> after some iterations both approaches should behave quite similar,
> right?
Nope. Because with your approach it works like that
1.Start
2.Pull all (last_value-first_value) >CacheTimeout and push it into write queue
3.At that point last_value=first_value for all cached entries
3.write it at calculated rate to disk
So even tho u save them at different time with predefined writes/s, u
pull all values from cache at same time so their timeout is
"synchronized" with eachother (and still last value will get written
in 2*cache timeout). But idea of autotuning writes per sec is nice ;]

But when u add random number to Cache Timeout, some of values get
pulled bit earlier, some of them will get pulled a bit later and after
few cycles it will spread nicely.

For your approach to work you would have to pull values from cache and
push it to write queue at calculated rate, not push all values to
write queue at once and dequeue it at calculated rate. Which is I
think more complicated to write. But yes, if u do that like that it
should be quite similar.

Regards
Mariusz



More information about the collectd mailing list