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

Sebastian Harl sh at tokkee.org
Mon Aug 17 11:13:15 CEST 2009


Hi again,

On Mon, Aug 17, 2009 at 11:09:42AM +0200, Sebastian Harl wrote:
> On Mon, Aug 17, 2009 at 02:20:29AM +0200, Mariusz Gronczewski wrote:
> > i was thinking how to "spread out" writes to rrd files a bit, because
> > now its big spike every CacheTimeout or little smaller "square" on
> > graph if u use WritesPerSecond. So ive written little patch which
> > "spreads out" writing by changing Cache timeout every time rrdtool
> > plugin finds data to save. Basically instead of moving data older than
> > CacheTimeout to write queue it moves it if its older than CacheTimeout
> > +- RandomTimeout.
> 
> Hrm … I'm not sure about the benefits from that. By using 'WritesPer-
> Second' you should be able to limit I/O to some amount that's feasibly
> for you hard-drive and thus you should be able to limit the impact on
> your system to a reasonable value. I don't see any disadvantages from
> those "square spikes" as long as the hight of those spikes is within
> reasonable limits.
> 
> Anyway, OTOH, I think think it hurts to introduce some option like that.
                  ^
                  that's supposed to be "don't", of course
> 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?

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/20090817/ea2eb142/attachment.pgp 


More information about the collectd mailing list