Matthias Blankenhaus wrote:
Howdy !
Hello.
After tossing several ideas around we ended up with the following proposal. The idea is to control the RRD archives solely via gmetad.conf, more specifically viathe 'rrd_rootdir' variable. It points by default to '/var/lib/ganglia/rrds'. Now, whenever the user modifiesthis value to something like '/dev/shm/rrds' or 'tmpfs' and then restarts gmetad via '/etc/init.d/gmetad restart' we essentialy move the RRD archive around and potentially alter fstab and issue necessary mount commands.
While I love the idea of integrating tmpfs (et al) support into Ganglia, I would vote *against* having ganglia modify /etc/fstab, running mount, etc. Performing these tasks requires root access, and I don't see a need to add this. Instead, I would suggest something a bit more general.
Essentially, provide two new options: "rrd_backupdir" and "rrd_backuptime". If "rrd_backupdir" is set, and is not equal to "rrd_rootdir", then gmetad can do a periodic copy according to the frequency set in "rrd_backuptime".
When gmetad starts, it will try to "restore" the rrd files from "rrd_backupdir" into "rrd_rootdir" (which lives on a ramdisk), and when it shuts down (cleanly!), it will force a copy to non-ramdisk files.
In summary, when gmetad starts up we restore the RRD DB from a FS to memory. When gmetad stops we back it up from memory to a FS. It isdebatable wether a cron job should once in a while back up the RRDs in addition to the gmetad start / stop scenario.
Perhaps having gmetad force a copy when it receives a SIGUSR1, or just implement a simple timer that reads "rrd_backuptime"? And is there any reason why a simple "cp -r /dev/shm/rrds /var/lib/ganglia/" won't work? (I'm trying to think of failure modes, and if there is any special file locking that would have to be done).
-- Jesse Becker NHGRI Linux support (Digicon Contractor)
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
_______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers