原文鏈接:
http://www.eygle.com/special/use.orastress.2.test.oracle.db.htm
orastress!的作者是geoff ingram,也就是我們前面介紹的orabm的作者,他曾經(jīng)為oracle工作數(shù)年,是high performance oracle" (isbn: 0471224367)一書的作者.
該書現(xiàn)在你可以在本站下載.
關(guān)于該工具的官方網(wǎng)頁在這里可以找到:
http://www.linxcel.co.uk/orabm/index.html
orastress!你可以在原網(wǎng)站下載,或選擇本地下載.
該工具不是開源的,缺省的只能使用一個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!需要的數(shù)據(jù)和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
注意:這里構(gòu)建的如果是10個warehouses的數(shù)據(jù),那么大約需要1g的空間.
這里我建議對單節(jié)點數(shù)據(jù)庫分別采用1,2,3,5,10個warehouses進行1,2,4,6,10個并發(fā)的50000個事務的測試.
對于多節(jié)點rac建議采用1,2,3,5,10個warehouses進行1,3,4,7,10個并發(fā)的50000個事務的測試.
這一部分安裝日志可以參考:安裝日志
得到測試數(shù)據(jù)以后,還需要運行如下腳本:
sqlplus orabm/[email protected]<your-tns-alias> @orastress_tab.sql
sqlplus orabm/[email protected]<your-tns-alias> @orastress.plh
sqlplus orabm/[email protected]<your-tns-alias> @orastress.plb
日志參考:windows日志
命令行執(zhí)行方式如下:
orastress! –s sess-iterations-list –t transacts-per-sess –c tns-alias-list –m mode [ -s batchsize]
這里需要如下參數(shù):
-s 指定session數(shù)量
-t 指定每個session執(zhí)行的事物數(shù)量.
-c 指定聯(lián)結(jié)串
-m 指定運行模式.包括read oltp ins dio
-s 指定對于ins或dio模式下提交批量,缺省是10000里
note: 如果 orastress! 對單個warehouse運行在read模式,那么代碼執(zhí)行和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數(shù)據(jù)庫進行測試.
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:
運行一組測試,對兩個數(shù)據(jù)庫(inst1.world,inst2.world)各發(fā)出兩個并發(fā)session,每個session運行50000個事務,這兩個數(shù)據(jù)庫可以是:
·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個并發(fā)session對四個實例,各執(zhí)行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--輸出結(jié)果:
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:
輸出結(jié)果和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測試來說,最重要的是標準,如果大家有統(tǒng)一的模型及標準,那么測試數(shù)據(jù)也就有了意義,否則以不同的并發(fā)、數(shù)據(jù)進行各不相同的測試是不具有太大意義的.
標準、比較、參考,這對于測試來說是最重要的.
這里有一篇文章可供參考:
性能測試指標介紹
以下給出我的一些測試數(shù)據(jù):
1.10個warehouse的測試數(shù)據(jù)
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 2004hsbill.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 2004e:/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 2004hsbill.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:25hsbill.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 2004e:/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 2004hsbill.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:23hsbill.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的測試數(shù)據(jù)
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 2004hsbill.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:40hsbill.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
注冊會員,創(chuàng)建你的web開發(fā)資料庫,