Another strategy that I use is to create a file big enough to hold my rrd files and mount it via the loopback device as my rrd filesystem. This has the effect of keeping your database files stored on your disk permanently, even when rebooting, but reduces the updating of the thousands of small rrd files every few seconds to just updating one file on your hard drive. It also uses your system's memory for file buffering to greatly reduce the number of disk I/O operations which is one of the major problems that people have with the computer that is running gmetad to monitor a large cluster.
For example, to make a 256MB file do: $ dd if=/dev/zero of=/usr/gmetad/rrds.img bs=1024 count=262144 Then format the file: $ mke2fs -F /usr/gmetad/rrds.img And finally mount it: $ mkdir /usr/gmetad/rrds $ mount -t ext2 -o loop /usr/gmetad/rrds.img /usr/gmetad/rrds To make this more permanent, just add the following line to your /etc/fstab file: /usr/gmetad/rrds.img /usr/gmetad/rrds auto loop 0 0 ~Jason On Fri, 2002-12-06 at 10:48, Andreas Hirczy wrote: > Phil Radden <[EMAIL PROTECTED]> writes: > > > On Mon, 2 Dec 2002, Thomas Davis wrote: > > > The problem is certainly the disk I/O though; I've managed to get the > > monitoring up and running nicely onto a ramdisk, and the load does indeed > > drop to zero as you suggest. > > > > So my next query: is there a good strategy for getting reliable snapshots > > of rrd databases so that I can run to a ramdisk but have a persistent > > copy, only a minute or five out-of-date, which I can go back to if the > > monitoring box goes down? I note from the archives that others have gone > > the ramdisk route, so this is presumably a solved problem... > > I have modified the startup script to run > > GMEDIR=/var/lib/ganglia > ... > mount -t tmpfs -o size=50M,nr_inodes=10k,uid=99,gid=99 tmpfs $GMEDIR/rrds > tar -C $GMEDIR -xf $GMEDIR/rrds.tar > > just before starting the gmetad daemon and > > tar -C $GMEDIR -cf $GMEDIR/rrds.tar rrds/ > umount $GMEDIR/rrds > > after stoping gmetad. You could run "tar ... cf ..." every minute, but i don't > value this data that much - saving every hour is enough for me. > > Andreas -- /------------------------------------------------------------------\ | Jason A. Smith Email: [EMAIL PROTECTED] | | Atlas Computing Facility, Bldg. 510M Phone: (631)344-4226 | | Brookhaven National Lab, P.O. Box 5000 Fax: (631)344-7616 | | Upton, NY 11973-5000 | \------------------------------------------------------------------/

