[rrd-developers] rrdcached shutdown
Sebastian Harl
sh at tokkee.org
Thu Sep 25 18:25:44 CEST 2008
Hi,
On Wed, Sep 24, 2008 at 08:35:12PM +0200, Tobias Oetiker wrote:
> Today kevin brintnall wrote:
> > Currently the daemon can take a long time to shut down, because it flushes
> > all updates out to RRDs... If it's part of a system shutdown, then it
> > will likely take too long and receive a SIGKILL.
Imho, the init script should take care of that and wait for the daemon
to shut down completely. The same applies for the rrdtool plugin of
collectd as well (in fact, the caching code in collectd is very similar
to the rrdcached implementation; it was written by the same person after
all ;-)) - see [1] for the Debian collectd init script that handles long
shutdown times.
[1] http://git.tokkee.org/?p=pkg-collectd.git;f=debian/collectd.init.d;hb=HEAD
> > If we are journaling updates, it's not strictly necessary to flush all
> > RRDs out to disk.. When the daemon starts back up it can re-create its
> > memory state with the journal.
I don't think this is a good idea. When shutting down the daemon, I'd
expect it to finish it's job - e.g. I might not want to restart the
daemon, so I would lose data in that case. I agree that this is probably
a very uncommon case but I'm sure there are quite a few other examples
and I don't want to risk data loss even in very uncommon situations.
> > What do you think about an expedited shutdown if we are journaling
> > updates? We could simply flush the journal and exit.
>
> this would make sense to me ... maybe have different behaviour
> depending on the signal it gets ?
That won't work in this case. You cannot catch SIGKILL.
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: 189 bytes
Desc: Digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20080925/9f7b7a9a/attachment.bin
More information about the rrd-developers
mailing list