Enabling Cached Quick I/O on the File System
Cached Quick I/O depends on VERITAS Quick I/O running as an underlying system enhancement in order to function correctly. Follow the procedures listed here to ensure that you have the correct setup to use Cached Quick I/O successfully.
Prerequisites
- You must have permission to change file system behavior using the vxtunefs command to enable or disable Cached Quick I/O. By default, you need superuser (root) permissions to run the vxtunefs command, but other system users do not. Superuser (root) must specifically grant database administrators permission to use this command as follows:
# chown root:dba /sbin/fs/vxfs4.1/vxtunefs
# chmod 4550 /sbin/fs/vxfs4.1/vxtunefs
where users belonging to the dba group are granted permission to run the vxtunefs command. We recommend this selective, more secure approach for granting access to powerful commands.
- You must enable Quick I/O on the file system. Quick I/O is enabled automatically at file system mount time.
If you have correctly enabled Quick I/O on your system, you can proceed to enable Cached Quick I/O as follows:
- Set the file system Cached Quick I/O flag, which enables Cached Quick I/O for all files in the file system.
Setting the file system Cached Quick I/O flag enables caching for all files in the file system. You must disable Cached Quick I/O on individual Quick I/O files that do not benefit from caching to avoid consuming memory unnecessarily. This final task occurs at the end of the enabling process.
Usage Notes
- Do not enable Cached Quick I/O if Oracle is using Oracle Disk Manager.
Enabling and Disabling the qio_cache_enable Flag
As superuser (root), set the qio_cache_enable flag using the vxtunefs command after you mount the file system.
To enable the qio_cache_enable flag for a file system
Use the vxtunefs command as follows:
# /sbin/fs/vxfs4.1/vxtunefs -s -o qio_cache_enable=1 /mount_point
Example
# /sbin/fs/vxfs4.1/vxtunefs -s -o qio_cache_enable=1 /db02
where /db02 is a VxFS file system containing the Quick I/O files and setting the qio_cache_enable flag to "1" enables Cached Quick I/O. This command enables caching for all the Quick I/O files on this file system.
To disable the flag on the same file system
Use the vxtunefs command as follows:
# /sbin/fs/vxfs4.1/vxtunefs -s -o qio_cache_enable=0 /mount_point
Example
# /sbin/fs/vxfs4.1/vxtunefs -s -o qio_cache_enable=0 /db02
where /db02 is a VxFS file system containing the Quick I/O files and setting the qio_cache_enable flag to "0" disables Cached Quick I/O. This command disables caching for all the Quick I/O files on this file system.
Making Cached Quick I/O settings persistent across reboots and mounts
You can make the Cached Quick I/O system setting persistent across reboots and mounts by adding a file system entry in the /etc/vx/tunefstab file.
Note
The tunefstab file is a user-created file. For information on how to create the file and add tuning parameters, see the tunefstab(4) manual page.
To enable a file system after rebooting
Put the file system in the /etc/vx/tunefstab file and set the flag entry:
/dev/vx/dsk/dgname/volname qio_cache_enable=1
where:
- /dev/vx/dsk is the name of a block device
- dgname is the name of the disk group
- volname is the name of the volume
Example
/dev/vx/dsk/PRODdg/db01 qio_cache_enable=1
/dev/vx/dsk/PRODdg/db02 qio_cache_enable=1
where /dev/vx/dsk/PRODdg/db01 is the block device on which the file system resides.
For information on how to add tuning parameters, see the tunefstab(4) manual page.
Note
vxtunefs can specify a mount point or a block device; tunefstab must always specify a block device only.
Using vxtunefs to Obtain Tuning Information
Check the setting of the qio_cache_enable flag for each file system using the vxtunefs command.
To obtain information on only the qio_cache_enable flag setting
Use the grep command with vxtunefs:
# /sbin/fs/vxfs4.1/vxtunefs /mount_point | grep qio_cache_enable
Example
# /sbin/fs/vxfs4.1/vxtunefs /db01 | grep qio_cache_enable
where /db01 is the name of the file system. This command displays only the qio_cache_enable setting as follows:
qio_cache_enable = 0
You can also use the vxtunefs command to obtain a more complete list of I/O characteristics and tuning statistics.
To obtain information on all vxtunefs system parameters
Use the vxtunefs command without grep:
# /sbin/fs/vxfs4.1/vxtunefs /mount_point
Example
# /sbin/fs/vxfs4.1/vxtunefs /db01
The vxtunefs command displays output similar to the following:
Filesystem i/o parameters for /db01
read_pref_io = 65536
read_nstream = 1
read_unit_io = 65536
write_pref_io = 65536
write_nstream = 1
write_unit_io = 65536
pref_strength = 10
buf_breakup_size = 1048576
discovered_direct_iosz = 262144
max_direct_iosz = 1048576
default_indir_size = 8192
qio_cache_enable = 1
write_throttle = 0
max_diskq = 1048576
initial_extent_size = 8
max_seqio_extent_size = 2048
max_buf_data_size = 8192
hsm_write_prealloc = 0
read_ahead = 1
inode_aging_size = 0
inode_aging_count = 0
fcl_maxalloc = 130150400
fcl_keeptime = 0
fcl_winterval = 3600
For a complete description of vxtunefs parameters and the tuning instructions, refer to the vxtunefs(1) manual page.
|