原文链接:
http://www.eygle.com/special/use.orabm.2.test.system.cpu.htm
orabm是一个开源的系统cpu性能测试工具.
作者geoff ingram曾经为oracle工作数年,是high performance oracle” (isbn: 0471224367)一书的作者.
orabm的安装你可以参考:
how to install orabm
作者原网页如下:
http://linxcel.co.uk/orabm/orabm.htm
我们接下来看一下怎样使用orabm通过oracle数据库来测试cpu性能.
1.首先我们先要了解一下orabm的原理使用:
how orabm works
orabm works by running a user-specified number of database transactions in each of a user-specified number of concurrent database sessions.
orabm通过在用户指定的并发下运行指定数量的事务来测试系统性能.
the transactions are executed by the orabm_serverside_stress stored procedure, under the schema orabm.
事务通过执行orabm用户的orabm_serverside_stress过程来实现.
for each concurrent session, orabm_serverside_stress runs the number of transactions specified on the orabm command line, and returns the transactions per second (tps) value for that session during the sampling interval on completion.
对于每个并发session,orabm_serverside_stress运行在orabm命令行指定数量的事务.
并返回在完成所有任务的采样间隔内每秒的事务数量.
to ensure that all concurrent sessions are processing transactions during the sampling interval, the tps value only includes results from the middle 80% of transactions: the first 10% and last 10% are ignored.
为了保证准确性,tps值只取中间的80%数据,头尾的10%都将被忽略.
the transactions are loosely based on the tpc-c order-status and stock-level transactions, using a predefined distribution of transactions.
事务是松散的,基于标准的tpc-c测试的订单、库存事务模型,使用预定义的事务分布.
the transaction split, which is based on data returned by the dbms_random package, should be:
事务基于dbms_random包的返回值进行分割,应该是:
stock-level:order-by-customer-name:order-by-customer-id
50% :30% :20%
the string returned by orabm_serverside_stress includes the transaction split during the test, to ensure that the transaction distribution is correct, subject to random fluctuations e.g.:
为了确保事务分布的正确性,orabm_serverside_stress的输出包含事务分割比例,输出结果具有随机波动,例如:
…sl=4042(50.5%) on=2384(29.8%) oi=1573(19.7%)…
orabm command line
once you have set up the test tables, data, and indexes, youre ready to run orabm. the following command shows orabm running 20000 transactions in a single session against the oracle database identified by oracle_sid in the unix environment:
在成功安装了orabm之后,在unix下定义好了oracle_sid环境变量之后,我们可以如下运行orabm命令进行测试:
$ orabm 1 20000
this command line runs the same workload against a remote database identified by the oracle net alias linxceld1.co.uk from a windows command box:
以下是在windows下远程运行方式:
c:\> orabm 1 20000 linxceld1.co.uk
note: running against a remote database has little (if any), affect on the transaction throughput, because all processing takes place on the dbms server.
execution of a single orabm session should show a single cpu at close to 100% utilization, provided that all table and index data is present in the oracle block buffer cache and no other workload is running on the database server. on unix or linux, you can use the “top” command to confirm this, or check that no “db file sequential read” event waits are taking place for the oracle session using info in the v$session_event view – these indicate waits for physical i/o.
如果所有的测试表和相关索引都已经cache到内存中,系统上没有其他任务运行,那么你可以看到单个orabm session会使用将近100%的cpu资源.在linux或者unix上,可以使用top来查看cpu使用情况,或者检察数据库中不存在”db file sequential read”等待事件.
alternatively, if your oracle dbms is running on linux, you can use the gkrellm performance monitor to show that cpu utilization of a single cpu is at ~100% and no physical i/o is taking place. gkrellm can be downloaded from:
http://web.wt.net/~billw/gkrellm/gkrellm.html
heres an example of the command line you would use to run 10000 transactions against a local oracle database for three iterations. in the first iteration, one session runs, in the second iteration two concurrent sessions run, and in the third iteration, six concurrent sessions run:
以下是一个测试例子,对本地数据库进行三个阶段测试,分别以1,2,6个并发执行10000个事务.
$ orabm 1,2,6 10000
keep in mind that the specified number of transactions is run in each concurrent session.
注意,这里定义的10000个事务是对每个session来说的.
note: you should specify sufficient transactions such that the tps results produced dont fluctuate significantly between runs for a given number of sessions; 100000 is a good value to choose.
note:你应该定义足够的事务以便tps结果在不同数量并发下波动尽量小,通常100,000是一个好的选择.
results output
output is appended to a log file orabm.database.log, where database is either the oracle_sid or tns alias that identifies the database where the test was run e.g. orabm.t92.log. for each iteration, the tps value for each concurrent session appears between begin and end markers. for example, the following shows the contents of the log for two concurrent sessions – in this case the second iteration for the previous command line example – where txn(all) displays the total transaction count, and xn(sam) and t(sam) show the total transactions and time for the middle 80% of transactions for which sampling took place:
输出结果的说明:
txn(all)—-代表total transaction count,总的事务数量.
xn(sam)—–采样的事务数量
t(sam)——采样事务运行的时间.
—begin sess=2 txn=10000 oracle_sid=t92 fri nov 8 20:31:48 2002
t92.world txn(all)=10000 xn(sam)=7999 t(sam)=44 tps=182 …
t92.world txn(all)=10000 xn(sam)=7999 t(sam)=45 tps=178 …
—end – fri nov 8 20:32:46 2002
the total tps for this iteration is the sum of the tps for the two concurrent sessions (182+178=360).
对于以上输出,在2个并发下,tps值为182+178=360
a shell script (orabm_tps.sh) can be used to process output from the log on unix and linux. the script aggregates the tps values for concurrent sessions in a single iteration into a total tps value for that iteration. the output based on the log info from the previous command line (3 iterations with 1, then 2, then 6 concurrent sessions) shows:
也可以用shell script(orabm_tps.sh)进行输出日志分析.
$ orabm_tps.sh orabm.t92.log
oracle_sid=t92 sess=1 tps=182
oracle_sid=t92 sess=2 tps=360
oracle_sid=t92 sess=6 tps=364
in this example the server was a 2 cpu model – as a result, 2 concurrent sessions running in orabm are enough to completely utilize all available cpu capacity.
在这个例子中,server有两个cpu,测试中两个并发足以消耗所有的cpu资源.
additional sessions should result in the total tps remaining unchanged, or even falling slightly as the operating system performs context switches to share the overloaded cpu resource between more ready-to-run sessions than available cpus.
继续增加并发并不会导致tps值得增加,甚至有可能会下降.
2.看一下我的一个测试结果
$ orabm 1,2,6,10,15,20,25,30 10000—begin sess=1 txn=10000 oracle_sid=hsbill sun sep 26 00:51:34 2004
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=89 tps=90 sl=3915(48.9%) on=2481(31%) oi=1603(20%) end=260904-00:53:25
—end – sun sep 26 00:53:25 2004
—begin sess=2 txn=10000 oracle_sid=hsbill sun sep 26 00:53:25 2004
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=96 tps=83 sl=3992(49.9%) on=2464(30.8%) oi=1543(19.3%) end=260904-00:55:25
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=104 tps=77 sl=3945(49.3%) on=2404(30.1%) oi=1650(20.6%) end=260904-00:55:34
—end – sun sep 26 00:55:34 2004
—begin sess=6 txn=10000 oracle_sid=hsbill sun sep 26 00:55:34 2004
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=189 tps=42 sl=4039(50.5%) on=2332(29.2%) oi=1628(20.4%) end=260904-00:59:32
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=193 tps=41 sl=3999(50%) on=2402(30%) oi=1598(20%) end=260904-00:59:36
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=192 tps=42 sl=3933(49.2%) on=2435(30.4%) oi=1631(20.4%) end=260904-00:59:36
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=198 tps=40 sl=4033(50.4%) on=2358(29.5%) oi=1608(20.1%) end=260904-00:59:38
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=201 tps=40 sl=4027(50.3%) on=2339(29.2%) oi=1633(20.4%) end=260904-00:59:40
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=202 tps=40 sl=3998(50%) on=2454(30.7%) oi=1547(19.3%) end=260904-00:59:42
—end – sun sep 26 00:59:42 2004
—begin sess=10 txn=10000 oracle_sid=hsbill sun sep 26 00:59:42 2004
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=277 tps=29 sl=3951(49.4%) on=2446(30.6%) oi=1602(20%) end=260904-01:05:24
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=287 tps=28 sl=3993(49.9%) on=2412(30.2%) oi=1594(19.9%) end=260904-01:05:39
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=287 tps=28 sl=3965(49.6%) on=2390(29.9%) oi=1644(20.6%) end=260904-01:05:43
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=288 tps=28 sl=3944(49.3%) on=2472(30.9%) oi=1583(19.8%) end=260904-01:05:43
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=290 tps=28 sl=4106(51.3%) on=2294(28.7%) oi=1599(20%) end=260904-01:05:44
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=293 tps=27 sl=4040(50.5%) on=2397(30%) oi=1562(19.5%) end=260904-01:05:44
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=292 tps=27 sl=3950(49.4%) on=2438(30.5%) oi=1611(20.1%) end=260904-01:05:46
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=295 tps=27 sl=4006(50.1%) on=2430(30.4%) oi=1563(19.5%) end=260904-01:05:47
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=301 tps=27 sl=4008(50.1%) on=2362(29.5%) oi=1629(20.4%) end=260904-01:05:48
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=301 tps=27 sl=3984(49.8%) on=2363(29.5%) oi=1652(20.7%) end=260904-01:05:49
—end – sun sep 26 01:05:49 2004
—begin sess=15 txn=10000 oracle_sid=hsbill sun sep 26 01:05:49 2004
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=398 tps=20 sl=4050(50.6%) on=2379(29.7%) oi=1570(19.6%) end=260904-01:14:14
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=402 tps=20 sl=4024(50.3%) on=2366(29.6%) oi=1609(20.1%) end=260904-01:14:14
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=408 tps=20 sl=4032(50.4%) on=2326(29.1%) oi=1641(20.5%) end=260904-01:14:15
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=408 tps=20 sl=4007(50.1%) on=2355(29.4%) oi=1637(20.5%) end=260904-01:14:15
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=402 tps=20 sl=4071(50.9%) on=2377(29.7%) oi=1551(19.4%) end=260904-01:14:15
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=408 tps=20 sl=4055(50.7%) on=2385(29.8%) oi=1559(19.5%) end=260904-01:14:17
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=415 tps=19 sl=3963(49.5%) on=2424(30.3%) oi=1612(20.2%) end=260904-01:14:22
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=407 tps=20 sl=4061(50.8%) on=2337(29.2%) oi=1601(20%) end=260904-01:14:23
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=416 tps=19 sl=3900(48.8%) on=2404(30.1%) oi=1695(21.2%) end=260904-01:14:25
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=421 tps=19 sl=3942(49.3%) on=2442(30.5%) oi=1615(20.2%) end=260904-01:14:26
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=417 tps=19 sl=3966(49.6%) on=2432(30.4%) oi=1601(20%) end=260904-01:14:26
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=427 tps=19 sl=4039(50.5%) on=2383(29.8%) oi=1577(19.7%) end=260904-01:14:28
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=439 tps=18 sl=3994(49.9%) on=2443(30.5%) oi=1562(19.5%) end=260904-01:14:33
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=450 tps=18 sl=4053(50.7%) on=2427(30.3%) oi=1519(19%) end=260904-01:14:37
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=451 tps=18 sl=4044(50.6%) on=2360(29.5%) oi=1595(19.9%) end=260904-01:14:38
—end – sun sep 26 01:14:38 2004
—begin sess=20 txn=10000 oracle_sid=hsbill sun sep 26 01:14:38 2004
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=493 tps=16 sl=4028(50.4%) on=2358(29.5%) oi=1613(20.2%) end=260904-01:24:55
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=510 tps=16 sl=4077(51%) on=2346(29.3%) oi=1576(19.7%) end=260904-01:25:13
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=507 tps=16 sl=4033(50.4%) on=2351(29.4%) oi=1615(20.2%) end=260904-01:25:13
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=508 tps=16 sl=3980(49.8%) on=2383(29.8%) oi=1636(20.5%) end=260904-01:25:14
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=505 tps=16 sl=3998(50%) on=2405(30.1%) oi=1596(20%) end=260904-01:25:14
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=507 tps=16 sl=4048(50.6%) on=2401(30%) oi=1550(19.4%) end=260904-01:25:15
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=511 tps=16 sl=3998(50%) on=2343(29.3%) oi=1658(20.7%) end=260904-01:25:17
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=509 tps=16 sl=4001(50%) on=2360(29.5%) oi=1638(20.5%) end=260904-01:25:17
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=513 tps=16 sl=4048(50.6%) on=2409(30.1%) oi=1542(19.3%) end=260904-01:25:19
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=516 tps=16 sl=3969(49.6%) on=2400(30%) oi=1630(20.4%) end=260904-01:25:21
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=519 tps=15 sl=3960(49.5%) on=2396(30%) oi=1643(20.5%) end=260904-01:25:22
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=529 tps=15 sl=4032(50.4%) on=2377(29.7%) oi=1590(19.9%) end=260904-01:25:26
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=535 tps=15 sl=4080(51%) on=2357(29.5%) oi=1562(19.5%) end=260904-01:25:27
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=526 tps=15 sl=4080(51%) on=2326(29.1%) oi=1593(19.9%) end=260904-01:25:27
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=530 tps=15 sl=4019(50.2%) on=2400(30%) oi=1580(19.8%) end=260904-01:25:28
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=523 tps=15 sl=3945(49.3%) on=2477(31%) oi=1577(19.7%) end=260904-01:25:28
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=532 tps=15 sl=4058(50.7%) on=2382(29.8%) oi=1559(19.5%) end=260904-01:25:30
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=534 tps=15 sl=4029(50.4%) on=2363(29.5%) oi=1607(20.1%) end=260904-01:25:30
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=547 tps=15 sl=4027(50.3%) on=2342(29.3%) oi=1630(20.4%) end=260904-01:25:34
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=563 tps=14 sl=4077(51%) on=2344(29.3%) oi=1578(19.7%) end=260904-01:25:36
—end – sun sep 26 01:25:36 2004
—begin sess=25 txn=10000 oracle_sid=hsbill sun sep 26 01:25:36 2004
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=626 tps=13 sl=4011(50.1%) on=2422(30.3%) oi=1566(19.6%) end=260904-01:38:37
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=621 tps=13 sl=3964(49.6%) on=2415(30.2%) oi=1620(20.3%) end=260904-01:38:39
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=631 tps=13 sl=4035(50.4%) on=2401(30%) oi=1563(19.5%) end=260904-01:38:39
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=630 tps=13 sl=4014(50.2%) on=2432(30.4%) oi=1553(19.4%) end=260904-01:38:44
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=631 tps=13 sl=4082(51%) on=2343(29.3%) oi=1574(19.7%) end=260904-01:38:44
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=636 tps=13 sl=3961(49.5%) on=2407(30.1%) oi=1631(20.4%) end=260904-01:38:47
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=638 tps=13 sl=4048(50.6%) on=2352(29.4%) oi=1599(20%) end=260904-01:38:50
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=636 tps=13 sl=3967(49.6%) on=2414(30.2%) oi=1618(20.2%) end=260904-01:38:51
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=632 tps=13 sl=3970(49.6%) on=2405(30.1%) oi=1624(20.3%) end=260904-01:38:51
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=637 tps=13 sl=3972(49.7%) on=2398(30%) oi=1629(20.4%) end=260904-01:38:51
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=637 tps=13 sl=4028(50.4%) on=2406(30.1%) oi=1565(19.6%) end=260904-01:38:52
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=634 tps=13 sl=4015(50.2%) on=2383(29.8%) oi=1601(20%) end=260904-01:38:52
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=638 tps=13 sl=3983(49.8%) on=2502(31.3%) oi=1514(18.9%) end=260904-01:38:53
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=641 tps=12 sl=3947(49.3%) on=2479(31%) oi=1573(19.7%) end=260904-01:38:54
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=647 tps=12 sl=3956(49.5%) on=2426(30.3%) oi=1617(20.2%) end=260904-01:38:54
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=636 tps=13 sl=3958(49.5%) on=2481(31%) oi=1560(19.5%) end=260904-01:38:54
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=644 tps=12 sl=3918(49%) on=2478(31%) oi=1603(20%) end=260904-01:38:56
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=646 tps=12 sl=4027(50.3%) on=2471(30.9%) oi=1501(18.8%) end=260904-01:38:57
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=644 tps=12 sl=4026(50.3%) on=2426(30.3%) oi=1547(19.3%) end=260904-01:38:57
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=645 tps=12 sl=4031(50.4%) on=2359(29.5%) oi=1609(20.1%) end=260904-01:38:58
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=647 tps=12 sl=4054(50.7%) on=2330(29.1%) oi=1615(20.2%) end=260904-01:38:58
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=651 tps=12 sl=3960(49.5%) on=2405(30.1%) oi=1634(20.4%) end=260904-01:38:59
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=660 tps=12 sl=4027(50.3%) on=2381(29.8%) oi=1591(19.9%) end=260904-01:39:00
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=665 tps=12 sl=3942(49.3%) on=2452(30.7%) oi=1605(20.1%) end=260904-01:39:01
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=717 tps=11 sl=4019(50.2%) on=2344(29.3%) oi=1636(20.5%) end=260904-01:39:26
—end – sun sep 26 01:39:26 2004
—begin sess=30 txn=10000 oracle_sid=hsbill sun sep 26 01:48:31 2004
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=739 tps=11 sl=3994(49.9%) on=2414(30.2%) oi=1591(19.9%) end=260904-02:04:02
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=741 tps=11 sl=3951(49.4%) on=2423(30.3%) oi=1625(20.3%) end=260904-02:04:02
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=745 tps=11 sl=4043(50.5%) on=2357(29.5%) oi=1599(20%) end=260904-02:04:05
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=751 tps=11 sl=3993(49.9%) on=2449(30.6%) oi=1557(19.5%) end=260904-02:04:07
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=749 tps=11 sl=4018(50.2%) on=2405(30.1%) oi=1576(19.7%) end=260904-02:04:10
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=750 tps=11 sl=3994(49.9%) on=2394(29.9%) oi=1611(20.1%) end=260904-02:04:11
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=751 tps=11 sl=4066(50.8%) on=2369(29.6%) oi=1564(19.6%) end=260904-02:04:11
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=752 tps=11 sl=3973(49.7%) on=2374(29.7%) oi=1652(20.7%) end=260904-02:04:12
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=759 tps=11 sl=3887(48.6%) on=2515(31.4%) oi=1597(20%) end=260904-02:04:13
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=754 tps=11 sl=3974(49.7%) on=2439(30.5%) oi=1586(19.8%) end=260904-02:04:13
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=755 tps=11 sl=4000(50%) on=2336(29.2%) oi=1663(20.8%) end=260904-02:04:13
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=757 tps=11 sl=3931(49.1%) on=2442(30.5%) oi=1626(20.3%) end=260904-02:04:14
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=758 tps=11 sl=3989(49.9%) on=2401(30%) oi=1609(20.1%) end=260904-02:04:14
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=757 tps=11 sl=3974(49.7%) on=2403(30%) oi=1622(20.3%) end=260904-02:04:15
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=760 tps=11 sl=4049(50.6%) on=2375(29.7%) oi=1575(19.7%) end=260904-02:04:15
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=761 tps=11 sl=3870(48.4%) on=2416(30.2%) oi=1713(21.4%) end=260904-02:04:17
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=758 tps=11 sl=4036(50.5%) on=2368(29.6%) oi=1595(19.9%) end=260904-02:04:17
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=761 tps=11 sl=3966(49.6%) on=2445(30.6%) oi=1588(19.9%) end=260904-02:04:18
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=761 tps=11 sl=3969(49.6%) on=2413(30.2%) oi=1617(20.2%) end=260904-02:04:18
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=761 tps=11 sl=3999(50%) on=2417(30.2%) oi=1583(19.8%) end=260904-02:04:19
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=755 tps=11 sl=4060(50.8%) on=2366(29.6%) oi=1573(19.7%) end=260904-02:04:20
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=774 tps=10 sl=4041(50.5%) on=2367(29.6%) oi=1591(19.9%) end=260904-02:04:21
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=763 tps=10 sl=4087(51.1%) on=2343(29.3%) oi=1569(19.6%) end=260904-02:04:22
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=769 tps=10 sl=4021(50.3%) on=2407(30.1%) oi=1571(19.6%) end=260904-02:04:23
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=773 tps=10 sl=4019(50.2%) on=2413(30.2%) oi=1567(19.6%) end=260904-02:04:23
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=763 tps=10 sl=4004(50.1%) on=2352(29.4%) oi=1643(20.5%) end=260904-02:04:24
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=770 tps=10 sl=4063(50.8%) on=2354(29.4%) oi=1582(19.8%) end=260904-02:04:24
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=779 tps=10 sl=4019(50.2%) on=2399(30%) oi=1581(19.8%) end=260904-02:04:24
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=784 tps=10 sl=4032(50.4%) on=2374(29.7%) oi=1593(19.9%) end=260904-02:04:26
hsbill.hurray.com.cn txn(all)=10000 xn(sam)=7999 t(sam)=809 tps=10 sl=3962(49.5%) on=2458(30.7%) oi=1579(19.7%) end=260904-02:04:28
—end – sun sep 26 02:04:28 2004
3.使用脚本格式化输出
$ orabm_tps.sh ./solaris/bm.hsbill.log
oracle_sid=hsbill sess=1 tps=90
oracle_sid=hsbill sess=2 tps=160
oracle_sid=hsbill sess=6 tps=245
oracle_sid=hsbill sess=10 tps=276
oracle_sid=hsbill sess=15 tps=289
oracle_sid=hsbill sess=20 tps=309
oracle_sid=hsbill sess=25 tps=313
oracle_sid=hsbill sess=30 tps=321
这里我们可以看出,这台服务器的cpu性能tps值应该在310左右.