日期:2013-08-03  浏览次数:20563 次


原文链接:


http://www.eygle.com/special/Use.Orastress.2.Test.Oracle.db.htm 

 

Orastress!的作者是Geoff Ingram,也就是我们前面引见的orabm的作者,他曾经为Oracle任务数年,是High Performance Oracle" (ISBN: 0471224367)一书的作者.
该书如今你可以在本站下载.

关于该工具的官方网页在这里可以找到:

http://www.linxcel.co.uk/orabm/index.html

Orastress!你可以在原网站下载,或选择本地下载.

该工具不是开源的,缺省的只能使用一个session测试,你可以从作者那里申请临时Key,通过以下页面我们可以获得7天的无功用限制使用版:

http://www.linxcel.co.uk/7505/10218_trialkey_orastress!.html

Orastress!需求在windows上运转,你需求安装Oracle客户端.

收到Key当前,注册方式如下:

 

C:\orabm>orastress!
Serial: D5F8-C0A0

After receiving the key, install as follows by entering the Name and Key into the dialog box that displays when you run:

C:\orabm>orastress! register

 

Orastress!需求的数据和orabm类似,你可以参考Orabm的安装方式.

具体安装步骤如下:

#

Operation

Command

1

create the ORABM user (assumes TOOLS tablespace, TEMP temporary tablespace)

sqlplus system/pwd @orabm_user

2

create the tables

sqlplus system/pwd @orabm_tab

3

load the data

$ orabmload Warehouses n

4

create the indexes

sqlplus system/pwd @orabm_ind

5

analyze the tables and indexes

sqlplus system/pwd @orabm_analyze

6

Ensure ORABM can run the DBMS_LOCK package

As SYS run:

GRANT EXECUTE ON DBMS_LOCK TO ORABM

留意:这里构建的如果是10个Warehouses的数据,那么大约需求1G的空间.
这里我建议对单节点数据库分别采用1,2,3,5,10个Warehouses进行1,2,4,6,10个并发的50000个事务的测试.
对于多节点RAC建议采用1,2,3,5,10个Warehouses进行1,3,4,7,10个并发的50000个事务的测试.

这一部分安装日志可以参考:安装日志

得到测试数据当前,还需求运转如下脚本:

sqlplus orabm/orabm@<your-TNS-alias> @orastress_tab.sql
sqlplus orabm/orabm@<your-TNS-alias> @orastress.plh
sqlplus orabm/orabm@<your-TNS-alias> @orastress.plb

日志参考:windows日志

命令行执行方式如下:

orastress! –s sess-iterations-list –t transacts-per-sess –c tns-alias-list –m mode [ -s batchsize]

这里需求如下参数:
-s 指定session数量
-t 指定每个session执行的事物数量.
-c 指定联合串
-m 指定运转模式.包括Read OLTP INS DIO
-s 指定对于INS或DIO模式下提交批量,缺省是10000里

Note: 如果 Orastress! 对单个Warehouse运转在read模式,那么代码执行和orabm相反.

对于四种运转模式说明如下:

READ:Runs the identical read-only workload as Orabm to stress CPU and memory.

OLTP:Uses all five TPC-C transactions: New-Order, Order-Status, Payment, Stock-Level and Delivery, in order to generate a mixed-transaction (SQL INSERT/UPDATE/DELETE) OLTP workload which stresses CPU, memory, and I/O.

INS:Runs an I/O intensive SQL INSERT workload by copying rows into the ITEM_INS table from the TPC-C ITEM table.

DIO:Runs an I/O intensive direct-path INSERT workload by copying rows into the ITEM_DIO table from the TPC-C ITEM table.

以下是一些运转举例:

Example 1:

orastress! –s 1 –t 50000 –c inst1.world –m oltp

Run one iteration - comprising 50000 transactions in 1 session - against inst1.world.
进行一组测试,通过一个session,包含50000个事务,对inst1.world数据库进行测试.

Example 2:

orastress! –s 2 –t 50000 –c inst1.world,inst2.world –m oltp

Run one iteration comprising 2 concurrent sessions of 50000 transactions on each of inst1.world,inst2.world giving a total of 4 concurrent sessions.The location of the instances specified by inst1.world,inst2.world is entirely down to the user. They could be:
运转一组测试,对两个数据库(inst1.world,inst2.world)各发出两个并发session,每个session运转50000个事务,这两个数据库可以是:

·2 instances of a RAC cluster

·different non RAC instances on the same server

·different non RAC instances on different servers (e.g. one on Linux, one on Solaris)

Example 3:

orastress! –s 1,2,4 –t 50000