
2008-6-26 11:05
wang5
请问:如何测试出当前数据库的I/O能力
很多时候,有一种问题,就是为啥我insert慢,建索引慢,建物化视图慢。。。
如果我们可以估算出SQL需要的总I/O大小的时候,又找出当前数据库的I/O能力 per second,从而可以得出一个执行过程的大概时间呢?
Oracle的参数actual db_file_multiblock_read_count*block size 计算出的是oracle 一次I/O的大小,一次的时间又是多好呢?
I/O在不同的硬件上,并发度也不同,所以这个判断不了。
那么,有没有办法可以测试出一个数据库 当前 每秒的最大I/O大小呢?
谢谢各位 大侠解疑。
In many case,there is a question,why so slowly in my inserting,creating index, materialized view ...
I think if we can estimate the whole I/O throughput of current SQL statement, and we know the datebase's capability of I/O per second,so we could caculate the probable time of the executing process
Oracle has a parameter: actual db_file_multiblock_read_count*block size can caculate I/O throughput at a time ,but not one second,we don't know the exact seconds of a time,and in various hardware there are different performence,so I can't estimate.
Is there any approach to find the I/O thoughput per second? ??byte/1 second
Thank you very much..
2008-6-30 23:04
anycall2010
你是哪个版本数据库?
2008-7-1 01:28
Yong Huang
anycall2010 says, always report Oracle version.
Can the numbers in v$filestat help?
Yong Huang
2008-7-1 05:25
netbanker
statspack has all the relative information for your I/O. there is a threshold you can refer
2008-7-1 10:32
gclizh
参考 CBO fundmental
exec dbms_stats.gather_system_stats('start');
exec dbms_stats.gather_system_stats('stop');
select pname, pval1 from sys.aux_stats$ where sname = 'SYSSTATS_MAIN';
sreadtim - single block read time
mreadtim - multi block read time
有了io能力也无法计算sql 执行 的时间把,还有很多因素, 并发的问题,cache的问题,倒是可以用来计算cost
2008-7-1 10:42
blue_prince
根据STATSPACK里面的physical reads和physical writes的总和就是那一段时间内的IO平均值了,采样时间短一些,就可以估算那段时间数据库的IO了
2008-7-2 15:47
nganhong
scaling oracle8i 的作者 james morle (oracle ace) 說:
disk read time = seek time + rotational delay + transfer time
read per second = 1 / disk read time
我粗略算了一下, 不知對不對
假設買的 HDD 是 18GB, 速度為 seek time=3 ms, RPM=10k/per minute, transfer rate=40MB/per second
大概就可以知道每秒 I/O 了
disk read time = 3ms + 10000/60*2 (平均) + 40000000/1000 (換算成 ms)
= 3ms + 3ms + 40K/1ms
= 6ms + 40K/per ms
40K read per second = 1/6ms
= 166 I/O per second
這應該是最小(慢) 的 I/O throughput
[[i] 本帖最后由 nganhong 于 2008-7-2 15:49 编辑 [/i]]
2008-7-3 22:07
owlstudio
关注 !
2008-8-18 18:30
zhangfei__
很多时候说数据库的I/O慢,其实应该先看看你的存储的I/O是多少
2008-8-18 22:26
晶晶小妹
大家说的已经差不多了,STATSPACK中I/O相关的项目应该可以满足你的需要的,也可以看看V$FILESTAT视图。
另外,还可以用orion测测I/O能力,操作很简单的。
[[i] 本帖最后由 晶晶小妹 于 2008-8-18 22:28 编辑 [/i]]
页:
[1]

Powered by ITPUB论坛