Previous  |  Next  >  
Product: Storage Foundation for Databases Guides   
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide   

Understanding Quick I/O

How Quick I/O Works

VERITAS Quick I/O supports direct I/O and allows databases to access regular files on a VxFS file system as raw character devices.

The benefits of using Quick I/O for Oracle databases are:

  • Improved performance and processing throughput by having Quick I/O files act as raw devices
  • Ability to manage Quick I/O files as regular files, which simplifies administrative tasks such as allocating, moving, copying, resizing, and backing up datafiles

Note that VERITAS recommends using Oracle Disk Manager. If you would like to migrate from Quick I/O to Oracle Disk Manager, see Converting Quick I/O Files to Oracle Disk Manager Files for more information.

How Quick I/O Improves Database Performance

Quick I/O's ability to access regular files as raw devices improves database performance by:

  • Supporting direct I/O
  • Avoiding kernel write locks on database files
  • Avoiding double buffering

Supporting

is a form of I/O that performs non-blocking system level reads and writes, allowing the system to handle multiple I/O requests simultaneously. Operating systems such as HP-UX provide kernel support for asynchronous I/O on raw devices, but not on regular files. As a result, even if the database server is capable of using asynchronous I/O, it cannot issue asynchronous I/O requests when the database runs on file systems. Lack of asynchronous I/O significantly degrades performance. Quick I/O lets the database server take advantage of kernel-supported asynchronous I/O on file system files accessed using the Quick I/O interface.

Supporting Direct I/O

I/O on files using read() and write() system calls typically results in data being copied twice: once between user and kernel space, and later between kernel space and disk. In contrast, I/O on raw devices is direct. That is, data is copied directly between user space and disk, saving one level of copying. As with I/O on raw devices, Quick I/O avoids extra copying.

Avoiding Kernel Write Locks

When database I/O is performed using the write() system call, each system call acquires and releases a write lock inside the kernel. This lock prevents multiple simultaneous write operations on the same file. Because database systems usually implement their own locking to manage concurrent access to files, per file writer locks unnecessarily serialize I/O operations. Quick I/O bypasses file system per file locking and lets the database server control data access.

Avoiding Double Buffering

Most database servers maintain their own buffer cache and do not need the file system buffer cache. Database data cached in the file system buffer is therefore redundant and results in wasted memory and extra system CPU utilization to manage the buffer. By supporting direct I/O, Quick I/O eliminates double buffering. Data is copied directly between the relational database management system (RDBMS) cache and disk, which lowers CPU utilization and frees up memory that can then be used by the database server buffer cache to further improve transaction processing throughput.

Quick I/O Requirements

To use Quick I/O, you must:

  • Preallocate files on a VxFS file system
  • Use a special file naming convention to access the files

Preallocation

Preallocating database files for Quick I/O allocates contiguous space for the files. The file system space reservation algorithms attempt to allocate space for an entire file as a single contiguous extent. When this is not possible due to lack of contiguous space on the file system, the file is created as a series of direct extents. Accessing a file using direct extents is inherently faster than accessing the same data using indirect extents. Internal tests have shown performance degradation in OLTP throughput when using indirect extent access. In addition, this type of preallocation causes no fragmentation of the file system.

You must preallocate Quick I/O files because they cannot be extended through writes using their Quick I/O interfaces. They are initially limited to the maximum size you specify at the time of creation. To extend Quick I/O files, see Extending a Quick I/O File.

Naming Convention

VxFS uses a special naming convention to recognize and access Quick I/O files as raw character devices. VxFS recognizes the file when you add the following extension to a file name:

::cdev:vxfs:

Whenever an application opens an existing VxFS file with the extension ::cdev:vxfs: (cdev being an acronym for character device), the file is treated as if it were a raw device. For example, if the file temp01 is a regular VxFS file, then an application can access temp01 as a raw character device by opening it with the name:

.temp01::cdev:vxfs:

Note   Note    We recommend reserving the ::cdev:vxfs: extension only for Quick I/O files. If you are not using Quick I/O, you could technically create a regular file with this extension; however, doing so can cause problems if you later enable Quick I/O.

How to Set Up Quick I/O

Quick I/O is part of the VxFS binaries shipped with VERITAS Storage Foundation for Oracle. By default, Quick I/O is enabled when you mount a VxFS file system.

If Quick I/O is not available in the kernel, or the VERITAS Storage Foundation for Oracle license is not installed, a file system mounts by default without Quick I/O, the Quick I/O file name is treated as a regular file, and no error message is displayed. If, however, you specify the -o qio option, the mount command prints the following error message and terminates without mounting the file system.


 VxFDD: You don't have a license to run this program
 vxfs mount: Quick I/O not available

Depending on whether you are creating a new database or are converting an existing database to use Quick I/O, you have the following options:

 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation for Databases Guides  
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide  
VERITAS Software Corporation
www.veritas.com