【11g新特性】(I/O calibration)
11g 以前我可以透過orion的工具來測試,I/O子系統的效能,11g之後可以直接使用DBMS_RESOURCE_MANAGER.CALIBRATE_IO測試IO效能,方便了很多。
呼叫前需要滿足的條件
1 擁有SYSDBA許可權
2 timed_statistics 引數是true
3 非同步I/O是開啟狀態
檢測資料檔案是否開啟非同步的sql
COL NAME FORMAT A50
SELECT NAME,ASYNCH_IO FROM V$DATAFILE F,V$IOSTAT_FILE I
WHERE F.FILE#=I.FILE_NO
AND FILETYPE_NAME='DATA FILE';
測試注意事項
1 確定測試例項有較小的I/O請求
2 如果是RAC環境確保所有例項是OPEN狀態
儲存過程呼叫引數說明
-- Initiate an I/O calibration
--
-- Input arguments:
-- num_physical_disks - Approximate number of physical disks in
-- the database storage
-- max_latency - Maximum tolerable latency in milliseconds for
-- database-block-sized IO requests
--
-- Output arguments:
-- max_iops - Maximum number of I/O requests per second that can be
-- sustained. The I/O requests are randomly-distributed,
-- database-block-sized reads.
-- max_mbps - Maximum throughput of I/O that can be sustained,
-- expressed in megabytes per second. The I/O requests
-- are randomly-distributed, 1 megabyte reads.
-- actual_latency - Average latency of database-block-sized I/O
-- requests at "max_iops" rate, expressed in milliseconds.
--
PROCEDURE calibrate_io (
num_physical_disks IN PLS_INTEGER DEFAULT 1,
max_latency IN PLS_INTEGER DEFAULT 20,
max_iops OUT PLS_INTEGER,
max_mbps OUT PLS_INTEGER,
actual_latency OUT PLS_INTEGER
);
測試過程
num_physical_disks用以指定資料庫儲存所用物理磁碟的近似數;
max_latency指定了客戶所能容忍的最大IO 延遲時間,單位為ms;一般我們認為IO平均等待在10ms左右是一種較好的表現
SQL> set serveroutput on;
SQL> DECLARE
2 lat INTEGER;
3 iops INTEGER;
4 mbps INTEGER;
5 BEGIN
6 -- DBMS_RESOURCE_MANAGER.CALIBRATE_IO (disk_count,max_latency , iops, mbps, lat);
7 DBMS_RESOURCE_MANAGER.CALIBRATE_IO (2, 10, iops, mbps, lat);
8
9 DBMS_OUTPUT.PUT_LINE ('max_iops = ' || iops);
10 DBMS_OUTPUT.PUT_LINE ('latency = ' || lat);
11 dbms_output.put_line('max_mbps = ' || mbps);
12 end;
13 /
max_iops = 754
latency = 10
max_mbps = 67
PL/SQL procedure successfully completed.
可以透過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
---------- ---------- ---------- ---------- ------------------
09-APR-14 05.11.49.698767 PM
09-APR-14 05.15.23.261156 PM
754 67 81 15 2
測試過程中系統監控
iostat 監控資訊
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 748.00 76.22 0.01 76 0
avg-cpu: %user %nice %system %iowait %steal %idle
3.07 0.00 0.38 20.32 0.00 76.23
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 657.00 62.02 0.27 62 0
avg-cpu: %user %nice %system %iowait %steal %idle
3.63 0.00 0.35 18.46 0.00 77.56
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 710.00 73.52 0.03 73 0
avg-cpu: %user %nice %system %iowait %steal %idle
0.92 0.00 0.40 18.49 0.00 80.19
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 674.00 75.41 0.00 75 0
avg-cpu: %user %nice %system %iowait %steal %idle
2.84 0.00 0.46 19.60 0.00 77.10
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 744.00 72.70 0.21 72 0
avg-cpu: %user %nice %system %iowait %steal %idle
3.09 0.00 0.42 20.02 0.00 76.47
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 620.79 67.05 0.13 67 0
avg-cpu: %user %nice %system %iowait %steal %idle
1.80 0.00 0.36 19.11 0.00 78.73
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 724.00 71.64 0.04 71 0
avg-cpu: %user %nice %system %iowait %steal %idle
2.38 0.00 0.44 18.94 0.00 78.24
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 725.00 73.91 0.11 73 0
avg-cpu: %user %nice %system %iowait %steal %idle
4.41 0.00 0.46 18.40 0.00 76.73
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 681.00 72.86 0.02 72 0
avg-cpu: %user %nice %system %iowait %steal %idle
1.78 0.00 0.40 19.09 0.00 78.73
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 703.00 71.75 0.04 71 0
avg-cpu: %user %nice %system %iowait %steal %idle
3.47 0.00 0.44 16.84 0.00 79.26
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 722.00 75.76 0.07 75 0
avg-cpu: %user %nice %system %iowait %steal %idle
1.42 0.00 0.38 18.73 0.00 79.47
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 639.00 72.51 0.13 72 0
avg-cpu: %user %nice %system %iowait %steal %idle
1.63 0.00 0.44 19.06 0.00 78.87
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 780.00 71.37 0.00 71 0
avg-cpu: %user %nice %system %iowait %steal %idle
2.78 0.00 0.42 18.63 0.00 78.17
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 672.00 73.19 0.05 73 0
avg-cpu: %user %nice %system %iowait %steal %idle
2.09 0.00 0.40 19.36 0.00 78.15
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 704.00 76.34 0.03 76 0
avg-cpu: %user %nice %system %iowait %steal %idle
2.99 0.00 0.46 18.66 0.00 77.89
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 721.00 80.23 0.01 80 0
avg-cpu: %user %nice %system %iowait %steal %idle
2.40 0.00 0.44 18.91 0.00 78.25
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 663.00 71.12 0.12 71 0
avg-cpu: %user %nice %system %iowait %steal %idle
4.26 0.00 0.42 18.24 0.00 77.07
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 671.00 70.96 0.07 70 0
avg-cpu: %user %nice %system %iowait %steal %idle
1.98 0.00 0.40 18.68 0.00 78.94
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 761.00 74.18 0.02 74 0
avg-cpu: %user %nice %system %iowait %steal %idle
3.22 0.00 0.42 18.57 0.00 77.80
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 723.00 74.79 0.07 74 0
avg-cpu: %user %nice %system %iowait %steal %idle
4.97 0.00 0.44 19.43 0.00 75.16
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 688.00 72.48 0.14 72 0
avg-cpu: %user %nice %system %iowait %steal %idle
1.98 0.00 0.46 2.51 0.00 95.05
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 790.00 89.07 0.05 89 0
avg-cpu: %user %nice %system %iowait %steal %idle
4.91 0.00 0.44 2.15 0.00 92.50
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 737.00 76.91 0.07 76 0
avg-cpu: %user %nice %system %iowait %steal %idle
2.99 0.00 0.44 2.17 0.00 94.40
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 750.00 73.46 0.20 73 0
avg-cpu: %user %nice %system %iowait %steal %idle
3.19 0.00 0.48 1.88 0.00 94.45
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 831.00 79.73 0.04 79 0
avg-cpu: %user %nice %system %iowait %steal %idle
2.61 0.00 0.48 2.05 0.00 94.86
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 739.00 80.96 0.08 80 0
avg-cpu: %user %nice %system %iowait %steal %idle
3.34 0.00 0.46 2.15 0.00 94.05
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 712.00 74.72 0.14 74 0
avg-cpu: %user %nice %system %iowait %steal %idle
3.61 0.00 0.48 2.03 0.00 93.88
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 795.00 83.05 0.05 83 0
avg-cpu: %user %nice %system %iowait %steal %idle
6.89 0.00 0.44 2.11 0.00 90.56
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 805.00 78.56 0.07 78 0
avg-cpu: %user %nice %system %iowait %steal %idle
3.55 0.00 0.44 2.03 0.00 93.99
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 777.00 80.49 0.11 80 0
avg-cpu: %user %nice %system %iowait %steal %idle
1.67 0.00 0.48 1.82 0.00 96.03
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15747463/viewspace-1139630/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Google I/O 2019上提及的Javascript新特性GoJavaScript
- 一起看 I/O | Jetpack 元件的新特性Jetpack元件
- 谷歌的 I/O 2019,究竟推出了什麼新特性?谷歌
- 一起看 I/O | Jetpack Compose 中的新特性Jetpack
- Android O 新特性 — NotificationAndroid
- Oracle 11g DG新特性--Automatic block repairOracleBloCAI
- 計算機I/O與I/O模型計算機模型
- I/O流
- Java I/OJava
- 新特性:/dev/shm對Oracle 11g的影響devOracle
- Oracle 11g 新特性:只讀表(Read-only)Oracle
- Python教程:精簡概述I/O模型與I/O操作Python模型
- 關於I/O
- c++ I/OC++
- 【java】I/O流Java
- Java(8)I/OJava
- JAVA I/O系統Java
- 系統級 I/O
- Google I/O Extend 2018Go
- 網路I/O模型模型
- NodeJs 非同步 I/ONodeJS非同步
- 理解I/O Completion Port
- python 非同步 I/OPython非同步
- 02. I/O 操作
- Java 非同步 I/OJava非同步
- Hadoop的I/O操作Hadoop
- Linux下的5種I/O模型與3組I/O複用Linux模型
- 【面試】I/O 複用面試
- Java™ 教程(命令列I/O)Java命令列
- 流?I/O 操作?阻塞?epoll?
- I/O模型、Libuv和Eventloop模型OOP
- 由Nodejs來說I/ONodeJS
- Linux I/O排程器Linux
- 從網路I/O模型到Netty,先深入瞭解下I/O多路複用模型Netty
- oracle 11g 新特性之動態繫結變數窺視(一)Oracle變數
- oracle 11g 新特性之動態繫結變數窺視(二)Oracle變數
- asynchronous i/o (aio) on HP-UXAIUX
- Linux裡五種I/O模型Linux模型
- IRP(I/O Request Package)詳解Package