Does DB Time include wait on cpu queue time?
2010-08-16 23:24
405 查看
DB TIME1=DB CPU2+ Foreground NO-Idle wait time
1:Amount of elapsed time (in microseconds) spent performing Database user-level calls. This does not include the elapsed time spent on instance background processes such as PMON.
2:Amount of CPU time (in microseconds) spent on database user-level calls. This does not include the CPU time spent on instance background processes such as PMON.
10g中引入了基于时间统计信息的调优模型,其核心或者说最值得我们关心的大概是DB TIME和AASC 2项指标。DB TIME是Oracle在数据库层对用户级别(不包括后台进程的CPU和非空闲等待时间)各类操作耗时的一个总计,它直接反映了数据库前台的"工时"。DB TIME是否包含了前台进程在CPU队列上的等待时间呢,换而言之我们的命题是"Does DB TIME equal to DB CPU+Foreground NO-Idle wait time + DB CPU ON QUEUE ?"
让我们来看看以下测试:
我们来看看AWR报告中的Time Model Statistics:
DB TIME为344s,而DB CPU为226s。以上匿名PL/SQL块仅引起CPU争用(不会产生其他前台等待事件),而这里DB TIME要远大于DB CPU,可见DB TIME=DB CPU+Foreground wait time+Cpu on queue;本文出自 “Ask Maclean Liu Oracle” 博客,请务必保留此出处http://maclean.blog.51cto.com/2923249/1277534
1:Amount of elapsed time (in microseconds) spent performing Database user-level calls. This does not include the elapsed time spent on instance background processes such as PMON.
2:Amount of CPU time (in microseconds) spent on database user-level calls. This does not include the CPU time spent on instance background processes such as PMON.
10g中引入了基于时间统计信息的调优模型,其核心或者说最值得我们关心的大概是DB TIME和AASC 2项指标。DB TIME是Oracle在数据库层对用户级别(不包括后台进程的CPU和非空闲等待时间)各类操作耗时的一个总计,它直接反映了数据库前台的"工时"。DB TIME是否包含了前台进程在CPU队列上的等待时间呢,换而言之我们的命题是"Does DB TIME equal to DB CPU+Foreground NO-Idle wait time + DB CPU ON QUEUE ?"
让我们来看看以下测试:
[maclean@rh2 ~]$ cat /proc/cpuinfo |grep processor|wc -l 2 /*这是一台双核的pc服务器*/ 打开session A: begin /* first one busy on cpu */ loop null; end loop; end; /*死循环调用NULL,会尝试独占一个逻辑CPU,没有其他等待事件*/ 打开SESSION B: begin /* second one busy on cpu */ loop null; end loop; end; 打开SESSION C: begin /* third one busy on cpu */ loop null; end loop; end; 打开SESSION D: SQL> exec dbms_workload_repository.create_snapshot; PL/SQL procedure successfully completed. /*手动收集AWR 快照*/ /*等待几分钟,以便收集信息*/ SQL> exec dbms_workload_repository.create_snapshot; PL/SQL procedure successfully completed. /*再次手动收集快照*/
我们来看看AWR报告中的Time Model Statistics:
DB TIME为344s,而DB CPU为226s。以上匿名PL/SQL块仅引起CPU争用(不会产生其他前台等待事件),而这里DB TIME要远大于DB CPU,可见DB TIME=DB CPU+Foreground wait time+Cpu on queue;本文出自 “Ask Maclean Liu Oracle” 博客,请务必保留此出处http://maclean.blog.51cto.com/2923249/1277534
相关文章推荐
- Does DB Time include wait on cpu queue time?
- Does DB Time include wait on cpu queue time?
- [转]Oracle中的DB time VS. DB CPU
- AWR中的DB Time和CPU time
- High Waits on 'Db File Sequential Read' Due to Table Lookup Following Index Access (文档 ID 875472.1)
- -performSelectorOnMainThread:withObject:waitUntilDone: VS dispatch_async(dispatch_get_main_queue(),
- Volumetric 3D Mapping in Real-Time on a CPU
- 安装 Fatal error: Maximum execution time of 30 seconds exceeded in …/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 230
- Why does there exist DB_UNKNOWN directory on ASM disk?
- Restore n Recover Production DB to Point In Time on new machine
- AWR报告参数:DB TIME和DB CPU
- Model compatibility cannot be checked because the database does not contain model metadata. Ensure that IncludeMetadataConvention has been added to the DbModelBuilder conventions
- DB time VS. DB CPU
- iOS: How do you measure actual on-CPU time for an iOS thread?
- scripts for query proportion of the on-idle wait time is taken up by these wait classes
- AWR报告参数:DB TIME和DB CPU
- Coping with the TCP TIME-WAIT state on busy Linux servers
- DB time VS. DB CPU
- High Waits on 'Db File Sequential Read' Due to Table Lookup Following Index Access
- Coping with the TCP TIME-WAIT state on busy Linux servers