Monday, November 7, 2011

dNFS configuration and Hybrid Column Compression


After my post about Hybrid Column Compression Kevin Closson suggested that there is a chance that Oracle doesn’t check what kind of storage is sitting behind NFS volumes. I followed after that idea and I had checked if I was able to create table with HCC on Open Filer or build-in NFS server. First attempt failed but at that point I decided to figure out how Oracle is checking storage and if there is any chance to used different one for test and education.

At first sight difference appear in two views - v$dnsf_server and v$dnfs_channels
SQL> set linesize 200
SQL> col DIRNAME format a30
SQL> col SVRNAME format a10
SQL> select * from v$dnfs_servers;

       ID SVRNAME    DIRNAME                           MNTPORT    NFSPORT      WTMAX      RTMAX
---------- ---------- ------------------------------ ---------- ---------- ---------- ----------
        1 piorovm    /nfs                                  653       2049          0          0
        2 sunzfs     /export/sunnfs                      53214       2049    1048576    1048576
In this example server piorovm is my local NFS storage and sunzfs is a simulator of SunStorage 7000. V$DNFS_SERVER view is showing differences in mount port and lack of information about wtmax and rtmax for local NFS.
SQL> col PATH format a25
SQL> col LOCAL format a25
SQL> col SVRNAME format a10
SQL> select * from v$dnfs_channels;

     PNUM SVRNAME    PATH                      LOCAL                          CH_ID     SVR_ID      SENDS      RECVS      PINGS
---------- ---------- ------------------------- ------------------------- ---------- ---------- ---------- ---------- ----------
       10 sunzfs     192.168.56.101                                               0          2          0          0          0
       10 sunzfs     192.168.56.101                                               1          2          0          0          0
There is no Information about local NFS channels at all in V$DNFS_CHANNELS. Similar situation happen for NFS shared from Open Filer server. In alert.log I could find an information about Sun NFS but there wasn't similar entries for local NFS.
Direct NFS: channel id [0] path [192.168.56.101] to filer [sunzfs] via local [] is UP
Direct NFS: channel id [1] path [192.168.56.101] to filer [sunzfs] via local [] is UP
I wanted to know why it happen so I was looking for information how to enable trace in dNFS subsystem.There are 3 events in oraus.msg related to autonfs and when I did research on Metalink I end up with following list of events enabling tracing for dNFS.
event "19392 trace name context forever, level 8"  # kgnfs
event "19394 trace name context forever, level 28" # skgnfs
event "19396 trace name context forever, level 2"  # kgodm
When I compared trace files from SUN ZFS and local NFS I realize that Oracle is not using dNFS for my local NFS even if local NFS exist in v$dnfs_servers and I did all configuration steps from Metalink note 762374.1.
In next step I captured all NFS traffic between Oracle and NFS server and started to analyze all NFS parameters and commands. After that I did internet and found following posts "Using dNFS for test purposes" and "Oracle direct nfs quick tips". I realize that there is a missing parameter in my local NFS configuration. This "insecure" parameter allow NFS connections from unprivileged ( above 1024 ) ports and has to be set to allow Oracle dNFS to connect to server. When I added “insecure” option to my local NFS configuration it appear in v$dnfs_channels and I was able to create table compressed with Hybrid Column Compression on my local NFS.

Here is my final configuration
/etc/exports
/nfs2 *(rw,anonuid=96,anongid=96,insecure,root_squash,wdelay,sync)
$ORACLE_HOME/dbs/oranfstab
server:local
path:192.168.1.41
export:/nfs2 mount:/local
/nfs2 is mounted in OS using following command
# mount -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,nfsvers=3,timeo=600 node1:/nfs2 /local/
Tablespace and table with Hybrid Column Compression
SQL> create tablespace local_nfs datafile '/local/local_nfs01.dbf' size 10M;

Tablespace created.
Current status of dNFS views
SQL> set linesize 200
SQL> col DIRNAME format a30
SQL> col SVRNAME format a10
SQL> select * from v$dnfs_servers;

        ID SVRNAME    DIRNAME                           MNTPORT    NFSPORT      WTMAX      RTMAX
---------- ---------- ------------------------------ ---------- ---------- ---------- ----------
         1 local      /nfs2                                 792       2049     524288     524288

SQL> set linesize 200
SQL> col PATH format a25
SQL> col LOCAL format a25
SQL> col SVRNAME format a10
SQL> select * from v$dnfs_channels;

      PNUM SVRNAME    PATH                      LOCAL                          CH_ID     SVR_ID      SENDS      RECVS      PINGS
---------- ---------- ------------------------- ------------------------- ---------- ---------- ---------- ---------- ----------
        17 local      192.168.1.41                                                 0          1          0          0          0
        17 local      192.168.1.41                                                 1          1          0          0          0
        55 local      192.168.1.41                                                 0          1          0          0          0
Alert log's information about local NFS server are similar to previous Sun ZFS server.
Direct NFS: channel id [0] path [192.168.1.41] to filer [local] via local [] is UP
Direct NFS: channel id [1] path [192.168.1.41] to filer [local] via local [] is UP
And at the end I was able to create table with Hybrid Column Compression using local NFS server.
SQL> create table SCOTT.testsunnfs tablespace local_nfs  compress for archive high as select * from dba_objects where rownum < 100;

Table created.

Disclaimer  
Please be aware that this article is for education only and using of Hybrid Column Compression according to Oracle license is limited to Exadata and two additional storage types : ZFS storage, and Pillar Axiom 600 - see details in Oracle license

Marcin

2 comments:

kevinclosson said...

I'm not surprised at these findings, but thanks for doing the heavy lifting nonetheless!

Pavel Ruzicka said...

Marcin, thanks for this! Definitely "must try"..
As far as the licensing document (E10594) goes - I am going to discuss it with Oracle directly. I guess it is going to be a lot of fun. It is not marked as "Extra Cost", it is marked as Y on EE, and the word "requires" refers to supportability (not licensing restriction). Let's wait and see..