7 Replies Latest reply: Feb 4, 2013 7:22 AM by Jan-Marten Spit RSS

    wrong data in v$asm_disk_iostat

    Jan-Marten Spit
      two node RAC, two db's, r102 and r112
      ASM instance
      select instname, sum(read_time), sum(write_time) from gv$asm_disk_iostat group by instname
      -------------------- -------------- ---------------
      +ASM1                      0            0
      +ASM2                      0            0
      r1021                   .025241         .164921
      r1022                   .001964         .002186
      r1121                1060.99533      3291.06677
      r1122                632.284362      100.278707
      r102 database
      select sum(read_time), sum(write_time) from gv$asm_disk_stat
      -------------- ---------------
           272.08            1671.14
      r112 database
      select sum(read_time), sum(write_time) from gv$asm_disk_stat;
      -------------- ---------------
          1701.67518         3525.09719
      (note that queries were not run at the same time, so there is some small discrepancy in the numbers)

      so gv$asm_disk_iostat is producing wrong results for oracle 10 ASM clients:

      for example read_time


      and write time


      on 11.2 ASM, gv$asm_disk_iostat underreports read and write time by a factor 10000 (precisely) for 10.1/10.2 clients.

      i confirmed this on various systems. i also tried to file a bug - which did not succeed because Oracle support refused the SR twice (insisting i provide a rda, instead of saying thank you for reporting it, we confirmed it on our test servers)

      the question is: how widespread is this issue? i am unable to test it on anything else than Linux, but confirmed it for 11.2 ASM with 10.2 and 10.1 ASM clients. There is a workaround, ofcourse, but that workaround will become a bug if Oracle fixes this issue in a future release. So my software must be able to detect if it needs to apply the workaround. The view itself is very usefull - as it provides data not provided by any of the other ASM views.
        • 1. Re: wrong data in v$asm_disk_iostat
          Sebastian Solbach -Dba Community-Oracle
          Hi Jan-Marten,

          if I can remember correctly there was a discrepancy in 10.1 and 10.2 database vs. the definition in ASM.

          This resulted in 10.2 time (with ASM) that the database tracked information in "hundredths of a second" while ASM did report the findings in "seconds".
          As a result if you quered the I/O stat, you new that the database reported I/Os were always wrong (I though it was by 1000, but it could be that it was by 10000).

          In 10.2. v$asm_disk_iostat was not included in the documentation, hence nobody really argued and thought that this was only a wrong description...

          This "discrepancy" between database and ASM was fixed in 11.1.
          As a result a 11.1 database and upwards has the same value as the ASM diskgroup.

          However since it is the DB which is doing the I/O, it is also the DB tracking this information. So the 10 database will still report the wrong numbers (by 10000) while the numbers of an 11.X database will be correct.

          So in future this is fine. And since 10.X databases are out of support anyway, upgrade to 11 and your issue is fixed. I doubt you get it fixed by Oracle for 10.X.

          • 2. Re: wrong data in v$asm_disk_iostat
            Jan-Marten Spit

            thanks, but things are a bit more complicated i fear... it is the Oracle 11.2 ASM instance that is reporting the wait timings from Oracle 10 and 11 on different scales but in the same view. That looks like a bug in 11.2 to me.

            Although it's true that oracle 10 is no longer supported, there is lot's of them out there - and i have a problem in monitoring software that has to cater for that reality.

            Your point that it will probably not be fixed seems likely, which would allow the current workaround (detecting instance version and fix the discrepancy in a case statement) to remain viable for the long term.

            • 3. Re: wrong data in v$asm_disk_iostat
              Sebastian Solbach -Dba Community-Oracle
              Hi Jan,

              the thing I wanted to point out is, since the database is doing the I/O it is the database who reports the I/O statistics to the ASM instance (Which you then get displayed).
              If the database however does pass the wrong numbers to ASM, it is a bug in the database, and not in ASM. It is not the task of the ASM instance to do a conversion of wrong numbers ;)

              • 4. Re: wrong data in v$asm_disk_iostat
                Jan-Marten Spit
                "the thing I wanted to point out is, since the database is doing the I/O it is the database who reports the I/O statistics to the ASM instance"

                i assumed it was the other way around. is this something you know or something you presume?

                • 5. Re: wrong data in v$asm_disk_iostat
                  ASM is not an I/O proxy layer. It does not do I/O on behalf of the database. The name says "+manager+" - as in it serves as the storage management layer. Not as an I/O driver.

                  Introducing an I/O layer in between a database server process and its ability to do direct I/O to a device, would have serious performance impact.

                  Support Note: *ASM Concepts Quick Overview [ID 1086199.1]*+
                  ASM exists to manage file storage for the RDBMS
                  -  ASM does NOT perform I/O on behalf of the RDBMS
                  -  I/O is performed by the RDBMS processes as it does with other storage types
                  -  Thus, ASM is not an intermediary for I/O (would be a bottleneck)
                  -  I/O can occur synchronously or asynchronously depending on the value of the DISK_ASYNCH_IO 
                  -  Disks are RAW devices to ASM
                  -  Files that can be stored in ASM: typical database data files, control files, redologs, archivelogs, 
                     flashback logs, spfiles, RMAN backups and incremental tracking bitmaps, datapump dumpsets.
                  -  In 11gR2, ASM has been extended to allow storing any kind of file using Oracle ACFS capability 
                     (it appears as another filesystem to clients). Note that database files are not supported within ACFS
                  • 7. Re: wrong data in v$asm_disk_iostat
                    Jan-Marten Spit