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

Sebastian Harl sh at tokkee.org
Tue Aug 18 09:45:08 CEST 2009


Hi Mariusz,

On Mon, Aug 17, 2009 at 11:21:50AM +0200, Mariusz Gronczewski wrote:
> > Anyway, OTOH, I think think it hurts to introduce some option like that.
> > However, I think we can get rid of that randomness. What you're basical-
> > ly trying to do is to adapt 'WritesPerSecond' to the number of files to
> > be updated and the value of 'CacheTimeout'. We don't need to approximate
> > that but we can even calculate exact numbers.
> >
> > So, I'd suggest to do something along the following lines:
> >
> >  * Introduce a boolean config option called, e.g. 'SpreadWritesPer-
> >   Second' (maybe someone can come up with a better name).
> >  * If that option is set, the current number of writes per second is
> >   determined from the cache size divided by the cache timeout but
> >   limited to 'WritesPerSecond'.
> >
> > What do you think? Any comments?
> 
> Basically i was trying to find some easy way to get uniform
> distribution of writes to disk and both mine and yours idea would
> work, thougth there is one "problem" if u use "autospread" mechanism,
> because if u for example set CacheTimeout to 1800 then first write
> will be after 30 min but last will be close to 60 min, which in my
> case when u add +- 5min of "random" in "worst case" it will be saved
> after 35 min and after few "cycles" distribution of writes will be
> pretty much uniform.

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?

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090818/7ef4a9dd/attachment.pgp 


More information about the collectd mailing list