<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Transitional//EN">
<HTML>
<HEAD>
  <!--
    *************************************************************************************
    * Copyright (c) 2005 VERITAS Software Corporation. All rights reserved. *

      For third-party license citations, please see the bottom of this file.
    *************************************************************************************
  -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="TEMPLATEBASE" content="vx_vxhelp_2005c">
<meta name="LASTUPDATED" content="06/13/05 10:35:31">
<meta name="PRODUCTNAME" content="VERITAS Software Documentation">
<meta name="FILENAME" content="oracle_hp_ch3qio.fm">
     
<title>Understanding Quick I/O</title>

</HEAD>

<BODY bgcolor="#FFFFFF" link="#000066" vlink="#0000ff" marginheight="0" topmargin="0">
<basefont=1>

<a name="223417"></a>

<div align="left">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
 <tr>
   <td height="2" border="0" cellspacing="0" cellpadding="0" colspan="2" bgcolor="#000000">
   </td>
 </tr>
 <tr>
   <td height="15" width="50%" border="0" cellspacing="0" cellpadding="0" bgcolor="#cccccc">
    <img src="images/vxsymbol.gif" height="20" width="31" border="0" cellspacing="0" cellpadding="0" align="left">
     
     
   </td>
   <td align="right" width="50%" bgcolor="#cccccc">

<!-- Header Breadcrumbs -->
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">&lt;&nbsp;<a href="oracle_hp_ch3qio_sf_dbag36_222846.html" title="Previous - Using VERITAS Quick I/O">Previous</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="oracle_hp_ch3qio_sf_dbag38_224182.html" title="Next - Creating Database Files as Quick I/O Files Using qiomkfile">Next</a>
&nbsp;&gt;&nbsp;&nbsp;</font>
   </td>
 </tr>

 <tr>
  <td bgcolor="#CCCCCC" colspan="2" height="15" align="right">
  <font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Product:  
<a href="sf_dbag_splashpage_docCD_sf_dbag1_103036.vxhd" title="Storage Foundation for Databases Guides title page ">Storage Foundation for Databases Guides</a>
  &nbsp;&nbsp;
  </font>
  </td>
 </tr>
 <tr>
  <td bgcolor="#CCCCCC" colspan="2" height="15" align="right">
  <font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Manual:  
<a href="oracle_hp_dbag_titlepage_docCD_sf_dbag2_73700.vxhd" title="Storage Foundation 4.1 for Oracle Administrator's Guide title page ">Storage Foundation 4.1 for Oracle Administrator's Guide</a>
  &nbsp;&nbsp;
  </font>
  </td>
 </tr>


</table>
</div>

<div align="left">
 <table border="0" width="100%" bgcolor="#FFFFFF">
  <tr>
   <td width="100%" valign="top" bgcolor="#FFFFFF">

<!-- Start Main Topic Content -->
        <a name="startcontent"></a>
	
<h1><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="+1" color="#000000"><a name="223417"></a>Understanding Quick I/O</font>
</h1>
 
  
  
  




<h2><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="3" color="#000000"><a name="223421"></a>How Quick I/O Works</font>
</h2>
 
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223425"></a>VERITAS Quick I/O supports direct I/O and allows databases to access regular files on a VxFS file system as raw character devices. </font>
</p>

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223433"></a>The benefits of using Quick I/O for Oracle databases are:</font>
</p>

<p>
<ul type="disc"><li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223437"></a>Improved performance and processing throughput by having Quick I/O files act as raw devices</font>
</li>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223441"></a>Ability to manage Quick I/O files as regular files, which simplifies administrative tasks such as allocating, moving, copying, resizing, and backing up datafiles</font>
</li>
</ul>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223443"></a>Note that VERITAS recommends using Oracle Disk Manager. If you would like to migrate from Quick I/O to Oracle Disk Manager, see <a href="oracle_hp_ch5odm_sf_dbag59_1033382.html#1033382">Converting Quick I/O Files to Oracle Disk Manager Files</a> for more information.</font>
</p>




<h2><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="3" color="#000000"><a name="223455"></a>How Quick I/O Improves Database Performance</font>
</h2>
 
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223459"></a>Quick I/O's ability to access regular files as raw devices improves database performance by:</font>
</p>

<p>
<ul type="disc"><li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223464"></a>Supporting direct I/O</font>
</li>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223465"></a>Avoiding kernel write locks on database files</font>
</li>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223466"></a>Avoiding double buffering</font>
</li>
</ul>
</p>



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="223469"></a>Supporting </font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223470"></a> 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.</font>
</p>




<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="223480"></a>Supporting Direct I/O</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223481"></a>I/O on files using <font face="Courier New, Courier, sansserif, sans serif" size="2">read</font>() and <font face="Courier New, Courier, sansserif, sans serif" size="2">write</font>() 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.</font>
</p>




<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="223483"></a>Avoiding Kernel Write Locks </font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223484"></a>When database I/O is performed using the <font face="Courier New, Courier, sansserif, sans serif" size="2">write</font>() 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.</font>
</p>




<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="223489"></a>Avoiding Double Buffering</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223490"></a>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.</font>
</p>




<h2><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="3" color="#000000"><a name="223498"></a>Quick I/O Requirements</font>
</h2>
 
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223502"></a>To use Quick I/O, you must:</font>
</p>

<p>
<ul type="disc"><li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223507"></a>Preallocate files on a VxFS file system</font>
</li>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223509"></a>Use a special file naming convention to access the files</font>
</li>
</ul>
</p>



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="223510"></a>Preallocation</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223513"></a>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.</font>
</p>

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223520"></a>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 <a href="oracle_hp_ch3qio_sf_dbag45_226212.html#226212">Extending a Quick I/O File</a>.</font>
</p>




<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="223546"></a>Naming Convention</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223549"></a>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:</font>
</p>

<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223558"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">::cdev:vxfs:</font></font>
</blockquote>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223562"></a>Whenever an application opens an existing VxFS file with the extension <font face="Courier New, Courier, sansserif, sans serif" size="2">::cdev:vxfs:</font> (<font face="Courier New, Courier, sansserif, sans serif" size="2">cdev</font> being an acronym for <em>character device</em>), the file is treated as if it were a raw device. For example, if the file <font face="Courier New, Courier, sansserif, sans serif" size="2">temp01&nbsp;</font>is a regular VxFS file, then an application can access <font face="Courier New, Courier, sansserif, sans serif" size="2">temp01</font> as a raw character device by opening it with the name:</font>
</p>

<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223564"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">.temp01::cdev:vxfs:</font></font>
</blockquote>
<hr noshade size="2" width="100%" color="#000000">
<img src="images/note.gif" alt="Note " height="16" width="16">&nbsp;
<font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000">
<a name="223568"></a><b>Note  &nbsp;&nbsp;</b>
</font>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2" color="#000000">We recommend reserving the <font face="Courier New, Courier, sansserif, sans serif" size="2">::cdev:vxfs:</font> extension <em>only</em> 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. 
</font>
<hr noshade size="2" width="100%" color="#000000">



<h2><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="3" color="#000000"><a name="223579"></a>How to Set Up Quick I/O</font>
</h2>
 
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223583"></a>Quick I/O is part of the VxFS binaries shipped with VERITAS Storage Foundation <em>for Oracle</em>. By default, Quick I/O is enabled when you mount a VxFS file system.</font>
</p>

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223592"></a>If Quick I/O is not available in the kernel, or the VERITAS Storage Foundation <em>for Oracle</em> 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 <font face="Courier New, Courier, sansserif, sans serif" size="2">-o</font> <font face="Courier New, Courier, sansserif, sans serif" size="2">qio</font> option, the <font face="Courier New, Courier, sansserif, sans serif" size="2">mount</font> command prints the following error message and terminates without mounting the file system. </font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="223597"></a>&nbsp;VxFDD:&nbsp;You&nbsp;don't&nbsp;have&nbsp;a&nbsp;license&nbsp;to&nbsp;run&nbsp;this&nbsp;program
</font>
<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="223600"></a>&nbsp;vxfs&nbsp;mount:&nbsp;Quick&nbsp;I/O&nbsp;not&nbsp;available
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223603"></a>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:</font>
</p>

<p>
<ul type="disc"><li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223607"></a>If you are creating a new database:</font>
</li>
<p>
<ul type="disc"><li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223608"></a>You can use the <font face="Courier New, Courier, sansserif, sans serif" size="2">qiomkfile</font> command to preallocate space for database files and make them accessible to the Quick I/O interface. See <a href="oracle_hp_ch3qio_sf_dbag38_224182.html#224182">Creating Database Files as Quick I/O Files Using qiomkfile</a> for more information.</font>
</li>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223630"></a>You can use the <font face="Courier New, Courier, sansserif, sans serif" size="2">setext</font> command to preallocate space for database files and create the Quick I/O files. See <a href="oracle_hp_ch3qio_sf_dbag39_224827.html#224827">Preallocating Space for Quick I/O Files Using the setext Command</a>. </font>
</li>
</ul>
</p>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223652"></a>If you are converting an existing database:</font>
</li>
<p>
<ul type="disc"><li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223655"></a>You can create symbolic links for existing VxFS files, and use these symbolic links to access the files as Quick I/O files. See <a href="oracle_hp_ch3qio_sf_dbag40_225006.html#225006">Accessing Regular VxFS Files as Quick I/O Files</a> for more information.</font>
</li>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223698"></a>You can convert your existing Oracle database files to use the Quick I/O interface using the <font face="Courier New, Courier, sansserif, sans serif" size="2">qio_getdbfiles</font> and <font face="Courier New, Courier, sansserif, sans serif" size="2">qio_convertdbfiles</font> commands. See <a href="oracle_hp_ch3qio_sf_dbag41_225166.html#225166">Converting Oracle Files to Quick I/O Files</a> for more information.</font>
</li>
</ul>
</p>
</ul>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="223716"></a></font>
</p>


<!-- End Main Topic Content -->

   </td>
  </tr>
 </table>
</div>

<div>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
 <tr>
  <td height="18" border="0" cellspacing="0" cellpadding="0" colspan="2" bgcolor="#FFFFFF">
  </td>
 </tr>
  <td align="left"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">&nbsp;&#94;&nbsp;<a href="oracle_hp_ch3qio_sf_dbag37_223417.html" title="Understanding Quick I/O">Return to Top</a></font>

  </td>
  <td align="right"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">&lt;&nbsp;<a href="oracle_hp_ch3qio_sf_dbag36_222846.html" title="Previous - Using VERITAS Quick I/O">Previous</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="oracle_hp_ch3qio_sf_dbag38_224182.html" title="Next - Creating Database Files as Quick I/O Files Using qiomkfile">Next</a>
&nbsp;&gt;&nbsp;&nbsp;</font>
  </td>
 <tr>
   <td height="9" border="0" cellspacing="0" cellpadding="0" colspan="2" bgcolor="#FFFFFF">
   </td>
 </tr>

<!-- Footer Breadcrumbs -->
<tr>
<td bgcolor="#FFFFFF" colspan="2" height="15" align="right">
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Product:  
<a href="sf_dbag_splashpage_docCD_sf_dbag1_103036.vxhd" title="Storage Foundation for Databases Guides title page ">Storage Foundation for Databases Guides</a>&nbsp;&nbsp;</font></td>
</tr>

<tr>
<td bgcolor="#FFFFFF" colspan="2" height="15" align="right">
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Manual:  
<a href="oracle_hp_dbag_titlepage_docCD_sf_dbag2_73700.vxhd" title="Storage Foundation 4.1 for Oracle Administrator's Guide title page ">Storage Foundation 4.1 for Oracle Administrator's Guide</a>&nbsp;&nbsp;</font></td>
</tr>


 <tr>
  <td colspan="2" align="left"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" color="#000000" align="right" size="-2">
<em>VERITAS Software Corporation
</em></font><br>

<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">www.veritas.com</font><br>
  </td>
 </tr>
</table>
</div>

</BODY>
  <!--
    *************************************************************************************
    * Copyright (c) 2005 VERITAS Software Corporation. All rights reserved. *

    VERITAS, VERITAS SOFTWARE, the VERITAS Logo, and VERITAS Software Documentation 
    are trademarks or registered trademarks of VERITAS Software Corporation 
    or its affiliates in the U.S. and other countries. Other names may be 
    trademarks of their respective owners. 

    Apache Jakarta Lucene:
    Apache Software License
    Version 1.1

    Copyright (c) 2000 The Apache Software Foundation. All rights reserved.

    Redistribution and use in source and binary forms, with or without modification, 
    are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this 
    list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright notice, this 
    list of conditions and the following disclaimer in the documentation and/or other 
    materials provided with the distribution.

    3. The end-user documentation included with the redistribution, if any, must include 
    the following acknowledgment: "This product includes software developed by the Apache 
    Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may 
    appear in the software itself, if and wherever such third-party acknowledgments 
    normally appear.

    4. The names "Apache" and "Apache Software Foundation" must not be used to endorse or 
    promote products derived from this software without prior written permission. For 
    written permission, please contact apache@apache.org.

    5. Products derived from this software may not be called "Apache", nor may "Apache" 
    appear in their name, without prior written permission of the Apache Software Foundation.

    THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, 
    BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION 
    OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 
    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    This software consists of voluntary contributions made by many individuals on behalf 
    of the Apache Software Foundation. For more information on the Apache Software Foundation, 
    please see <http://www.apache.org/>. Portions of this software are based upon public domain 
    software originally written at the National Center for Supercomputing Applications, University 
    of Illinois, Urbana-Champaign.
    
    This product includes WebWindow Software developed by Horst Heistermann.
    *************************************************************************************
  -->
</HTML>
