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

Mariusz Gronczewski xani666 at gmail.com
Mon Aug 17 11:21:50 CEST 2009

> 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.
> 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.


More information about the collectd mailing list