搜索
首页数据库mysql教程oracle压力测试之orastress!

orastress主要测试数据库的压力。它可以测试数据库的CPU或者内存的压力(以只读方式),也可以使用包括普通INSERT和直接路径INSERT两种方式测试数据库的I/O能力。 orastress只能运行在windows下,但它也可以测试远程服务器的压力。 1、下载 下载地址是 http:

orastress主要测试数据库的压力。它可以测试数据库的CPU或者内存的压力(以只读方式),也可以使用包括普通INSERT和直接路径INSERT两种方式测试数据库的I/O能力。
orastress只能运行在windows下,但它也可以测试远程服务器的压力。

1、下载
下载地址是
http://www.linxcel.co.uk/orabm/orastress.zip

2、安装
orastress!使用的用户和数据和orabm类似,它的安装方法和orabm也类似。

1) 扩充表空间
orastress!使用orabm用户作为测试用户,orabm用户默认使用tools表空间作为默认表空间,在本测试中要导入10个Warehouses的数据,数据库大概在1G左右,所以,要保证orabm所用的表空间大于1G
SQL> alter database datafile 'E:ORACLEORADATAORACLE9ITOOLS01.DBF' resize 1500m;
2) 删除orabm用户
如果你的数据库没有orabm用户,则跳过这步
DROP USER ORABM CASCADE;
3) 创建用户
sqlplus system/pwd @orabm_user
远程数据库使用:
sqlplus
system/pwd@tnsname @orabm_user
4) 创建表
sqlplus system/pwd @orabm_tab
远程数据库使用:
sqlplus
system/pwd@tnsname @orabm_tab
5) 装载数据
orabmload Warehouses 10
这里装载10个warehouses的数据进行测试。数据量大概在1G左右,执行时间估计在15分钟左右。
如果是远程数据库,则先
set LOCAL=tnsname
然后再执行orabmload
6) 创建索引
sqlplus system/pwd @orabm_ind
远程数据库使用:
sqlplus
system/pwd@tnsname @orabm_ind
7) 分析表和索引
sqlplus system/pwd @orabm_analyze
远程数据库使用:
sqlplus
system/pwd@tnsname @orabm_analyze
8) 授权
连接到目标服务器,以sys执行
GRANT EXECUTE ON DBMS_LOCK TO ORABM
9) 创建压力测试插入记录所用的表
sqlplus orabm/orabm @orastress_tab.sql
远程数据库使用:
sqlplus
orabm/orabm@tnsname @orastress_tab.sql
10) 创建orastress!用到的包和存储过程
创建包:
sqlplus orabm/orabm @orastress.plh
创建包体:
sqlplus orabm/orabm @orastress.plb
远程数据库使用:
sqlplus
orabm/orabm@tnsname @orastress.plh
sqlplus
orabm/orabm@tnsname @orastress.plb
11) 申请注册码
经过以上步骤,在oracle的测试环境基本搭建完成,可以使用orastress!开始测试了。但orastress!是共享软件,没有注册只能使用1个并发测试数据库,我们可以申请一个有效期为20天的、功能无限制的试用注册码。
申请注册码的步骤是:
首先运行
D:programeroracle tools压力orastress>"orastress!.exe"
Serial: 1274-0B71
Licensed to: DEFAULT
Evaluation version: 1 session only per database
得到的1274-0B71就是序列号(不同的机器有不同的序列号)
然后登录
http://www.linxcel.co.uk/software_orastress_key.html
输入相关信息,邮件地址一定要正确填写,并在最后一个输入框中输入序列号,提交后如果审核通过的话能拿到一个注册码

拿到注册码后运行
D:programeroracle tools压力orastress>"orastress!.exe" register
在弹出的对话框中填入注册信息即可。

很可惜,到目前位置我还没有能拿到key。

3、使用
orastress!可以运行在4种模式下:
READ :只读,测试CPU和内存。如果只测试单个实例,效果和orabm一样
OLTP :模拟在线事务交易系统测试
INS :测试普通insert的I/O压力
DIO :测试直接路径insert的I/O压力

orastress!的使用方式是:
orastress! –s sess-iterations-list –t transacts-per-sess –c tns-alias-list –m mode [ -s batchsize]
其中:
sess-iterations-list:并发的个数。如果要测试多种数量的并发数,则多种数量之间用都好分割
transacts-per-sess:每个并发执行的事务数
tns-alias-list:被测试的实例列表。如果要测试多个实例,则各个实例用逗号分割。
mode:运行模式。参看上文。
batchsize:可选。在IDS和DIO模式下用到。默认值是1000。在IDS和DIO模式下,插入的记录数达到batchsize就会提交一次。


建议对单节点数据库分别采用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个事务的测试.


下面的一些运行举例

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

运行一组测试,对两个数据库(inst1.world,inst2.world)各发出两个并发session,每个session运行50000个事务,这两个数据库可以是:
. 同一个rac的两个实例
. 同一个服务器上不同的实例(非rac)
. 不同服务器上的不同实例(非rac)

Example 3:

orastress! –s 1,2,4 –t 50000 –c inst1,inst2,inst3,inst4 –m read
运行3组测试,分别以1,2,4个并发session对四个实例,各执行50000个事务:

Orastress!的输出结果和orabm类似。

D:programeroracle tools压力orastress>"orastress!.exe" -s 1 -t 100 -c oracle9
i -m oltp
Evaluation version: 1 session only per database
---begin mode=oltp sess=1 txn=100 TNS=oracle9i Thu Sep 21 17:59:06 2006
oracle9i#1 w=9 txn(all)=100 xn(sam)=79 t(sam)=12 tps=6.6 d=2(2.5%) n=34(43%) o=8
(10.1%) p=33(41.8%) s=2(2.5%) end=210906-17:59:22
---end - Thu Sep 21 17:59:22 2006

D:programeroracle tools压力orastress>"orastress!.exe" -s 1 -t 1000 -c oracle
9i -m oltp
Evaluation version: 1 session only per database
---begin mode=oltp sess=1 txn=1000 TNS=oracle9i Fri Sep 22 10:07:49 2006
oracle9i#1 w=2 txn(all)=1000 xn(sam)=799 t(sam)=65 tps=12.3 d=40(5%) n=304(38%)
o=39(4.9%) p=385(48.2%) s=31(3.9%) end=220906-10:09:27
---end - Fri Sep 22 10:09:27 2006

这个测试比较缓慢,大家在测试的时候要给点耐性。

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
在MySQL中使用视图的局限性是什么?在MySQL中使用视图的局限性是什么?May 14, 2025 am 12:10 AM

mysqlviewshavelimitations:1)他们不使用Supportallsqloperations,限制DatamanipulationThroughViewSwithJoinSorsubqueries.2)他们canimpactperformance,尤其是withcomplexcomplexclexeriesorlargedatasets.3)

确保您的MySQL数据库:添加用户并授予特权确保您的MySQL数据库:添加用户并授予特权May 14, 2025 am 12:09 AM

porthusermanagementInmysqliscialforenhancingsEcurityAndsingsmenting效率databaseoperation.1)usecReateusertoAddusers,指定connectionsourcewith@'localhost'or@'%'。

哪些因素会影响我可以在MySQL中使用的触发器数量?哪些因素会影响我可以在MySQL中使用的触发器数量?May 14, 2025 am 12:08 AM

mysqldoes notimposeahardlimitontriggers,butacticalfactorsdeterminetheireffactective:1)serverConfiguration impactactStriggerGermanagement; 2)复杂的TriggerSincreaseSySystemsystem load; 3)largertablesslowtriggerperfermance; 4)highConconcConcrencerCancancancancanceTigrignecentign; 5); 5)

mysql:存储斑点安全吗?mysql:存储斑点安全吗?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

mySQL:通过PHP Web界面添加用户mySQL:通过PHP Web界面添加用户May 14, 2025 am 12:04 AM

通过PHP网页界面添加MySQL用户可以使用MySQLi扩展。步骤如下:1.连接MySQL数据库,使用MySQLi扩展。2.创建用户,使用CREATEUSER语句,并使用PASSWORD()函数加密密码。3.防止SQL注入,使用mysqli_real_escape_string()函数处理用户输入。4.为新用户分配权限,使用GRANT语句。

mysql:blob和其他无-SQL存储,有什么区别?mysql:blob和其他无-SQL存储,有什么区别?May 13, 2025 am 12:14 AM

mysql'sblobissuitableForStoringBinaryDataWithInareLationalDatabase,而alenosqloptionslikemongodb,redis和calablesolutionsoluntionsoluntionsoluntionsolundortionsolunsolunsstructureddata.blobobobsimplobissimplobisslowderperformandperformanceperformancewithlararengelitiate;

mySQL添加用户:语法,选项和安全性最佳实践mySQL添加用户:语法,选项和安全性最佳实践May 13, 2025 am 12:12 AM

toaddauserinmysql,使用:createUser'username'@'host'Indessify'password'; there'showtodoitsecurely:1)choosethehostcarecarefullytocon trolaccess.2)setResourcelimitswithoptionslikemax_queries_per_hour.3)usestrong,iniquepasswords.4)Enforcessl/tlsconnectionswith

MySQL:如何避免字符串数据类型常见错误?MySQL:如何避免字符串数据类型常见错误?May 13, 2025 am 12:09 AM

toAvoidCommonMistakeswithStringDatatatPesInMysQl,CloseStringTypenuances,chosethirtightType,andManageEngencodingAndCollat​​ionsEttingsefectery.1)usecharforfixed lengengters lengengtings,varchar forbariaible lengength,varchariable length,andtext/blobforlabforlargerdata.2 seterters seterters seterters seterters

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

EditPlus 中文破解版

EditPlus 中文破解版

体积小,语法高亮,不支持代码提示功能

SublimeText3 英文版

SublimeText3 英文版

推荐:为Win版本,支持代码提示!

螳螂BT

螳螂BT

Mantis是一个易于部署的基于Web的缺陷跟踪工具,用于帮助产品缺陷跟踪。它需要PHP、MySQL和一个Web服务器。请查看我们的演示和托管服务。

SublimeText3 Linux新版

SublimeText3 Linux新版

SublimeText3 Linux最新版

SecLists

SecLists

SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。