Manage Learn to apply best practices and optimize your operations.

Cache maintenance key to server performance

Tools for getting the best performance.

Most administrators tend to set up a file system's cache and then forget about it. However, you can squeeze better performance from your server if you optimize your cache from time to time. You should check your cache to see if it still contains the file systems you want. If not, you might want to modify or recreate the cache. In Solaris, for example, there are several commands that let you display cache information, check a cache's consistency, check a file system's integrity, and delete or add file systems to the cache.

Assuming that you are using the /etc/vfstafb file to mount file system, in order to edit the file systems you would edit the entries for those file systems in the vfstab file. When you are using the AutoFS function, you can change file system options for the cache as part of the AutoFS amps. To specify a cache file system in the AutoFS map you need to add a line to the auto_direct map as a superuser.

Several commands are useful in your work of maintaining your file-system cache. The cfsadmin command will display information about the cache and its file systems, as well as allowing you to delete a file system from a particular cache. The cachefsstat command will show you statistical information about a file system, displaying information contained in the cache itself. The cachefspack command lets you specify which files and directories to pack into the cache.

If you suspect you have an integrity problem with your cache, you can check the integrity and perform repairs using the fsck –F cache {-m} {-o noclean} cache_directory command.

Use the cachefswssize to determine if the log file's data suggests that you alter the cache size. You can also use the cachefslog command to view what is being logged to the cache log file, and to suspend logging, if desired. If you suspect that poor log performance is an issue, you can use the cachefslog command to move the log file to a faster disk or one with more available space.

Barrie Sosinsky is president of consulting company Sosinsky and Associates (Medfield MA). He has written extensively on a variety of computer topics. His company specializes in custom software (database and Web related), training and technical documentation.

Dig Deeper on Linux servers

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.