ITPUB??ì3
新一届的微软MVP评选已经开始,欢迎各位推荐!
ITPUB论坛 » Oracle专题深入讨论 » 请问:如何测试出当前数据库的I/O能力

标题: 请问:如何测试出当前数据库的I/O能力
离线 wang5
一般会员



精华贴数 0
个人空间 0
技术积分 746 (2545)
社区积分 21 (7420)
注册日期 2006-4-11
论坛徽章:1
ITPUB新首页上线纪念徽章     
      

发表于 2008-6-26 11:05 
请问:如何测试出当前数据库的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..


只看该作者    顶部
离线 anycall2010
回味失败不是我风格


精华贴数 0
个人空间 2256
技术积分 2205 (718)
社区积分 77 (3964)
注册日期 2006-11-25
论坛徽章:8
授权会员2008北京奥运纪念徽章:帆船数据库板块每日发贴之星2008北京奥运纪念徽章:沙滩排球2008北京奥运纪念徽章:摔跤2008北京奥运纪念徽章:皮划艇静水
生肖徽章2007版:鸡ITPUB新首页上线纪念徽章    

发表于 2008-6-30 23:04 
你是哪个版本数据库?


__________________
blog: http://space.itpub.net/8334342/spacelist-blog
只看该作者    顶部
离线 Yong Huang
版主



精华贴数 2
个人空间 0
技术积分 4168 (339)
社区积分 129 (2998)
注册日期 2001-10-9
论坛徽章:6
现任管理团队成员ITPUB元老管理团队2006纪念徽章会员2006贡献徽章授权会员2008年新春纪念徽章
      

发表于 2008-7-1 01:28 
anycall2010 says, always report Oracle version.

Can the numbers in v$filestat help?

Yong Huang


只看该作者    顶部
在线/呼叫 netbanker
版主


精华贴数 5
个人空间 0
技术积分 12416 (94)
社区积分 2474 (505)
注册日期 2001-9-24
论坛徽章:12
现任管理团队成员ITPUB元老管理团队2006纪念徽章会员2007贡献徽章会员2006贡献徽章授权会员
生肖徽章2007版:马2008北京奥运纪念徽章:射箭2008年新春纪念徽章生肖徽章2007版:鼠ITPUB新首页上线纪念徽章生肖徽章:虎

发表于 2008-7-1 05:25 
statspack has all the relative information for your I/O. there is a threshold you can refer


__________________
Have a nice day!MSN: stevenzhaoyi@hotmail.com
只看该作者    顶部
离线 gclizh
中级会员



精华贴数 0
个人空间 0
技术积分 530 (3641)
社区积分 0 (102578)
注册日期 2003-12-16
论坛徽章:0
      
      

发表于 2008-7-1 10:32 
参考 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


只看该作者    顶部
离线 blue_prince
永远的巴乔


精华贴数 21
个人空间 0
技术积分 16848 (59)
社区积分 5954 (253)
注册日期 2003-10-15
论坛徽章:64
现任管理团队成员     
      

发表于 2008-7-1 10:42 
根据STATSPACK里面的physical reads和physical writes的总和就是那一段时间内的IO平均值了,采样时间短一些,就可以估算那段时间数据库的IO了


__________________
淘宝DBA团队Blog        我的Blog

We are what we repeatedly do. Excellence, then, is not an act, but a habit.——Aristotle
只看该作者    顶部
离线 nganhong
初级会员



精华贴数 0
个人空间 0
技术积分 58 (24990)
社区积分 0 (1283412)
注册日期 2007-2-26
论坛徽章:0
      
      

发表于 2008-7-2 15:47 
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

[ 本帖最后由 nganhong 于 2008-7-2 15:49 编辑 ]


只看该作者    顶部
离线 owlstudio
db.dw.dm@gmail.com
9i OCP


来自 北京
精华贴数 0
个人空间 154
技术积分 2153 (744)
社区积分 65 (4373)
注册日期 2005-3-16
论坛徽章:9
ITPUB元老数据库板块每日发贴之星    
      

发表于 2008-7-3 22:07 
关注  !


__________________
纸上来得终觉浅,绝知此事要躬行!

MSN/Email: db.dw.dm@gmail.com   欢迎交流!  
BLOG:         专注 - 思考 - 创新

1. Oracle数据库备份与恢复总结

2. 10g 新特性 Recyclebin 空间的自动清理
只看该作者    顶部
离线 zhangfei__
初级会员



精华贴数 0
个人空间 0
技术积分 586 (3269)
社区积分 1 (41663)
注册日期 2006-6-20
论坛徽章:2
生肖徽章2007版:鸡ITPUB新首页上线纪念徽章    
      

发表于 2008-8-18 18:30 
很多时候说数据库的I/O慢,其实应该先看看你的存储的I/O是多少


只看该作者    顶部
离线 晶晶小妹
月是上弦


精华贴数 3
个人空间 6470
技术积分 1845 (892)
社区积分 9 (11681)
注册日期 2008-2-15
论坛徽章:2
现任管理团队成员数据库板块每日发贴之星    
      

发表于 2008-8-18 22:26 
大家说的已经差不多了,STATSPACK中I/O相关的项目应该可以满足你的需要的,也可以看看V$FILESTAT视图。
另外,还可以用orion测测I/O能力,操作很简单的。

[ 本帖最后由 晶晶小妹 于 2008-8-18 22:28 编辑 ]


__________________
没有必胜的秘籍,没有方程式遵循
要赢~只有全身心的投入!



为了方便大家查阅,所有的文章都已转入空间

http://space.itpub.net/?13095417

请大家多多支持!
只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问