Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Measuring Oracle I/O Performance Using CALIBRATE_IO

$
0
0
Measuring Oracle I/O Performance Using CALIBRATE_IO

There are many third party tools to measure I/O performance, but CALIBRATE_IO is oracle provided tool, introduced in Oracle Database 11g Release 1. There are a few restrictions associated with the procedure.

    The procedure must be called by a user with the SYSDBA priviledge.
    TIMED_STATISTICS must be set to TRUE, which is the default when STATISTICS_LEVEL is set to TYPICAL.
    Datafiles must be accessed using asynchronous I/O. This is the default when ASM is used.
    Only one calibration can be run at a time. If another calibration is initiated at the same time, it will fail.

We can check current asynchronous I/O setting for datafiles using the following query.

SELECT d.name, i.asynch_io
FROM   v$datafile d, v$iostat_file i
WHERE  d.file# = i.file_no
AND    i.filetype_name  = 'Data File';

To turn on asynchronous I/O, issue the following command and restart the database.

ALTER SYSTEM SET filesystemio_options=setall SCOPE=SPFILE;

Now we can call the procedure by running the following code.

SET SERVEROUTPUT ON
DECLARE
  lat  INTEGER;
  iops INTEGER;
  mbps INTEGER;
BEGIN
-- DBMS_RESOURCE_MANAGER.CALIBRATE_IO (<DISKS>, <MAX_LATENCY>, iops, mbps, lat);
   DBMS_RESOURCE_MANAGER.CALIBRATE_IO (2, 10, iops, mbps, lat);

  DBMS_OUTPUT.PUT_LINE ('max_iops = ' || iops);
  DBMS_OUTPUT.PUT_LINE ('latency  = ' || lat);
  DBMS_OUTPUT.PUT_LINE ('max_mbps = ' || mbps);
end;
/

In addition to appearing on screen, the results of a calibration run can be displayed using the DBA_RSRC_IO_CALIBRATE view.

SET LINESIZE 100
COLUMN start_time FORMAT A20
COLUMN end_time FORMAT A20

SELECT TO_CHAR(start_time, 'DD-MON-YYY HH24:MI:SS') AS start_time,
       TO_CHAR(end_time, 'DD-MON-YYY HH24:MI:SS') AS end_time,
       max_iops,
       max_mbps,
       max_pmbps,
       latency,
       num_physical_disks AS disks
FROM   dba_rsrc_io_calibrate;


Calibration runs can be monitored using the V$IO_CALIBRATION_STATUS view.
View for I/O calibration results

SQL> desc V$IO_CALIBRATION_STATUS
  Name                                      Null?    Type
  ----------------------------------------- -------- ----------------------------
  STATUS                                             VARCHAR2(13)
  CALIBRATION_TIME                                   TIMESTAMP(3)

SQL> desc gv$io_calibration_status
  Name                                      Null?    Type
  ----------------------------------------- -------- ----------------------------
  INST_ID                                            NUMBER
  STATUS                                             VARCHAR2(13)
  CALIBRATION_TIME                                   TIMESTAMP(3)

Column explanation:
-------------------
STATUS:
  IN PROGRESS   : Calibration in Progress (Results from previous calibration
                  run displayed, if available)
  READY         : Results ready and available from earlier run
  NOT AVAILABLE : Calibration results not available.

CALIBRATION_TIME: End time of the last calibration run

Viewing all articles
Browse latest Browse all 1640

Trending Articles