eygle's life

没有Oracle,世界将会怎样?

用户操作
[即时聊天] [发私信] [加为好友]
盖国强ID:eygle
323015次访问,排名163好友0人,关注者16
eygle的文章
原创 223 篇
翻译 0 篇
转载 5 篇
评论 368 篇
eygle的公告


最近评论
sap99:www.sap99.com/,SAP99资料多多

SAP免费资料下载
http://www.sap99.com

有很多的学习资料,推荐一下,
lynx1111:老大, 能问一下一本书赚多少银子吗?
cyco008:我运行的两种取得的SCN值也不同,而且第一次运行select max(ktuxescnw*power(2,32)+ktuxescnb) from x$ktuxe;与第二次也不同,之后的与第二次才一样。
liuya1985liuya:买了,看完了 感觉不错。
请问怎样才看一个DBA,我是做J2EE开发的,计划转做DBA,事实是也正在努力,两个多月了想找一份初级DBA或是维护又或是开发的工作,仍未找到......
liuya1985liuya:不错 买了
文章分类
收藏
    相册
    友情链接
    eygle的个人站点
    Fenng的个人站点
    我在itpub的Blog
    雪狼的个人站点
    存档
    软件项目交易
    订阅我的博客
    XML聚合  FeedSky
    订阅到鲜果
    订阅到Google
    订阅到抓虾
    订阅到BlogLines
    订阅到Yahoo
    订阅到GouGou
    订阅到飞鸽
    订阅到Rojo
    订阅到newsgator
    订阅到netvibes

    原创 Use Orastress! to test your database收藏

    新一篇: 巨人何以成为巨人--[作者]摩罗 | 旧一篇: 买房、办贷款,生活好累

    原文链接:

    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 –c inst1,inst2,inst3,inst4 –m read

    Run 3 iterations each of 50000 transactions on each of four instances: inst1, inst2, inst3 and inst4, where the number of concurrent sessions in each iteration is:
    运行3组测试,分别以1,2,4个并发session对四个实例,各执行50000个事务:

    1st iteration: 1 concurrent session on each instance, giving 4 sessions total

    2nd iteration: 2 concurrent sessions on each instance, giving 8 sessions total

    3rd iteration: 4 concurrent sessions on each instance, giving 16 sessions

    Results Output--输出结果:

    Output is very similar to Orabm, showing the transactions per second for each session in each iteration and the transaction split between the five TPC-C transactions for OLTP mode:
    输出结果和orabm非常类似,具体参考:

    http://www.eygle.com/special/Use.orabm.2.Test.System.CPU.htm

    ---begin mode=oltp sess=1 txn=5000 TNS=l Fri Sep 19 22:11:06 2003

    LXD1.WORLD #1 w=3 txn(all)=5000 xn(sam)=3999 t(sam)=431 tps=92.8 end=190903-12:25:39

    ---end - Fri Sep 19 22:20:19 2003

    在这里简单说明一下:
    对于Benchmark测试来说,最重要的是标准,如果大家有统一的模型及标准,那么测试数据也就有了意义,否则以不同的并发、数据进行各不相同的测试是不具有太大意义的.
    标准、比较、参考,这对于测试来说是最重要的.

    这里有一篇文章可供参考:

    性能测试指标介绍

    以下给出我的一些测试数据:

    1.10个Warehouse的测试数据

     

     
    E:\OraDoc\ORACLE~4\BENCHM~1\ORASTR~1>"orastress!.exe" -s 1 -t 300 -c hsbill -m oltp
    ---begin mode=oltp sess=1 txn=300 TNS=hsbill Thu Sep 30 10:35:09 2004
    HSBILL.HURRAY.COM.CN#1 w=3 txn(all)=300 xn(sam)=239 t(sam)=120 tps=2 d=13(5.4%) n=102(42.7%) o=6(2.5%) p=112(46.9%) s=6(2.5%) end=
    300904-10:34:38
    ---end - Thu Sep 30 10:37:39 2004
    
    E:\OraDoc\ORACLE~4\BENCHM~1\ORASTR~1>"orastress!.exe" -s 2 -t 300 -c hsbill -m oltp
    ---begin mode=oltp sess=2 txn=300 TNS=hsbill Thu Sep 30 10:41:40 2004
    HSBILL.HURRAY.COM.CN#1 w=4 txn(all)=300 xn(sam)=239 t(sam)=469 tps=.5 d=12(5%) n=103(43.1%) o=13(5.4%) p=101(42.3%) s=10(4.2%) end
    =300904-10:47:25
    HSBILL.HURRAY.COM.CN#1 w=4 txn(all)=300 xn(sam)=239 t(sam)=314 tps=.8 d=11(4.6%) n=92(38.5%) o=10(4.2%) p=119(49.8%) s=7(2.9%) end
    =300904-10:47:51
    ---end - Thu Sep 30 10:50:51 2004
    
    E:\OraDoc\ORACLE~4\BENCHM~1\ORASTR~1>"orastress!.exe" -s 2 -t 3000 -c hsbill -m oltp
    ---begin mode=oltp sess=2 txn=3000 TNS=hsbill Thu Sep 30 11:26:02 2004
    HSBILL.HURRAY.COM.CN#1 w=8 txn(all)=3000 xn(sam)=2399 t(sam)=4991 tps=.5 d=109(4.5%) n=1016(42.4%) o=116(4.8%) p=1050(43.8%) s=108
    (4.5%) end=300904-13:09:23
    HSBILL.HURRAY.COM.CN#1 w=4 txn(all)=3000 xn(sam)=2399 t(sam)=5432 tps=.4 d=87(3.6%) n=997(41.6%) o=128(5.3%) p=1070(44.6%) s=117(4
    .9%) end=300904-13:13:50
    ---end - Thu Sep 30 13:16:51 2004
    					  

    2.5个warehouse的测试数据

     

     
    E:\OraDoc\ORACLE~4\BENCHM~1\ORASTR~1>"orastress!.exe" -s 2 -t 300 -c hsbill -m oltp
    ---begin mode=oltp sess=2 txn=300 TNS=hsbill Thu Sep 30 15:48:20 2004
    HSBILL.HURRAY.COM.CN#1 w=2 txn(all)=300 xn(sam)=239 t(sam)=13 tps=18.4 d=7(2.9%) n=97(40.6%) o=9(3.8%) p=119(49.8%) s=7(2.9%) end=
    300904-15:45:40
    HSBILL.HURRAY.COM.CN#1 w=5 txn(all)=300 xn(sam)=239 t(sam)=19 tps=12.6 d=7(2.9%) n=97(40.6%) o=11(4.6%) p=112(46.9%) s=12(5%) end=
    300904-15:45:47
    ---end - Thu Sep 30 15:48:47 2004
    						

     

     

    发表于 @ 2004年09月30日 23:15:00|评论(loading...)|编辑

    新一篇: 巨人何以成为巨人--[作者]摩罗 | 旧一篇: 买房、办贷款,生活好累

    评论:没有评论。

    发表评论  


    当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
    Csdn Blog version 3.1a
    Copyright © eygle