启动异步io:
SQL> show parameter disk_asynch_io
NAME TYPE VALUE
disk_asynch_io boolean TRUE
SQL> show parameter filesystemio_options
NAME TYPE VALUE
filesystemio_options string none
当前使用的是文件系统,因此需要将filesystemio_options设置为asynch,才能开启异步io:
SQL> ALTER SYSTEM SET FILESYSTEMIO_OPTIONS = ASYNCH SCOPE = SPFILE;
System altered.
重启数据库。
SQL> set serveroutput on
SQL> declare
lat integer;
iops integer;
mbps integer;
begin
–dbms_resource_manager.calibrate_io(<num_disks>,<max_latency>,iops,mbps,lat);
dbms_resource_manager.calibrate_io(68,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;
/
max_iops=18882 持续中每秒请求最大i/o的数量
latency=10 平均延迟
max_mbps=3160 持续中最大的吞吐量M为单位
PL/SQL procedure successfully completed.
SQL> select * from dba_rsrc_io_calibrate;
START_TIME
END_TIME
MAX_IOPS MAX_MBPS MAX_PMBPS LATENCY NUM_PHYSICAL_DISKS
17-DEC-18 03.39.03.566802 PM
17-DEC-18 03.45.41.369984 PM
18882 3160 172 10 68
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SQL参数说明
Parameter Description
num_physical_disks
Approximate number of physical disks in the database storage(物理磁盘个数 input)
max_latency
Maximum tolerable latency in milliseconds for database-block-sized IO requests(最大可用容忍延迟的毫秒数 input)
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.(持续中每秒请求最大i/o的数量 output)
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.(持续中最大的吞吐量M为单位)
actual_latency
Average latency of database-block-sized I/O requests at max_iops rate, expressed in milliseconds(平均延迟)