Home Database Mysql Tutorial Oracle capability i/o(压力测试数据库服务器i/o性能)

Oracle capability i/o(压力测试数据库服务器i/o性能)

Jun 07, 2016 pm 04:48 PM
oracle database

简单说明一下怎么影响重做数据的一个因素,那就是i/o吞吐量,oracle的介质恢复依赖于i/o,如果i/o存在瓶颈,那么势必会影响备库的

简单说明一下怎么影响重做数据的一个因素,那就是i/o吞吐量,Oracle的介质恢复依赖于i/o,如果i/o存在瓶颈,那么势必会影响备库的介质恢复。
 
那么i/o stack包含hbas,存储相关的交换机、存储物理磁盘。那么oracle建议在应用程序部署的时候,建议去验证i/o避免存在问题。但是之前有一个很刺手的问题,那就是如何去验证i/o侧吞吐量,换句话说怎么去验证i/o吞吐量更符合真实的生产环境。
 
  In Oracle Database 11g, the Real Application Testing feature (Capture/Replay) was introduced to inject real (captured) workload into the system. However, another new 11g feature is available to help assess the I/O capability of the database's storage system, and gauge maximum IOPS and Mbytes/s.

  capability i/o feature 是依据一个数据库内部的函数(dbms_resource_manager.calibrateio()),该函数是oracle database内部集成的,更能满足测试i/o问题,且在最后将输出相关报告信息。
 
  那么执行这个包需要注意什么呢?
 
1、权限,,必须具有sysdba执行该过程的权限,另外需要打开timed_statistics。
 
2、确定异步i/o在数据库的所有数据文件和临时文件都已经得到应用启动,我们可以通过v$datafile 和v$iostat_file视图关联进行、确认。
 
eg:
 
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' or filetype_name='Temp File');
 
如果异步i/o没有启动,设置disk_asynch_io=true启动该功能,但默认是开启的,如果在linux中最大slots使用完毕,那么将自动关闭噶 功能,这也就是为什么虽然设置了disk_asynch_io=true了却依然没有达到效果。最大的slots可以查看/proc/sys/fs/aio-max-nr  当前使用的可以查看/proc/sys/fs/aio-nr去分别确认。
 
3、确保服务器只有需要测试的数据库开启,避免 其他应用软件的影响。
 
4、对于RAC,需要确保所有的实例都开启,因为 将会对所有节点做全面的校对,执行该过程只需在一个实例即可。
 
5、确保只有一个用户执行一个校对i/o的操作。可以通过v$io_calibration_status查看当前鉴定状态。
 
另外查看资料了解到有这么几个过程:
 
The calibration will run in different phases. In the first phase, small block random I/O
 workload is performed on each node and then concurrently on all nodes. The second
 phase will generate large block sequential I/O on each node. Note, that the Calibrate
 I/O is expecting that a datafile is spread across all disks specified in NUM_DISKS
 variable. Furthermore, offline files are not considered for file I/O.
 
一旦执行完毕,其结果将存在于dba_rsrc_io_calibrate表中。
 
 
 
好了。
 
了解到这些,下面开始去实验操作。让实践得真知。
 
语法如下:
 
SET SERVEROUTPUT ON
 DECLARE
  lat  INTEGER;
  iops INTEGER;
  mbps INTEGER;
 BEGIN
 -- DBMS_RESOURCE_MANAGER.CALIBRATE_IO (, , 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;
 /
 参数介绍如下:
 
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(平均延迟)

更多详情见请继续阅读下一页的精彩内容:

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to check which table space a table belongs to in Oracle How to check which table space a table belongs to in Oracle Jul 06, 2023 pm 01:31 PM

How to check which table space a table belongs to in Oracle: 1. Use the "SELECT" statement and specify the table name to find the table space to which the specified table belongs; 2. Use the database management tools provided by Oracle to check the table space to which the table belongs. Tools usually provide a graphical interface, making the operation more intuitive and convenient; 3. In SQL*Plus, you can view the table space to which the table belongs by entering the "DESCRIBEyour_table_name;" command.

How to connect to Oracle database using PDO How to connect to Oracle database using PDO Jul 28, 2023 pm 12:48 PM

Overview of how to use PDO to connect to Oracle database: PDO (PHPDataObjects) is an extension library for operating databases in PHP. It provides a unified API to access multiple types of databases. In this article, we will discuss how to use PDO to connect to an Oracle database and perform some common database operations. Step: Install the Oracle database driver extension. Before using PDO to connect to the Oracle database, we need to install the corresponding Oracle

How to retrieve only one piece of duplicate data in oracle How to retrieve only one piece of duplicate data in oracle Jul 06, 2023 am 11:45 AM

Steps for Oracle to fetch only one piece of duplicate data: 1. Use the SELECT statement combined with the GROUP BY and HAVING clauses to find duplicate data; 2. Use ROWID to delete duplicate data to ensure that accurate duplicate data records are deleted, or use "ROW_NUMBER" ()" function to delete duplicate data, which will delete all records except the first record in each set of duplicate data; 3. Use the "select count(*) from" statement to return the number of deleted records to ensure the result.

How to use php to extend PDO to connect to Oracle database How to use php to extend PDO to connect to Oracle database Jul 29, 2023 pm 07:21 PM

How to use PHP to extend PDO to connect to Oracle database Introduction: PHP is a very popular server-side programming language, and Oracle is a commonly used relational database management system. This article will introduce how to use PHP extension PDO (PHPDataObjects) to connect to Oracle database. 1. Install the PDO_OCI extension. To connect to the Oracle database, you first need to install the PDO_OCI extension. Here are the steps to install the PDO_OCI extension: Make sure

Implement data import into PHP and Oracle databases Implement data import into PHP and Oracle databases Jul 12, 2023 pm 06:46 PM

Implementing data import into PHP and Oracle databases In web development, using PHP as a server-side scripting language can conveniently operate the database. As a common relational database management system, Oracle database has powerful data storage and processing capabilities. This article will introduce how to use PHP to import data into an Oracle database and give corresponding code examples. First, we need to ensure that PHP and Oracle database have been installed, and that PHP has been configured to

Does oracle database require jdk? Does oracle database require jdk? Jun 05, 2023 pm 05:06 PM

The oracle database requires jdk. The reasons are: 1. When using specific software or functions, other software or libraries included in the JDK are required; 2. Java JDK needs to be installed to run Java programs in the Oracle database; 3. JDK provides Develop and compile Java application functions; 4. Meet Oracle's requirements for Java functions to help implement and implement specific functions.

How to use PHP and Oracle database connection pools efficiently How to use PHP and Oracle database connection pools efficiently Jul 12, 2023 am 10:07 AM

How to efficiently use connection pooling in PHP and Oracle databases Introduction: When developing PHP applications, using a database is an essential part. When interacting with Oracle databases, the use of connection pools is crucial to improving application performance and efficiency. This article will introduce how to use Oracle database connection pool efficiently in PHP and provide corresponding code examples. 1. The concept and advantages of connection pooling Connection pooling is a technology for managing database connections. It creates a batch of connections in advance and maintains a

How to query table space size in oracle How to query table space size in oracle Jul 06, 2023 pm 01:45 PM

Steps to query the table space size in Oracle: 1. Log in to the Oracle database using a database administrator account; 2. Use the "SELECT" statement to view the space list; 3. There are three methods to query the table space size: use the dbms_utility package to query, and use the dba_segments view Query, use the dba_data_files view query; 4. Use the "DBMS_OUTPUT.PUT_LINE" function or other methods to display the results to display the query results.

See all articles