根据JL,Glen Fawcett 的文章 oracle 从12c开始提供了3个视图来探测慢速的IO
SQL> desc V$LGWRIO_OUTLIER; Name Null? Type ----------------------------------------- -------- ---------------------------- FUNCTION_NAME VARCHAR2(18) IO_SIZE NUMBER WAIT_EVENT VARCHAR2(64) FILE_NAME VARCHAR2(513) IO_LATENCY NUMBER DISK1_NAME VARCHAR2(255) DISK1_LATENCY NUMBER DISK2_NAME VARCHAR2(255) DISK2_LATENCY NUMBER DISK3_NAME VARCHAR2(255) DISK3_LATENCY NUMBER CON_ID NUMBER SQL> desc v$io_outlier; Name Null? Type ----------------------------------------- -------- ---------------------------- FUNCTION_NAME VARCHAR2(18) IO_SIZE NUMBER WAIT_EVENT VARCHAR2(64) FILE_NAME VARCHAR2(513) IO_LATENCY NUMBER DISK1_NAME VARCHAR2(255) DISK1_LATENCY NUMBER DISK2_NAME VARCHAR2(255) DISK2_LATENCY NUMBER DISK3_NAME VARCHAR2(255) DISK3_LATENCY NUMBER CON_ID NUMBER SQL> desc v$KERNEL_IO_OUTLIER; Name Null? Type ----------------------------------------- -------- ---------------------------- TIMESTAMP NUMBER IO_SIZE NUMBER IO_OFFSET NUMBER DEVICE_NAME VARCHAR2(513) PROCESS_NAME VARCHAR2(64) TOTAL_LATENCY NUMBER SETUP_LATENCY NUMBER QUEUE_TO_HBA_LATENCY NUMBER TRANSFER_LATENCY NUMBER CLEANUP_LATENCY NUMBER PID NUMBER CON_ID NUMBER
需要注意的是这3个视图仅仅探测(more than 500 ms)的IO,并且”v$KERNEL_IO_OUTLIER”仅仅在Solaris平台适用,因为其调用了Dtrace
但是由于Dtrace已经在oel6中release,目前不确定是否可以在linux平台使用 (Maybe :)_)