Friday, April 27, 2012

HCC on non-Exadata - How Oracle is detecting storage type

This is next part of HCC compression series on non-Exadata. When has been released Oracle announced that HCC compression will be possbile on ZFS Appliance and Axiom Pillar storage and patch 13041324 has been released as well. I have blogged about it and was able to run HCC on ZFS Appliance simulator and on default Linux NFS as well. After some time Oracle raised bug "Bug 13362079  HCC compression should not be allowed on dNFS with non ZFS or Pillar" and it has been fixed in PSU (patch 13343438). After applying that PSU I was unable to create HCC compressed table anymore.

I was wondering how Oracle is checking storage type as far as I know NFS doesn't have that functionality. I have compared wireshark network dumps from old and new Oracle version and there was no difference. At that point I was thinking that maybe new firmware upgrade for ZFS Appliance is required but unfortunately I couldn't download it and apply to my simulator. After discussion on Twitter with @GregRahn @alexgorbachev @AlexFatkulin @kevinclosson I have been told that Oracle can use SNMP to check storage type. That's a new idea and I recalled that I have seen SNMP related error in trace files but I have ignored it as is appear for with patch and for as well.

This time I decided to dig it out. So this is a first error I have seen from DBWR trace:
test_dbw0_11626.trc: [1332587314469093] skgnfs_setup_snmp:250: dlopen errno = 0, errstr = cannot open shared object file: No such file or directory
So there is no shared library in system (server is running OEL 5.6) or some symlinks are missing. Let's try with new symlink
ln -s /usr/lib64/ /usr/lib64/
Let's check DBWR trace now - looks better library has been found but target host is not responding.
test_dbw0_3575.trc: [1334661892496086] skgnfs_query_snmp:1831: Timeout error 2 for server
I have connected to my ZFS Appliance simulator and I have enabled SNMP using network= as network filter. I have restarted Oracle and there was no SNMP errors in DBWR trace anymore. I have enabled wireshark again and this what have been captured.
12:44:14.276823 IP >  GetRequest(33)  E:sun.
12:44:14.289691 IP >  GetResponse(59)  E:sun.[|snmp]
Now we can use snmpwalk to check what ZFS Appliance simulator is responding to SNMP request.
[root@dg1 mibs]# snmpwalk -O n -v 1 -c public .1 | grep 225
. = STRING: "sunstore"
. = STRING: "Sun ZFS Storage VirtualBox"
. = STRING: "2011.,1-1.8"
. = Timeticks: (938601700) 108 days, 15:13:37.00
. = Timeticks: (938601700) 108 days, 15:13:37.00
. = Timeticks: (329800) 0:54:58.00
. = STRING: "f2513e14-f8c2-6d7e-fc29-bbd8078aad24"
. = STRING: "unknown"
. = STRING: "Oracle 000-0000"
. = STRING: "zfspool/default/zfstest"
. = STRING: "zfspool"
. = STRING: "default"
. = STRING: "zfstest"
. = STRING: "/export/zfstest"
. = Counter32: 7
. = Counter32: 0
. = Counter32: 7
Oracle is looking for sun. and this id . is matching all numbers. It is returning "Sun ZFS Storage VirtualBox" value and this is a type of NFS server. I think that word "VirtualBox" in name is a non matching one. To confirm that I have googled for screen shots and I found this link. On page 11 I found a information from physical ZFS Appliance which I was looking for and name looks like "Sun ZFS Storage 7xxx".
I hope Oracle will include simulator name as proper name for HCC. In my opinion it can be used to HCC evaluation like dbms_compression package but in different scale. From businesses perspective no one will use simulator for production workload.

But is there any way to test it now ? ZFS Appliance type is not configurable during simulator installation process but there are two options:
- is a open source library so it can be amended to return proper value but this is a hard way
- Other possibility to realize that Sun ZFS Appliance simulator is just Solaris box. And there is a chance that as many of other parameters in UNIX type name is saved in text file and if you are able to access this file you can change it.After a few tries and was able to change it and now my simulator is returning following values. I did it only for education purpose and I'm not sure if I can share all steps I did.
At the end SNMP is returning different name
[root@dg1 ~]# snmpwalk -O n -v 1 -c public .1 | grep 225
. = STRING: "sunstore"
. = STRING: "Sun ZFS Storage 7420"
Now it is time to try HCC in version on new configured simulator ZFS and YES it is working again.

According to Oracle license Hybrid Column Compression can be run on ZFS Appliance and Axiom Pillar storage only. This post is for eduction purposes only to understand how DB is detecting storage type and how to enable it if you have proper hardware.



Anonymous said...

Nice one!

Unknown said...

Nice research Marcin!
Thank you for explaining!

Anonymous said...

Hi Marcin,

Some thoughts. Just because the server is called dlopen() on that library doesn't necessarily mean it is making calls to the routines that live there. You might care to start the instance up under strace -f and see if you notice it doing something as simple as executing an OS command and processing the command's return strings. Have you checked into that? Just wondering.

Nice that you got it working.

jc said...

I tried to run the "Sun Unified Storage Simulator" under VMware, but after converting from virtualbox to VMWare format, I can't make the Solaris box boot.
It is complaining about the boot disk.

As anyone managed to do it, I wanted to test out the HCC Compression features.


Marcin Przepiorowski said...


Thanks for you suggestion. I haven't tried it yet. I will check it soon.

I have using simulator under VMWare previously. Are you use that you are using same disk type (SCSI/IDE) in VMWare like in VirtualBox ?

jc said...

Hello Marci, thanks for your reply, in VMware I have had to change the Controller from SATA (virtualbox) to SCSI (VMWare), at boot time just after the Grub screen, I get errors which I interpret as "not being able to mount zfs pool or disk".

Can't wait to test out this Simulator, if by chance you still have the VDMK disk for VMware, I would love to have a copy.

My knowledge in Solaris boot loader is not enough at the moment to troubleshoot this booting problem..