[rrd-developers] Accelerator Daemon

Florian Forster rrdtool at nospam.verplant.org
Fri Jul 4 14:58:28 CEST 2008


Hi everybody,

time for an update on the status of that caching daemon. In case you
don't feel like searching the old mails for the address: You can get the
patch (against the current trunk of the SVN repository, revision 1444)
from
<http://verplant.org/temp/rrdtool-trunk-rrd_update_with_cache.patch>

On Tue, Jun 24, 2008 at 10:13:29PM +0200, Florian Forster wrote:
> The current status is:
> - `rrdcached' understands the `update' and `flush' commands. The daemon
>   is nowhere near production ready, though: There is no PID file, the
>   base directory `/tmp' is hard coded and I've generally done only
>   little testing.

- There are four commands now:
  * UPDATE - add values to a file/node in the cache.
  * FLUSH  - write all cached values to disk.
  * HELP   - list of commands and usage summary for each command
  * STATS  - some performance values
- An PID file is written, its location can be specified using `-p'.
- The base directory can be specified using `-b'.

> - `rrdtool fetch' understands the `--daemon' option, too. I've changed
>   `rrd_fetch_fn' to take an additional `use_rrdcached' argument. If
>   given, the daemon is told to flush the file before it is read.[2]

- The following commands of the `rrdtool' application (and their
  appropriate non-threadsafe C-API counterparts) understand the
  `--daemon' command line option and the `RRDCACHED_ADDRESS' environment
  variable:
  * fetch
  * update
  * graph
  * xport
- The `rrd_fetch_r' function has been reverted to its original form, so
  that the interface remains unchanged.
- The `rrd' and `rrd_th' libraries export the following new symbols.
  * rrdc_connect
  * rrdc_disconnect
  * rrdc_flush
  * rrdc_update
  The symbols are declared in the `rrd_client.h' header file which is
  installed using `make install'.

- The rrdfetch(1), rrdgraph(1), rrdupdate(1), and rrdxport(1) manual
  pages have been updated to document the `--daemon' command line
  argument and the `RRDCACHED_ADDRESS' environment variable.
- The daemon itself is documented in the rrdcached(1) manual page -
  including its operation, security considerations, the protocol used
  and commands implemented.

I've fixed the following issues recently, if you experienced them,
please try again:
- Due to a copy'n'paste error the daemon did not catch and handle
  SIGTERM correctly.
- Tree nodes are now deleted if the file isn't updated anymore.
- The entire tree if flushed to disk before shutdown.
- Threads created to handle connections were never joined, eventually
  causing the daemon to no longer accept connections.

Fortunately, my to-do-list has become quite short:
- Implement a C-API function for the `STATS' command.
- Document the functions in `rrd_client.h'.

Now it's time for testing, so I hope some of you find this interesting
enough to give it a try. I'll do my share, but I'll probably won't find
all problems by myself..

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- 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/20080704/b010a709/attachment.bin 


More information about the rrd-developers mailing list