next up previous contents index
Next: 6.9 Details of Cache Up: 6 The Object Cache Previous: 6.7 Running a Cache

6.8 Using multiple disks with the Cache

The cache_dir variable (see Section 6.2) only allows you to specify one directory into which cached objects are stored. If you have large caching data requirements (e.g., for scientific data access or if you are running a high-level cache through which many children Caches resolve misses), you may need to have the Cache store data onto several disks. In a future version of Harvest we will provide a way for users to to list multiple cache_dir's and have the Cache cycle through all of them when storing data. For now, you can use one of two ``tricks'' to store cached data on multiple disks.

If you are running under SunOS, the easiest method is to create a memory-based file system using the SunOS tmpfs interface, create a directory on this file system, and then specify this directory in the Harvest cache_dir configuration variable. Next, use the SunOS swapon command to specify additional disks that are used as backing store for the tmpfs specified file system. See the SunOS manpages for tmpfs and swapon for more details.

If you are not using SunOS, you can achieve multiple disk usage with the cache using the following hack: Once the cache is running, remove part of its caching subdirectory structure (the numbered directories under the Cache's data directory), and replace it with one that is spread over multiple file systems. For example, you could do something like this:

        % mkdir /my/other/big/disk/{5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}
        % cached &
        % sleep 5
        % cd /tmp/cache
        % rm -rf {5,6,7,8,9}?
        % ln -s /my/other/big/disk/{5,6,7,8,9}? .



Duane Wessels
Wed Jan 31 23:46:21 PST 1996