Designing a High Performance Network File Server

5
Tip: No two customer environments are identical
There will always be differences in application mix, server hardware, CPU
load, networking infrastructure, etc. It is therefore important to understand
as much about the customer environment and application mix when
deciding which of the following recommendations to use in any specific
customer environment.
Filesystem Considerations
The parameters used when initially creating and subsequently tuning the filesystems can make a huge
difference in application performance. This customer’s application involves thousands of threads
spending the majority of their time reading from very large files. For this reason the parameters
selected to create and tune the target filesystem were designed to help these very large files reside in
as few VxFS extents as possible. By building the files using a small number of large extents,
contention for the kernel locks protecting filesystem data structures is greatly reduced, thus allowing
huge numbers of threads to perform read requests in parallel from these extents more efficiently.
Filesystem Initial Creation
The block size of a VxFS filesystem is determined when the filesystem is created and cannot be
changed without rebuilding the filesystem. The default block size varies depending on the physical
size of the filesystem. Since the customer’s application using this filesystem addresses very large files,
the largest block size (bsize) was selected. Also, as this system is an NFS server, using the largest
supported VxFS intent log (logsize) is also desirable.
The bsize and logsize parameters may be specified on the mkfs_vxfs(1M) command line:
# mkfs –F vxfs –o bsize=8192, logsize=2048, <options> <device file>
These options ensure the smallest unit of data stored in the filesystem will reside in an 8K block and
that each filesystem extent will be at least 8K large, since extents consist of one or more disk blocks.
Finally, the intent log used to keep track of metadata changes, should be sized as large as possible.
Filesystem Tuning
VxFS provides a set of tunable parameters that control various aspects of I/O behavior. The actual
list of available parameters varies with each version of the VxFS filesystem. The vxtunefs(1M)
command is used to display and modify these tunable parameters. Any desired parameter settings
may be stored in the /etc/vx/tunefstab file so that they are automatically enabled at filesystem
mount time. Each individual filesystem may have a unique set of parameter values or you can specify
a global set used by all VxFS filesystems. The VxFS mount command reads the
/etc/vx/tunefstab file, if present, and configures any specified parameters for the filesystem
being mounted. Additionally, vxtunefs may be used while the filesystems are mounted. Any
changes made to the I/O parameters against currently mounted filesystems take effect immediately.
For more details, see the vxtunefs(1M) and tunefstab(4) manual pages.
Most applications perform well with these parameters set to the default values. However, in cases
where you are able to determine (or just happen to know) the type of I/O requests your applications
generate, you can very often tune the underlying filesystems to improve the performance of these
applications.