NFS Performance Tuning for HP-UX 11.0 and 11i Systems

nfs performance tuning for hp-ux 11.0 and 11i systems page 83
Notes:
Page 83July 22, 2002
Copyright 2002 Hewlett- Packard Company
cachefs
Application Binary Caching Solutions
(part 1)
cat(1) Solution
Ø cat(1) the application binary across the CacheFS filesystem and
write it to /dev/null or /dev/zero
Ø Ex: cat /opt/netscape/netscape > /dev/null
Where “/opt/netscape” is the CacheFS-mounted filesystem
Ø Forces CacheFS to read the entire binary file in a single
contiguous chunk
Ø Once the cache is populated, the binary will remain cached
following unmounts and reboots, and all requests for this file will
be satisfied from the cache
Ø Painful to implement on large numbers of clients with many
diverse applications
One way to guarantee that CacheFS stores an application binary, or any other
type of file, in a single contiguous collection of disk space is to read the entire
target file across the CacheFS mount point via the cat(1) command. For example:
cat /cfs_mount/myprog > /dev/null
Using cat in this manner forces CacheFS to read the entire “myprog” file
sequentially, consuming only one slot in the allocation map. Remember, the map
entries consist of a starting offset value and a length field. Therefore, if a 20MB file
is read sequentially across a CacheFS mount, the file can be represented in one
slot (i.e. starting offset = 0, length = 20MB). Once the cat command completes, the
client system has a complete copy of the “myprog” binary in its local filesystem.
This cached binary will survive a CacheFS filesystem unmount or a client reboot.
This is not a very practical solution in most CacheFS environments because there
are typically hundreds, or even thousands, of NFS clients to distribute applications
to, and in many cases the clients will run different sets of applications.