ORACLE数据库优化-存储IO性能校准

解读Oracle 19.28补丁包:除了DB RU,GI和OJVM更新你打全了吗? 本文全面解析Oracle 19.28补丁包的关键组件更新策略,包括DB RU、GI和OJVM的协同升级。通过详细分析组件依赖关系、升级顺序及潜在风险,帮助DBA构建高可靠数据库升级方案,确保系统兼容性和安全性。特别强调校验码验证和标准化补丁管理流程的重要性。 阅读详情

通过数据库评估存储设备IO性能-Oracle 11g IO校准功能介绍

---------Oracle11g IO校准功能介绍

实战案例,19.5版本RAC asm存储性能检测

###查询数据文件是否支持异步IO#####

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';


########进行IO校准#######

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 (10, 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;
/

######################执行IO校准时报错信息如下############

报错信息如下:
2019-12-14T14:25:33.896235+08:00
Errors in file /u01/app/oracle/diag/rdbms/monidb/monidb1/trace/monidb1_cscm_154498.trc:
ORA-00448: normal completion of background process
ORA-27090: Unable to reserve kernel resources for asynchronous disk I/O
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 3
Additional information: 128
Additional information: 80551681480
ORA-27090: Unable to reserve kernel resources for asynchronous disk I/O
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 3
Additional information: 128


3、故障解决
#依据ORA-27090: MESSAGE 27090 NOT FOUND; (文档 ID 579108.1)文档。我们改动内核參数fs.aio-max-nr
#因为此数据库为RAC环境下,因此同一时候调整了2个节点,以下为调整后的情形。
suse11a:~ # grep max-nr /etc/sysctl.conf
#fs.aio-max-nr = 1048576
fs.aio-max-nr = 3145728

suse11b:~ # grep max-nr /etc/sysctl.conf 
#aio-max-nr = 1048576
fs.aio-max-nr = 3145728
 # sysctl -p

#配置完成后能够通过cluvy校验 
#几日后观察alert日志,未发现该类错误。

Check: Kernel parameter for "aio-max-nr" 
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  suse11a           3145728       3145728       1048576       passed          
  suse11b           3145728       3145728       1048576       passed          
Result: Kernel parameter check passed for "aio-max-nr"

proc 文件系统包含了两个虚拟文件,它们可以用来对异步 I/O 的性能进行优化:

/proc/sys/fs/aio-nr 文件提供了系统范围异步 I/O 请求现在的数目。

/proc/sys/fs/aio-max-nr 文件是所允许的并发请求的最大个数

在一个程序中如果涉及到磁盘的IO操作时,有两种情况
1. 程序等待IO操作完成,CPU再接下来处理程序的其他部分(等待IO的时间段内,CPU处于Idle Waiting状态)。
2. 程序不等待IO操作完成,允许CPU处理接下来的其他任务(或者理解为允许CPU处理接下来的不依赖于IO完成的任务)。
显然,第一种情况,CPU的资源白白的浪费了,也就是同步IO。第二种情况更有利于CPU的充分利用,这就是异步IO(asynchronous IO)

我们知道aio-nr是所有当前活动的异步IO进程上下文的总和,其值最多不能超过aio-max-nr的设定值。
并且数据库是在机房意外断电的情况下突然关闭的,关闭的一瞬间有大量的事务正在运行,
所以重新启动的时候必然有大量的回滚与已提交但没有写入到数据文件的数据要开始写入,这时候的IO量是非常大的,由于启用了异步IO,此时大量的上下文切换达到了操作系统设定的最大值,
于是oracle就停止响应了。查询metalink了解到oracle已证实这是一个BUG,官方建议fs.aio-max-nr的值设置为1M或以上可以解决此问题。

解决办法:

 echo "fs.aio-max-nr = 3145728" >> /etc/sysctl.conf

重启oracle服务

set lines 120
col CALIBRATION_TIME for a30
select * From v$io_calibration_status;


SQL> V$IOSTAT_FUNCTION

set lines 120
col name for a30
select name,phyrds,phywrts from v$filestat a,v$datafile b where a.file#=b.file#  order by  phyrds desc fetch limit 10;


[oracle@rac02 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Dec 14 15:02:20 2019
Version 19.5.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.5.0.0.0

SQL> SET SERVEROUTPUT ON
SQL> DECLARE
  2  lat INTEGER;
  3  iops INTEGER;
  4  mbps INTEGER;
  5  BEGIN
DBMS_RESOURCE_MANAGER.CALIBRATE_IO (<DISKS>, <MAX_LATENCY>, iops,mbps, lat);
DBMS_RESOURCE_MANAGER.CALIBRATE_IO (10, 10,iops, mbps, lat);
DBMS_OUTPUT.PUT_LINE ('max_iops = ' || iops);
DBMS_OUTPUT.PUT_LINE ('latency  = ' || lat);
dbms_output.put_line('max_mbps = ' || mbps);
 10   11  end;
/ 12  

max_iops = 54217
latency  = 29.579
max_mbps = 1418
max_iops = 54217
latency  = 30
max_mbps = 1418

PL/SQL procedure successfully completed.


SQL> select  MAX_IOPS,MAX_MBPS,MAX_PMBPS,LATENCY from DBA_RSRC_IO_CALIBRATE;

  MAX_IOPS   MAX_MBPS  MAX_PMBPS    LATENCY
---------- ---------- ---------- ----------
     54217       1418        457     29.579

SQL> 

SQL> SQL> SQL> SQL> SQL> SQL> 

最后在DBA_RSRC_IO_CALIBRATE视图中,可以查询到本次IO校准的各个性能指标值如下,
本次测试的存储性能,
每秒持续读取数据块请求的最大数量(max_iops)为60,
每秒最大可读取(max_mbps)为43mbps,
单个进程每秒最大可读取(max_pmbps)为39mbps,
读取数据块请求出现有16次延迟

 

 

 

 

前言

  I/O子系统是ORACLE数据库的一个重要组成部分,因为I/O操作是贯穿数据库管理全过程,它操作的对象包括日志、表、索引、数据字典、以及一些排序、undo操作等等,每个数据库读取或者写入磁盘上的数据,都会产生磁盘IO,可以这么说一个正常业务的数据库系统,80%的性能消耗都与IO有关,相对于网络、CPU、内存等其他硬件的迅猛发展,磁盘的读写速度的发展却相对滞后,这也导致许多业务性能瓶颈集中在有限的磁盘IO上,一旦出现IO瓶颈导致的性能问题,表现为CPU有时候会花大部分的时间等待IO操作,我们把这种情况称为IO密集性(I/O-bound)系统。

 

我们在处理ZLHIS业务系统性能问题的时候,大部分也是在处理IO性能问题,主要表现在三方面:

1、HIS系统是业务高密集系统,在业务高峰期会形成大量集中的并发操作,产生大量的I/O操作;

2、不规范的SQL语句导致的过度的磁盘访问(如:全表扫描等);

3、由于硬件导致的存储IO本身的性能问题;

上图就是一个某客户真实环境下I/O性能瓶颈的AWR性能报告,TOT5等待事件中,主要就是I/O类型的等待,在处理类似问题的时候,我们都先假定存储的I/O性能是满足我们的业务需求的,忽略存储本身的性能问题,而着重解决1、2应用设计或者SQL代码不规范导致的过度I/O读取,但有时导致I/O性能的问题根本的原因恰恰就是存储,遇到这种问题的时候,我们过去都是通过文件拷贝、复制读写都操作主观的感受存储的性能,或者找硬件商协助分析,前一种方式不便于我们从数据指标上给存储性能予以定型,特别是在某些瞬时集中IO访问出现瓶颈的存储设备上给出充分的说服力,后一种方式如果遇到硬件商本身不配合,我们处理问题就非常的尴尬,这时候我们急需一种方式对够自主的对存储进行性能评估,给出评估性能指标以便对I/O性能进行量化,为问题的分析解决给出可靠的依据。

IO相关概念

在对存储性能进行评估之前,我们有必要了解几个关于IO的指标概念,只有对这几个指标概念有了了解,我们才能客观的评价一个存储性能的好坏。

IOPS(I/OOperations Per Second):是用来计算I/O流中每个节点中每秒传输的数量,表示每秒进行读写(I/O)操作的次数,多用于评估衡量存储随机访问的性能。IOPS通常对于小I/O,且传输I/O的数量比较大的情况下,是一个最主要的衡量指标。例如,典型的OLTP系统中,高的IOPS则意味相同时间内更多的数据库事务可以被存储系统处理。

IO响应时间(latency):指内核对磁盘发出一个读或者写的IO命令,到内核接收到回应的时间。

吞吐量(Throughput):来计算每秒在I/O流中传输的数据总量。这个指标,在大多数的磁盘性能计算工具中都会显示,最简单的在Windows文件拷贝的时候,就会显示MB/s,吞吐量衡量对于大I/O,特别是传输一定数据的时候最小化耗时非常有用,例如,备份数据的时候,在备份作业中,我们通常不会关心有多少I/O被存储系统处理了,而是完成备份总数据的时间多少。

以上三个指标基本上能够衡量存储的IO性能,其中IOPS和吞吐量是越大越好,IO响应时间当然是越短越好。

IO校准

存储整体性能主要由一系列关键组件层共同作用,包括HBA、Storage Switches、Storage Array和Physical Disks。这些对象共同合力,才能形成系统整体的IO能力有IO整体性能,通过Oracle的I/O校准功能,使您能够评估存储的整体性能,并判断和确认I/O性能问题是否由数据库或存储系统造成的。不同于其他借助外部I/O评估工具,Oracle的I/O校准功能的原理是数据库随机使用其数据文件访问存储,这样产生的结果能更加真实的反映数据库访问存储的实际性能,它可以帮助计算出当前存储最大的IOPS和吞吐量,要使用这个特性必须满足以下条件:

  • 数据库版本为11g

  • 操作用户必须要有sysdba权限

  • 数据库参数timed_statistics必须是true

  • 必须允许IO异步,但用的是文件系统,可以通过设置FILESYSTEMIO_OPTIONS参数为setall

  • 确保数据文件允许异步IO,可以通过下面的SQL语句确认:

COL NAME FORMAT A50

SELECT NAME,ASYNCH_IOFROM V$DATAFILE F,V$IOSTAT_FILE I

WHERE  F.FILE#=I.FILE_NO

AND    FILETYPE_NAME='Data File';

I/O校准是通过调用Oracle内部dbms_resoure_manager.cakibrate_io包来获取,其发出一系列I/O密集型的只读工作量到数据库文件,通过这些操作确定存储的最大IOPS(每秒IO请求数)和存储每秒能够执行的吞吐量MBPS(兆字节每秒I/O)。

I/O校准分为两步:第一步dbms_resource_manager.calibrate_io包按照数据文件块大小随机读取的所有数据文件,通过持续的读取操作能够获取存储的最大IOPS(max_iops),同时输出校准期间的平均延迟(actual_latency),当然你可以通过输入参数max_latency指定目标延迟(指定的最大可容忍数据库块大小的IO请求延迟的毫秒数)。第二步是通过dbms_resource_manager.calibrate_io包按照1M大小持续读取所有数据文件,这一步主要是为了获取最大吞吐量这个重要的指标。

如果用户能够提供的num_physical_disks输入参数可以使得I/O校准运行更准确,这个参数它指定在数据库中存储系统的物理磁盘的近似数,如果不清楚就输1也行,认为只是一块磁盘。

下面是一个执行DBMS_RESOURCE_MANAGER.CALIBRATE_IO包的案例,语句非常简单,如下:

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;

/

校准的操作很简单,但是在运行时需要注意以下几点事项:

  • 同一时间只能运行一个IO校准过程,千万不要并行运行,如果您同时运行,I/O校准将不能正常执行;

  • 因过程执行对IO消耗非常大,请确保实例在空闲状态下执行;

  • 如果是RAC环境,要确保所有节点实例都是启动状态;

  • 过程包中的num_physical_disks输入参数是可选的。磁盘数不用太准确,输入个近似值这样可以使得校准更快、更准确。

最后在I/O校准过程中,你可以在v$io_calibration_status视图查看校准状态。在I/O校准成功后,你可以在dba_rsrc_io_calibrate表查看校准结果,为了更好的理解I/O校准过程,我们拿台普通的台式机来进行下演示,看下是如何进行IO校准操作的。

 

通过v$io_calibration_status可以查看执行状态,可以看到进程正在执行,如下

 

在操作系统的任务管理器的性能监控中可以看到,每个数据文件都产生大量的IO读取,Oracle就是通过这种读取操作来进行存储性能的评估。

 

最后在DBA_RSRC_IO_CALIBRATE视图中,可以查询到本次IO校准的各个性能指标值如下,本次测试的存储性能,每秒持续读取数据块请求的最大数量(max_iops)为60,每秒最大可读取(max_mbps)为43mbps,单个进程每秒最大可读取(max_pmbps)为39mbps,读取数据块请求出现有16次延迟

 

这里我们注意了同样的IO校准执行2次,结果也会有所差异,不可能几次执行结果100%相同,这是因为存储性能涉及的因素非常多,比如当时存储的繁忙状态、温度、IO请求等,这些都会对校准有细微的影响,但是总的范围还是不会有太大的出入。

 

性能判断

通过校准我们得到了一些指标,那么怎样的存储性能才是满足业务需求的呢?严格意义上说,当然是IOPS越大,吞吐量越大越好,但是成本也会增加,因此实际情况下还是要根据用户业务的实际情况判断,合适就可以了。用户的IO需求可以通过业务高峰期AWR报告进行查看,通过生成业务高峰期的AWR报告,查看报告中的other instance activity stats这部分内容获取,以某用户的AWR性能报告为例,重点关注这几个指标[physical read total IOrequests],[ physical read total bytes],[ physical write total IO requests],[ physicalwrite total IO requests]每秒的值,因为我们IO校准也是以每秒为单位的统计。

 

我们可以计算出物理读和写每秒总的请求为70.74+80.62≈151次,物理读和写的每秒的大小为1.32+1.09≈2.41mbs=19.28mbps,有了这个参照,那我们存储校准的最大IOPS就应该不能低于151,每秒的吞吐量也不能低于19.28mbps,如果IO校准接近或者小于这个值就证明存储性能出现了严重的瓶颈,例如我们测试用的机器就无法满足这个用户的IO性能需求,需要提升性能以满足业务的需要。

 

METALINK文档信息如下:

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.2 and later
Information in this document applies to any platform.

PURPOSE

In 11.2.0.2 Automatic Degree of Parallelism can only be used if  I/O statistics are gathered.

This Note explains what DBA has to do in order to make sure Automatic Degree of Parallelism works.

SCOPE

For DBAs 

The AutoDOP is not a feature to use more parallelism. It is a feature that restricts the parallel to maximize throughput,
so it is expected that with AutoDOP not all queries will run in parallel and the ones that do run in parallel may not run with full parallelism, as this is the technical specifications of the feature.

Ask Questions, Get Help, And Share Your Experiences With This Article

Would you like to explore this topic further with other Oracle Customers, Oracle Employees, and Industry Experts?

Click here to join the discussion where you can ask questions, get help from others, and share your experiences with this specific article.
Discover discussions about other articles and helpful subjects by clicking here to access the main My Oracle Support Community page for Database Datawarehousing.

DETAILS

When PARALLEL_DEGREE_POLICY is set to AUTO, Oracle Database determines whether a statement should run in parallel based on the cost of the operations in the execution plan and the hardware characteristics.

AutoDOP is used when PARALLEL or PARALLEL(AUTO) statement level hint is used regardless of the value of the PARALLEL_DEGREE_POLICY (see documentation).

 

IO Calibration

The hardware characteristics include I/O calibration statistics so these statistics must be gathered otherwise Oracle Database does not use the automatic degree parallelism feature.

If I/O calibration has not been run to gather the required statistics, the explain plan includes the following text in its notes section:  ": skipped because of IO calibrate statistics are missing"

explain plan for 
select /*+ parallel */ * from emp;

Plan hash value: 2873591275 
--------------------------------------------------------------------------------------------------------------
| Id  | Operation            | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
--------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT     |          |    14 |   532 |     2   (0)| 00:00:01 |        |      |            |
|   1 |  PX COORDINATOR      |          |       |       |            |          |        |      |            |
|   2 |   PX SEND QC (RANDOM)| :TQ10000 |    14 |   532 |     2   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
|   3 |    PX BLOCK ITERATOR |          |    14 |   532 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            |
|   4 |     TABLE ACCESS FULL| EMP      |    14 |   532 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            |
--------------------------------------------------------------------------------------------------------------

 Note 
 ----- 
 - dynamic sampling used for this statement (level=2) 
 - automatic DOP: skipped because of IO calibrate statistics are missing

The Oracle PL/SQL package DBMS_RESOURCE_MANAGER.CALIBRATE_IO is used to execute the calibration. The duration of the calibration is dictated by the NUM_DISKS variable as well as the number of nodes in the RAC cluster.

SET SERVEROUTPUT ON
DECLARE
   lat INTEGER;
   iops INTEGER;
   mbps INTEGER;
BEGIN
    --DBMS_RESOURCE_MANAGER.CALIBRATE_IO(, ,iops, mbps, lat);
    DBMS_RESOURCE_MANAGER.CALIBRATE_IO (28, 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;
/

 

Note that the first two variables (NUM_DISKS, MAX_LATENCY) are input variables, and the remaining three are output variables.

NUM_DISKS - To get the most accurate results, its best to provide the actual number of physical disks that are used for this database. The Storage Administrator can provide this value. Keep in mind that when ASM is used to manage the database files, say in the DATA diskgroup, then only physical disks that make up the DATA diskgroup should be used for the NUM_DISKS variable; i.e.; do not include the disks from the FRA diskgroup. In the example above the DATA diskgroup is made up of 28 physicals (presented as 4 LUNs or ASM disks)

LATENCY– Maximum tolerable latency in milliseconds for database-block-sized IO requests.

You find more information about CALIBRATE_IO in Note: 727062.1  Configuring and using Calibrate I/O.

In order to verify whether the calibration run was successful, query V$IO_CALIBRATION_STATUS after you executed DBMS_RESOURCE_MANAGER.CALIBRATE_IO call.

select * from V$IO_CALIBRATION_STATUS;

STATUS   CALIBRATION_TIME
-------- ----------------------------- 
READY    25-NOV-10 08.53.08.536

The execution plan now shows that the feature automatic degree of parallelism can be used:

explain plan for 
select /*+ parallel */ * from emp;
Plan hash value: 2873591275 
--------------------------------------------------------------------------------------------------------------
| Id  | Operation            | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
--------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT     |          |    14 |   532 |     2   (0)| 00:00:01 |        |      |            |
|   1 |  PX COORDINATOR      |          |       |       |            |          |        |      |            |
|   2 |   PX SEND QC (RANDOM)| :TQ10000 |    14 |   532 |     2   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
|   3 |    PX BLOCK ITERATOR |          |    14 |   532 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            |
|   4 |     TABLE ACCESS FULL| EMP      |    14 |   532 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            |
--------------------------------------------------------------------------------------------------------------

Note 
----- 
- dynamic sampling used for this statement (level=2)
- automatic DOP: Computed Degree of Parallelism is 2 

 There is known issue with DBMS_RESOURCE_MANAGER.CALIBRATE_IO.

Note: 10180307.8 DBRM DBMS_RESOUCE_MANAGER.CALIBRATE_IO REPORTS VERY HIGH MAX_PMBPS If CALIBRATE_IO can not be used you can set the relevant value manual:

delete from resource_io_calibrate$;
insert into resource_io_calibrate$
values(current_timestamp, current_timestamp, 0, 0, 200, 0, 0); 
commit;

 You have to restart the database after this change.

200 is a value that works well for Machine with a fast I/O subsystem, as example for Exadata Machines. If you set the number (max_pmbps) lower your calculated DOP will increase. If you set max_pmbps higher the calculated DOP are decreased. It appears that 200 is a reasonable value to deal with concurrency on a system.

 

Automatic DOP is not computed if
  -  the database is not opened, or
  -  the database is in restricted access (DBA) or read-only or migrate mode, or
  -  database is suspended, or
  -  instance is not open , or
  - the SQL cursor is not supported do run in AutoDOP mode.

Tuning Parameters

When you use AutoDOP, you may want to adjust some tuning parameters.  See Document 1549214.1 Setup, Monitor, And Tune Parallelism In The Database for information about these parameters.   The parallel_servers_target should always be smaller than parallel_max_servers, with parallel_servers_target anywhere from 75% to 50% of parallel_max_servers.  If you start seeing a lot of DOP downgrades, you should make the distance between the values for these two parameters greater.

parallel_servers_target
parallel_min_time_threshold

 



 

Overview I/O Calibration

Oracle Database 11g introduces an I/O Calibration mechanism, whereby you can run I/O calibration tests either through the Enterprise Manager Performance page or a PL/SQL package. Oracle’s I/O calibration is a variation on the Clarion tool. In an Oracle database, the I/O workload is of two basic types—small random I/O and large sequential I/O. OLTP applications usually experience the small random I/O workload, where the speed with which small I/O requests are serviced is paramount. Thus, disk spinning and seeking times are of critical importance. OLAP applications, on the other hand, employ the large sequential I/O in general. For these types of applications, the critical factor is the capacity of the I/O channel. The larger the I/O channels between the database server and the storage system, the larger the I/O throughput. Oracle uses the following two metrics, each measuring the efficacy of one type of I/O workload:

  • IOPS (I/O per second)  The IOPS rate is the number of small random I/Os the system can perform in a second and depends on the spin speed of disks. You can increase the IOPS rate by increasing the number of disks in the storage array or by using faster disk drives, which have a high RPM and lower seek time.
  • MBPS (megabytes per second)  This metric measures the data transfer rate between the server and the storage array and depends on the capacity of the I/O channel between the two systems. A larger I/O channel means a higher MBPS rate.

Two important terms need clarification in this discussion: throughput and latency. The throughput of a system determines how fast it can transfer data and is measured by the MBPS metric. The channel capacity determines the overall throughput of the system, and it thus puts the ceiling on the amount of data transfer. Latency refers to the lag between the time an I/O request is made and when the request is serviced by the storage system. High latency indicates a system that’s overloaded and you can reduce latency by striping data across multiple spindles, so different disks can service the same I/O request in parallel.

Oracle recommends that you use the new I/O Calibration tool to determine I/O metrics in a database. It takes about 10 minutes to run the tools and you should pick a time when the database workload is light to avoid overstressing the storage system. You can run only a single calibration task at a time. If you perform the task in an RAC environment, the workload is generated simultaneously from all instances in the system. You can either run the tool with Enterprise Manager or through PL/SQL.

Calibrating I/O Using PL/SQL

You can also use the new procedure CALIBRATE_IO from the DBMS_ RESOURCE_MANAGER package to run the I/O Calibration task. Here is an example:

begin
  exec dbms_resource_manager.calibrate_io(-
  num_disks         => 1,   -
  max_latency       => 10, -
  max_iops          => :max_iops, -
  max_mbps          => :max_mbps, -
  actual_latency    => :actual_latency);
 end;
 /
In the CALIBRATE_IO procedure, the following are the key parameters:

  • num_disks: Approximate number of disks in the storage array.
  • max_latency: Maximum tolerable latency (in milliseconds) for an I/O request.
  • max_ios: Maximum number of random DB block-sized read requests that can be serviced.
  • max_mbps: Maximum number of randomly distributed 1MB reads that can be serviced (in megabytes per second).
  • actual_latency: Average latency of DB block-sized I/O requests at max_iops rate (in milliseconds).

The procedure only works if asynchronous I/O is enabled. If asynchronous I/O is not enabled, the procedure returns the following error.
DECLARE
*
ERROR at line 1:
ORA-56708: Could not find any datafiles with asynchronous i/o capability
ORA-06512: at "SYS.DBMS_RMIN", line 453
ORA-06512: at "SYS.DBMS_RESOURCE_MANAGER", line 1153
ORA-06512: at line 6
You can use the FILESYSTEMIO_OPTIONS static initialization parameter to enable or disable asynchronous I/O or direct I/O on file system files. This parameter is platform-specific and has a default value that is best for a particular platform.
FILESYTEMIO_OPTIONS can be set to one of the following values:

  • ASYNCH: enable asynchronous I/O on file system files, which has no timing requirement for transmission.
  • DIRECTIO: enable direct I/O on file system files, which bypasses the buffer cache.
  • SETALL: enable both asynchronous and direct I/O on file system files.
  • NONE: disable both asynchronous and direct I/O on file system files.

SQL> SHOW PARAMETER FILESYSTEMIO_OPTIONS
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
filesystemio_options                 string      none
ALTER SYSTEM SET FILESYSTEMIO_OPTIONS=SETALL SCOPE=SPFILE;
SHUTDOWN IMMEDIATE;
STARTUP;

Usage Notes

  • Only users with the SYSDBA privilege can run this procedure. Qualified users must also turn on timed_statistics, and ensure asynch_io is enabled for datafiles. This can be achieved by setting filesystemio_options to either ASYNCH or SETALL. One can also query the asynch_io status by means of the following SQL statement:
    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';
  • Only one calibration can be run at a time. If another calibration is initiated at the same time, it will fail.
  • For an Oracle Real Application Clusters (Oracle RAC) database, the workload is simultaneously generated from all instances.

For timed_statistics paramter,please refer to following illustration :

TIMED_STATISTICS specifies whether or not statistics related to time are collected.Values:

  • true: The statistics are collected and stored in trace files or displayed in the V$SESSTATS and V$SYSSTATS dynamic performance views.
  • false: The value of all time-related statistics is set to zero. This setting lets Oracle avoid the overhead of requesting the time from the operating system.

Starting with release 11.1.0.7.0, the value of the TIMED_STATISTICS parameter cannot be set to false if the value of STATISTICS_LEVEL is set to TYPICAL or ALL.
On some systems with very fast timer access, Oracle might enable timing even if this parameter is set to false. On these systems, setting the parameter to true can sometimes produce more accurate statistics for long-running operations.

The [G]V$IO_CALIBRATION_STATUS views show the current status of the calibration runs. During a run the status of 'IN PROGRESS' is displayed. Once a run is complete the status switches to 'READY' and the calibration time is displayed.Besides,NOT AVAILABLE mean Calibration results not available and CALIBRATION_TIME tell us End time of the last calibration run
SQL> SELECT * FROM v$io_calibration_status;
STATUS        CALIBRATION_TIME
------------- -------------------------------
IN PROGRESS
SQL> SELECT * FROM v$io_calibration_status;
STATUS        CALIBRATION_TIME
------------- ---------------------------------------------------------------------------
READY         28-JUL-2008 14:37:38.410
1 row selected.

Once you execute the CALIBRATE_IO procedure, you can query the V$IO_ CALIBRATION_STATUS and the DBA_RSRC_IO_CALIBRATE views to check the results. Here’s a sample query:

SQL> select max_iops, max_mbps, max_pmbps, latency
     from dba_rsrc_io_calibrate;

MAX_IOPS      MAX_MBPS      MAX_PMBPS     LATENCY
----------   ------------  ------------  ----------
133           12             6             64
Oracle Database 11g collects I/O statistics in three different dimensions to provide a consistent set of statistics for I/O calls.These dimensions are RDBMS components grouped into 12 functional groups.

  • The V$IOSTAT_ FUNCTION view provides the details. I/O statistics are collected for each consumer group that’s part of the currently enabled resource plan.
  • The V$IOSTAT_CONSUMER_GROUP view has the details.
  • Individual file level I/O statistics are collected and stored in the V$IOSTAT_ FILE view for details.
Oracle数据库服务器IO高的分析方案.docx 立即下载

相关推荐

EDA工具安装第一步:Synopsys Installer的配置与图形化界面使用详解

本文详细解析了EDA工具安装的关键第一步——Synopsys Installer的配置与使用。文章阐述了其作为统一部署管理器和依赖协调者的核心作用,并分步详解了如何通过图形化界面高效安装EDA工具,同时介绍了命令行批处理等进阶技巧,旨在帮助工程师快速搭建稳定的芯片设计环境。

zeta9的博客 360

oracle IO性能测试 -- calibrate_io

需要测试新老机器的IO性能差距,可以使用DBMS_RESOURCE_MANAGER.calibrate_io。原来在exadata上专用的,后来释放到所有的database。跑的时候可以同时执行iostat -x 1300看看,综合评估IO。另外这个跑起来要小心,不要在生产上跑,IO会跑满,utl%会100%。 1. 首先检查异步IO是否打开 SELECT d.name, i...

Hehuyi_In的博客 4931

Arduino安装图文教程:小白也能轻松上手

手把手带你完成Arduino安装全过程,无论你是编程新手还是硬件小白,都能快速搭建开发环境。结合arduino安装教程与实操步骤,避开常见错误,让创作即刻启程。

weixin_35509395的博客 1118

dbms_resource_manager.calibrate_io测试数据库IO性能

在Oracle 11g中dbms_resource_manager PL/SQL包提供了calibrate_io过程可以用来对Oracle数据库的IO子系统进行IO能力测试,其使用方法如下: SQL> SET ...

1072

星网宇达Newton-M2设备安装及配置

主要介绍了星网宇达Newton-M2设备的配置过程

weixin_49353445的博客 2689

自定义控件三部曲视图篇(六)——RecyclerView系列之三自定义LayoutManager

前言:把握生命里的每一分钟,全力以赴我们心中的梦,不经历风雨 怎么见彩虹,没有人能随随便便成功 在第一篇中已经讲过,LayoutManager主要用于布局其中的Item,在LayoutManager中能够对每个Item的大小,位置进行更改,将它放在我们想要的位置,在很多优秀的效果中,都是通过自定义LayoutManager来实现的,比如: 可以看到这些效果都非常棒,通过这一节的学习,大...

启舰 1万+

通过数据库评估存储设备IO性能-Oracle11gIO校准功能介绍

通过数据库评估存储设备IO性能 ---------Oracle11g IO校准功能介绍 前言 I/O子系统是ORACLE数据库的一个重要组成部分,因为I/O操作是贯穿数据库管理全过程,它操作的对象包括日志、表、索引、数据字典、以及一些排序、undo操作等等,每个数据库读取或者写入磁盘上的数据,都会产生磁盘IO,可以这么说一个正常业务的数据库系统,80%的性能消耗都...

diuluoshuai2303的博客 479

通过Jlink和PyLink读取蓝牙mac地址--Nordic&silicon labs

本文介绍在不开机的情况下读取蓝牙的mac地址,这里介绍两个平台,Nordic和Silicon Labs。 1. 通过Jlink Commander工具连接上目标板 选择当前芯片的型号 2. 使用mem命令查看mac地址 首先需要知道mac地址存储在芯片的哪个地址。 Nordic: 寄存器DEVICEADDRTYPE的第一个bit代表mac地址的类型,这里为1。DEVICEADDR[0]和DEVICEADDR[1]的低16bit代表了MAC地址,其中DEVICEADDR[1]的第15位应该或上DE

ching的专栏 1658

存储过程参数 大小_一文看懂Oracle11g IO校准功能--数据库评估存储设备IO性能

概述 I/O子系统是ORACLE数据库的一个重要组成部分,因为I/O操作是贯穿数据库管理全过程,它操作的对象包括日志、表、索引、数据字典、以及一些排序、undo操作等等,每个数据库读取或者写入磁盘上的数据,都会产生磁盘IO,可以这么说一个正常业务的数据库系统,80%的性能消耗都与IO有关,相对于网络、CPU、内存等其他硬件的迅猛发展,磁盘的读写速度的发展却相对滞后,这也导致许多业务性能瓶颈集中在有...

weixin_39976499的博客 312

HTML5+CSS3+JS小实例:焦点图波浪切换动画特效

实例:焦点图波浪切换动画特效。字体图标库:Font Awesome。技术栈:HTML+CSS+JS。

艾恩小灰灰的博客 920

MATLAB代码转到FPGA代码

添加完文件之后,需要设置输入的数据类型,设置完之后点击Workflow Advisor。MATLAB文件包含一个功能实现文件和测试文件。对应FPGA中的功能文件和测试文件。然后,将功能文件和测试文件添加到相应位置。然后选择APP中的HDL Coder代码。首先需要编写好MATLAB文件。点击链接,就可以查看你看到的代码。可以自己生成代码的语言类型。

小柚子的博客 3067

Oracle ORION IO 测试工具

一. ORION 概述1.1 ORION 说明 ORION (Oracle I/O Calibration Tool) 是校准用于 Oracle 数据库的存储系统 I/O 性能的独立工具。校准结果对于了解存储系统的性能有很大帮助,不仅可以找出影响 Oracle 数据库性能的问题,还能测量新数据库安装的大小。由于 ORION 是一个独立工具,用户不需要创建和运行 Oracle 数据库。Orion的下...

weixin_33695082的博客 86

YOLO项目部署:从Python脚本到Docker容器的企业级交付全流程

YOLO模型企业级Docker部署方案 核心挑战 环境一致性:解决"本地能跑,服务器崩掉"问题 可扩展性:支持单实例到多实例扩展 稳定性:确保99.9%可用性 部署流程 项目改造:模块化代码,分离配置 Docker镜像:支持CPU/GPU环境 API服务:封装推理逻辑 监控告警:实现自动化运维 技术方案 需求 解决方案 环境一致性 Docker镜像+依赖冻结 可扩展性 K8s+负载均衡 稳定性 健康检查+自动重启 项目结构 模块化代码组织 外部化配置管理 精确依赖版本控制 摘要重点:通过

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 1239

转 查看磁盘IO负载 - 看哪些进程在读写磁盘 以及oracle 异步I/O 和同步I/O

https://www.cnblogs.com/cloudstorage/archive/2012/11/11/2764623.html #####sample 1: Oracle等待事件db file async I/O submit产生原因和解决办法 时间:2017-01-08 20:45来源:Oracle研究中心作者:网络点击:771 次...

weixin_33866037的博客 524

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

不同存储结构的文件磁盘io操作次数_详解如何通过数据库评估存储设备IO性能--Oracle11g IO校准功能...

概述 I/O子系统是ORACLE数据库的一个重要组成部分,因为I/O操作是贯穿数据库管理全过程,它操作的对象包括日志、表、索引、数据字典、以及一些排序、undo操作等等,每个数据库读取或者写入磁盘上的数据,都会产生磁盘IO,可以这么说一个正常业务的数据库系统,80%的性能消耗都与IO有关,相对于网络、CPU、内存等其他硬件的迅猛发展,磁盘的读写速度的发展却相对滞后,这也导致许多业务性能瓶颈集中在有...

weixin_39917090的博客 596

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

oracle 11g IO校准

转载文章:http://blog.itpub.net/17203031/viewspace-1063523/Oracle数据库发展到今天,“IO为王”已经是一种发展方向趋势。ExtraData一体机的重要特色之一就是最大程度的发挥IO能力、提高IO吞吐量。相比CPU和内存,IO存储有其特殊性。我们讨论IO,通常成为I/O栈(I/O Stack)。I/O栈设计的对象是一系列关键组件层,包括HBA、S

changyanmanman的专栏 2377

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

如何对Exadata的I/O进行性能校准测试

前段时间看到MACLEAN LIU分享了一篇不错的关于Exadata I/O性能校准的文章:Calibrate测试Exadata IO,这篇文章基本涵盖到Exadata I/O性能校准的方法。刚好最近又有人问我这方面的问题,所以在这里再班门弄斧做一些补充,存在重复的地方请无视之。 在Exadata上如果需要对I/O进行性能校准或者测试,通常有如下几种方法: 1. Oracle的I/O性能校

newhappy的专栏 3025

Oracle性能优化:如何监控Oracle数据库的I/O性能?

理解I/O在Oracle中的完整路径,是进行I/O监控和诊断的基础:fill:#333;important;important;fill:none;color:#333;color:#333;important;fill:none;fill:#333;height:1em;CacheHitCacheMiss用户请求数据直接从内存返回DBWR/LGWR进程操作系统文件系统层存储驱动/HBA卡存储网络存储控制器物理磁盘返回数据给用户Buffer Cache太小导致频繁物理I/O。

✨ 欢迎来到【Seal ^_^ 的CSDN博客】!✨ 523

Oracle 11g中的IO Calibrate(IO校准)

Oracle 11g中的IO Calibrate(IO校准).sql Oracle数据库发展到今天,“IO为王”已经是一种发展方向趋势。ExtraData一体机的重要特色之一就是最大程度的发挥IO能力、提高IO吞吐量。 相比CPU和内存,IO存储有其特殊性。我们讨论IO,通常成为I/O栈(I/O Stack)。I/O栈设计的对象是一系列关键组件层,包括HBA、Storage Switches、St...

Mr.pan felix的专栏 2091

oracle数据库tps优化_oracle tps

http://blog.csdn.net/nilxin/article/details/5812480sample 1:定义TPS:Transactions Per Second(每秒传输的事物处理个数),即服务器每秒处理的事务数。TPS包括一条消息入和一条消息出,加上一次用户数据库访问。(业务TPS = CAPS × 每个呼叫平均TPS)TPMC:Transactions Per Minute(...

weixin_31829293的博客 691

oracle mysql 数据验证工具_Oracle Orion tool check io(ORACLE Orion 工具查看以及校验IO)

文档主要来自oracle官方文档performance 8.3章节Oracle数据库提供了Orion,一种 I/O校准工具。Orion是预测Oracle数据库性能的工具,无需安装Oracle或创建数据库。与其他 I/O校准工具不同,Oracle Orion专门用于使用与Oracle相同的 I/O软件堆栈来模拟Oracle数据库 I/O工作负载。Orion还可以模拟Oracle自动存储管理所执行的条...

weixin_36269141的博客 297

面试宝典:Oracle数据库Disk file I/O Calibration等待事件处理过程

面试宝典:Oracle数据库Disk file I/O Calibration等待事件处理过程

chenoracle的博客 1083

Oracle 11g中的IO Calibrate(IO校准)--Automatic Degree of Parallelism(DOP)

Oracle 11g中的IO Calibrate(IO校准)--Automatic Degree of Parallelism(DOP) ...

nostrud ipsum6 499

Oracle 资源管理器(Resource Manager)与I/O校准(I/O Calibrate)

Oracle 资源管理器(Resource Manager)与I/O校准(I/O Calibrate)

chenoracle的博客 1101

oracle orion安装,ORACLE ORION介绍

ORION简介ORION (Oracle I/O Calibration Tool)是校准用于Oracle数据库的存储系统I/O性能的独立工具。校准结果对于了解存储系统的性能有很大帮助,不仅可以找出影响Oracle数据库性能的问题,还能测量新数据库安装的大小。由于ORION是一个独立工具,用户不需要创建和运行Oracle数据库。为了尽可能地模拟Oracle数据库,ORION使用和Oracle相同的...

weixin_29209801的博客 321
上一篇: ORACLE集群管理-故障思路总结
下一篇: oracle数据库优化-IO性能分析优化
执笔画情ora
博客等级 码龄10年 752粉丝 464原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值