Skip to main content
Enterprise applications

filesystemio_options

Contributors kaminis85

The Oracle initialization parameter filesystemio_options controls the use of asynchronous and direct I/O.

The behavior and recommendations for filesystemio_options on ASA r2 are identical to AFF/FAS systems because the parameter is Oracle-specific and not dependent on the storage platform. ASA r2 uses ONTAP like AFF/FAS, so the same best practices apply.

Contrary to common belief, asynchronous and direct I/O are not mutually exclusive. NetApp has observed that this parameter is frequently misconfigured in customer environments, and this misconfiguration is directly responsible for many performance problems.

Asynchronous I/O means that Oracle I/O operations can be parallelized. Before the availability of asynchronous I/O on various OSs, users configured numerous dbwriter processes and changed the server process configuration. With asynchronous I/O, the OS itself performs I/O on behalf of the database software in a highly efficient and parallel manner. This process does not place data at risk, and critical operations, such as Oracle redo logging, are still performed synchronously.

Direct I/O bypasses the OS buffer cache. I/O on a UNIX system ordinarily flows through the OS buffer cache. This is useful for applications that do not maintain an internal cache, but Oracle has its own buffer cache within the SGA. In almost all cases, it is better to enable direct I/O and allocate server RAM to the SGA rather than to rely on the OS buffer cache. The Oracle SGA uses the memory more efficiently. In addition, when I/O flows through the OS buffer, it is subject to additional processing, which increases latencies. The increased latencies are especially noticeable with heavy write I/O when low latency is a critical requirement.

The options for filesystemio_options are:

  • async. Oracle submits I/O requests to the OS for processing. This process allows Oracle to perform other work rather than waiting for I/O completion and thus increases I/O parallelization.

  • directio. Oracle performs I/O directly against physical files rather than routing I/O through the host OS cache.

  • none. Oracle uses synchronous and buffered I/O. In this configuration, the choice between shared and dedicated server processes and the number of dbwriters are more important.

  • setall. Oracle uses both asynchronous and direct I/O. In almost all cases, the use of setall is optimal.

Note In ASM environments, Oracle automatically uses direct I/O and asynchronous I/O for ASM-managed disks, so filesystemio_options has no effect on ASM disk groups. For non-ASM deployments (e.g., file systems on SAN LUNs), set: filesystemio_options = setall. This enables both asynchronous and direct I/O for optimal performance.

Some older operating systems had issues with asynchronous I/O, which led to outdated advice suggesting it should be avoided. However, asynchronous I/O is stable and fully supported on all current operating systems. There is no reason to disable it unless a specific OS bug is identified.

If a database has been using buffered I/O, a switch to direct I/O might also warrant a change in the SGA size. Disabling buffered I/O eliminates the performance benefit that the host OS cache provides for the database. Adding RAM back to the SGA repairs this problem. The net result should be an improvement in I/O performance.

Although it is almost always better to use RAM for the Oracle SGA than for OS buffer caching, it might be impossible to determine the best value. For example, it might be preferable to use buffered I/O with very small SGA sizes on a database server with many intermittently active Oracle instances. This arrangement allows the flexible use of the remaining free RAM on the OS by all running database instances. This is a highly unusual situation, but it has been observed at some customer sites.

Tip NetApp recommends setting filesystemio_options to setall, but be aware that under some circumstances the loss of the host buffer cache might require an increase in the Oracle SGA. ASA r2 systems are optimized for SAN workloads with low latency, so using setall aligns perfectly with ASA's design for high-performance Oracle deployments.