Friday, December 12, 2014

RMAN Backups on NFS

There are many options for mounting NFS to be used with various oracle files (binaries, datafiles, OCR). This post shows results of three mount options used and backup time for a single tablespace (size 16GB) using RMAN. The database is a single instance 11.2.0.3 database. Both NFS server and client were on the same network segment connected via a single switch.
NFS server export file content
 more /etc/exports
/opt/backup 192.168.0.66(rw,sync,all_squash,insecure,anonuid=500,anongid=500)
anonuid and anongid represent user id and group id of oracle user on NFS client (server running the DB). no_root_squash has not been used.
Options used for mounting the NFS are
1. mount -t nfs -o rw,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp,nolock 192.168.0.76:/opt/backup /opt/backup (backup time : 06:45)

2. mount -t nfs 192.168.0.76:/opt/backup /opt/backup (backup time : 07:05)

3. mount -t nfs -o rw,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp,nolock,actimeo=0 192.168.0.76:/opt/backup /opt/backup (backup time : 06:35)

In test 1 the mount is without actimeo. Test 2 doesn't specify any mount options and rely on default options. In test 3 the options are similar to test 1 with the exception of actimeo being included.
There's some confusion as to when to use actimeo option. Some documents state it explicitly not to use noac option with RMAN yet says nothing explicitly about actimeo option. At the same time it is stated that it could be used with single instance databases (359515.1) while others explicitly state not to use actimeo with single instance and only required for RAC (1164673.1,762374.1). Neverthless the option 3 was able to complete the backup in roughly same time as option 1. However use of noac increased the backup time unacceptably long (into hours. Not included in the post).




Below is the IO rate and throughput observed from the emconsole during each test.


Useful metalink note
Howto Optimize NFS Performance with NFS options. [ID 397194.1]
How To Setup DNFS (Direct NFS) On Oracle Release 11.2 [ID 1452614.1]
Step by Step - Configure Direct NFS Client (DNFS) on Linux (11g) [ID 762374.1]
Mount Options for Oracle files when used with NFS on NAS devices [ID 359515.1]
NFS Performance Decline Introduced by Mount Option "actimeo=0" [ID 1164673.1]