Thursday, September 8, 2011

Oracle Direct NFS (DNFS)

Direct NFS (DNFS) : Oracle Server - Enterprise Edition - Version: to  Direct NFS is a client software which allows integration of the NFS client functionality in Oracle RDBMS server. It makes the task of configuring Oracle database for NAS storage much simpler through the Direct NFS client instead of kernel NFS. The major benefits of Direct NFS client include simplicity, easy administration, load balancing, high availability and cost-effectiveness. The I/O performance is also better as Oracle can optimize the I/O code path by avoiding the kernel overhead.

But, there is a need to use Direct NFS Client software, the NFS file systems must first be mounted and available over regular NFS mounts.All the volumes are always mounted by the OS. Direct NFS mounts/unmounts volumes logically and the files can still be accessed through kernel NFS after a volume is unmounted by Direct NFS client. This ensures that the files from the same volume in the NFS server can be shared by Oracle database and other OS users.
Direct NFS client tries to ensure every file access goes through the NFS ODM library and not through kernel NFS. If a volume is not listed in oranfstab, it will also look through the OS mount tab to find a match. Only if that fails, control is handed back to the database and file access is made through kernel NFS.
Direct NFS Client includes two fundamental I/O optimizations to increase throughput and overall performance. First, Direct NFS Client is capable of performing concurrent direct I/O, which bypasses any operating system level caches and eliminates any operating system write-ordering locks. This decreases memory consumption by eliminating scenarios where Oracle data is cached both in the SGA and in the operating system cache and eliminates the kernel mode CPU cost of copying data from the operating system cache into the SGA. Second, Direct NFS Client performs asynchronous I/O, which allows processing to continue while the I/O request is submitted and processed.

The direct NFS client looks for mount settings in the following order:
  • $ORACLE_HOME/dbs/oranfstab for settings on a single database
  • /etc/oranfstab for NFS mounts available to all Oracle databases on the host
  • Lastly, the mount tab file (i.e. /etc/mtab on Linux) to determine available NFS mounts
The oranfstab file should be created to include the server, path, export (path), and mount.  For example, one possible contents of this file could be:
server: MyServer
export: /vol/oradata mount: C:\oracle\11g\oradata\ora11gr1
Server – NFS server name
Path – Up to four network paths to the NFS server
Export – Exported path from the NFS server
Mount – Local mount point for NFS server
Prior to enabling the direct NFS client, the NFS file systems should already be mounted and available over regular NFS mounts.  Once the NFS file systems are mounted, it is necessary to replace the standard Oracle Disk Manager (ODM) library with one that supports the direct NFS client.  This can be accomplished by issuing the following commands on the server:
> cd $ORACLE_HOME/lib
> cp libodm11.so_stub
> ln –s
These commands create a copy of the ODM library. They also create a symbolic link between the ODM library that supports the direct NFS client and old ODM library. 
Monitor Direct NFS
Oracle 11g has introduced several new dynamic views to provide visibility on the configuration and performance of direct NFS in the database. 
  • v$dnfs_servers – View servers accessed using Direct NFS
  • v$dnfs_files – View files currently open using Direct NFS
  • v$dnfs_channels – View open network paths or channels to servers for which Direct NFS is providing files
  • v$dnfs_stats – View performance statistics for Direct NFS
Direct NFS in OLTP and DSS
Case studies from Oracle demonstrate that the direct NFS client provides a significant improvement over the kernel NFS for throughput and CPU utilization in both DSS and OLTP environments.  In DSS environments, the improvement increases dramatically as additional network interfaces are added.  Oracle’s case study shows an approximately 40% improvement in DSS environments and an 11% improvement in OLTP environments.  These metrics are only one element of the full benefits of using the direct NFS client rather than the kernel NFS.  Other factors that should be considered when evaluating this feature include the simplicity of setup, maintenance, and the reduced infrastructure requirements.
RAC Using NFS with Direct NFS (DNFS)
Oracle 11g comes with enhanced support for Oracle over NFS using the new Direct NFS feature.  Direct NFS allows for costs savings by sticking with one connection model: the network.  This allows for multipathing and unified storage.  In addition, Direct NFS even works in Windows, even though Windows has no NFS support. Another nice feature of NFS is that files are directly accessible via standard OS commands like ls, mv, cp and such.  
Lastly, Oracle's Direct NFS feature allows for Direct I/O and Asynchronous I/O by default. To use Direct NFS, the client must be installed on RAC nodes.  This can even be performed on nodes where Oracle RAC is already running.  
The Oracle 11g Direct NFS Client is shipped with Oracle 11g.  Once installed, it is very simple to put it in place:
  1. Stop any RAC databases
  2.  Navigate to $ORACLE_HOME/lib
  3. Move the file to a backup
  4. Create a symbolic link called which uses as its
    source:  ln -s
  5. Start the RAC databases
Direct NFS information can then be queried from the following fixed views:
  •  v$dnfs_channels
  • v$dnfs_files
  • v$dnfs_servers
  • v$dnfs_stats
Note: Oracle 11g Direct NFS only works with NFS V3 compatible NAS devices.
 NFS must be set up at the OS level before using the Direct NFS client.  Each OS has different requirements for configuring and using NFS.

Oracle Recovery Manager (RMAN),
Real Application Clusters (RAC), and
Automatic Storage Management (ASM).

No comments:

Post a Comment