Veritas File System performance tuning and monitoring.

book

Article ID: 100021327

calendar_today

Updated On:

Resolution

Before making any changes to Veritas™ File System (VxFS) file system parameters consider the following information.
 
The performance of a file system can be enhanced by a suitable choice of I/O sizes and proper alignment of the I/O requests based on the requirements of the underlying special device. VxFS provides tools to tune the filesystems.
 
Note: The following tunables and techniques work on a per file system basis. Use them judiciously based on the underlying device properties and characteristics of the applications that use the file system.
 
Tuning VxFS I/O parameters
 
VxFS provides a set of tunable I/O parameters that control some of its behavior. These I/O parameters are useful to help the file system adjust to striped orRAID-5 volumes that could yield performance superior to a single disk. Typically, data streaming applications that access large files see the largest benefit from tuning the file system.
 
VxVM queries:
VxVM receives the following queries during configuration:
* The filesystem queries VxVM to determine the geometry of the underlying volume and automatically sets the I/O parameters.
Note: When using file systems in multiple volume sets, VxFS sets the VxFS tunables based on the geometry of the first component volume in the volume set.
 
* The mkfs command queries VxVM when the file system is created to automatically align the file system to the volume geometry. If the default alignment from mkfs is not acceptable, the -o align=n option can be used to override alignment information obtained from VxVM.
 
* The mount command queries VxVM when the file system is mounted and downloads the I/O parameters.
 
* If the default parameters are not acceptable or the file system is being used without VxVM, then the /etc/vx/tunefstab file can be used to set values for I/O parameters. The mount command reads the /etc/vx/tunefstab file and downloads any parameters specified for a file system. The tunefstab file overrides any values obtained from VxVM. While the file system is mounted, any I/O parameters can be changed using the vxtunefs command which can have tunables specified on the command line or can read them from the /etc/vx/tunefstab file.
 
For more details, See the vxtunefs(1M) and tunefstab(4) manual pages.
 
The vxtunefs command can be used to print the current values of the I/O parameters.
 
To print the values, type the following command:
# vxtunefs -p mount_point
 
The following is an example tunefstab file:
 
/dev/vx/dsk/userdg/netbackup
read_pref_io=128k,write_pref_io=128k,read_nstream=4,write_nstream=4
/dev/vx/dsk/userdg/metasave
read_pref_io=128k,write_pref_io=128k,read_nstream=4,write_nstream=4
/dev/vx/dsk/userdg/solbuild
read_pref_io=64k,write_pref_io=64k,read_nstream=4,write_nstream=4
/dev/vx/dsk/userdg/solrelease
read_pref_io=64k,write_pref_io=64k,read_nstream=4,write_nstream=4
/dev/vx/dsk/userdg/solpatch
read_pref_io=128k,write_pref_io=128k,read_nstream=4,write_nstream=4
 
Filesystem tuning guidelines:
If the filesystem is being used with VxVM, it is advisable to let the VxFS I/O parameters be set to default values based on the volume geometry.
 
Note: VxFS does not query VxVM with multiple volume sets. To improve I/O performance when using multiple volume sets, use the vxtunefs command.
 
If the filesystem is being used with a hardware disk array or a volume manager other than VxVM, try to align the parameters to match the geometry of the logical disk. With striping or RAID-5, it is common to set read_pref_io to the stripe unit size and read_nstream to the number of columns in the stripe. For striped arrays, use the same values for write_pref_io and write_nstream.  For RAID-5 arrays, set write_pref_io to the full stripe size and write_nstream to 1.
 
For an application to do efficient disk I/O, it should use the following formula to issue read requests:
readrequests = read_nstream x read_pref_io
 
Generally, any multiple or factor of read_nstream multiplied by read_pref_io should be a good size for performance. For writing, the same rule of thumb applies to the write_pref_io and write_nstream parameters. When tuning a file system, the best thing to do is try out the tuning parameters under a real life workload. If an application is doing sequential I/O to large files, it should try to issue requests larger than the discovered_direct_iosz. This causes the I/O requests to be performed as discovered direct I/O requests, which are unbuffered like direct I/O but do not require synchronous inode updates when extending the file. If the file is larger than can fit in the cache, using unbuffered I/O avoids removing useful data out of the cache and lessens CPU overhead.
 
How to collect disk group, volume, file system, and dynamic multipathing (DMP)statistics:
 
Reset diskgroup statistics.
# vxstat -g -r
 
Collect 'vxstat'.
#/usr/sbin/vxstat -g -vps -i 1 -c 600 -d >> /var/tmp/vxstat..out
 
Collect 'vxfsstat' for a representative sample of affected the VXFS filesystems.
#/opt/VRTS/bin/vxfsstat -abx -c 600 -t 1 / >>
 
Collect 'vmstat'.
#/usr/bin/vmstat -t 1 600 >> vmstat..out
 
Collect DMP statistics
# vxdmpadmiostat start
# vxdmpadmiostat show all interval=1 count=600 >> vxdmpadm.iostat
 
Once the"3600" seconds or 1 hour has expired run the below command.
# vxdmpadmiostat stop

Issue/Introduction

Veritas File System performance tuning and monitoring.