oracle内置IO测试包dbms_resource_manager.CALIBRATE_IO

oracle 11g开始,推出了内置的IO测试包,原理和上文提到的Orion工具基本相同。现在是具体使用的例子 

SQL> select group_number, name, total_mb, free_mb, total_mb-free_mb used_mb from v$asm_disk_stat;

GROUP_NUMBER NAME                             TOTAL_MB    FREE_MB    USED_MB
------------ ------------------------------ ---------- ---------- ----------
           1 DATA_0002                          511999     438029      73970
           1 DATA_0003                          511999     438022      73977
           2 FRA_0000                           614399     549359      65040
           2 FRA_0001                           614399     549357      65042
           1 DATA_0000                          511999     437995      74004
           1 DATA_0001                          511999     438035      73964

set timing on serveroutput on;

SQL> set timing on serveroutput on;
SQL> declare
  2    v_max_iops BINARY_INTEGER;
  3    v_max_mbps BINARY_INTEGER;
  4    v_act_lat BINARY_INTEGER;
  5  begin
  6    dbms_resource_manager.CALIBRATE_IO(6,20,v_max_iops,v_max_mbps,v_act_lat);
  7    dbms_output.put_line('max iops : ' || v_max_iops );
  8    dbms_output.put_line('max mbps : ' || v_max_mbps );
  9    dbms_output.put_line('actual latency : ' || v_act_lat );
 10  end;
 11  /


max iops : 9277
max mbps : 549
actual latency : 20

PROCEDURE CALIBRATE_IO
参数名称                       类型                    输入/输出默认值
------------------------------ ----------------------- ------ --------
 NUM_PHYSICAL_DISKS             BINARY_INTEGER          IN     DEFAULT
 MAX_LATENCY                    BINARY_INTEGER          IN     DEFAULT
 MAX_IOPS                       BINARY_INTEGER          OUT
 MAX_MBPS                       BINARY_INTEGER          OUT
 ACTUAL_LATENCY                 BINARY_INTEGER          OUT



运行后的结果也可通过查询dba_rsrc_io_calibrate视图实现

SQL> select * from dba_rsrc_io_calibrate;
START_TIME                     END_TIME                         MAX_IOPS   MAX_MBPS  MAX_PMBPS    LATENCY NUM_PHYSICAL_DISKS
------------------------------ ------------------------------ ---------- ---------- ---------- ---------- ------------------
03-7?? -12 09.42.42.414132 é?  03-7?? -12 09.54.10.118080 é?        9277        549        200         20                  6



更详细的说明请参考oracle官方文档

http://docs.oracle.com/cd/E18283_01/server.112/e16638/iodesign.htm#insertedID3

你可能感兴趣的:(oracle,sql,IO,测试,Integer,disk)