Cache File System support

The Cache File System (CacheFS) is a general-purpose file system caching mechanism that improves NFS server performance and scalability by reducing server and network load.

Designed as a layered file system, CacheFS provides the ability to cache one file system on another. In an NFS environment, CacheFS increases the client-per-server ratio, reduces server and network loads and improves performance for clients on slow links, such as Point-to-Point Protocol (PPP).

A cache is created on the client machine so file systems specified to be mounted in the cache can be accessed locally instead of across the network. Files are placed in the cache when a user first requests access to them. The cache does not get filled until the user requests access to a file or files. Initial file requests may seem slow, but subsequent uses of the same files may be faster.

Note:
  1. You cannot cache the / (root) or /usr file systems.
  2. You can mount only file systems that are shared. (See the exportfs command in Commands Reference, Volume 2.)
  3. There is no performance gain in caching a local Journaled File System (JFS) disk file system.
  4. You must have root or system authority to do the tasks in the following table.
Table 1. CacheFS tasks
Task SMIT fast path Command or file
Set up a cache cachefs_admin_create cfsadmin -c MountDirectoryName1.
Specifying Files for Mounting cachefs_mount mount -F cachefs -o backfstype=FileSysType, cachedir=CacheDirectory[,options]     BackFileSystem MountDirectoryName2 or edit /etc/filesystems.
Modify the Cache cachefs_admin_change remove the cache, then recreate it using appropriate mount command options.
Display Cache Information cachefs_admin_change cfsadmin -l MountDirectoryName.
Remove a Cache cachefs_admin_remove
  1. Unmount the file system: umount MountDirectoryName
  2. Determine the cache ID: cfsadmin -l MountDirectoryName
  3. Delete the file system: cfsadmin -d CacheID CacheDirectory
Check File System Integrity cachefs_admin_check fsck_cachefsCacheDirectory3.
Notes:
  1. After you have created the cache, do not perform any operations within the cache directory (cachedir) itself. This causes conflicts within the CacheFS software.
  2. If you use the mount command option to specify files for mounting, the command must be reissued each time the system is restarted.
  3. Use the -m or -o options of the fsck_cachefs command to check the file systems without making any repairs.
  4. After migrating the system to AIX® Version 6.1 or later from previous versions of AIX, old cache file systems that are created in the older version of AIX must be removed and recreated.