为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】: V8
【操作系统】:银河麒麟V10
【CPU】: 4 线程 HUAWEI,Kunpeng 920
【问题描述】:性能测试客户端模拟10个客户端并发的更新数据库,DB Time 和 DB CPU 显示以ms为单位消耗值。数据库所在机器CPU负载如下:
avg-cpu: %user %nice %system %iowait %steal %idle
41.69 0.00 11.54 7.82 0.00 38.96
通过连续查询性能指标计算差值,折算到每秒CPU消耗, DB Time 每秒增加85000左右, CPU Time 每秒增加 5500左右。 在 4核 CPU的机器上,理论上每秒增加的最大数值是 4000 (ms) 。所以可能我对 DB time(ms) CPU time(ms) 这两个指标的理解不正确(网上找到的非官方信息也是这样解释的), 请问这两个指标的含义?
(下图两条SQL查询间隔约10s)
SQL> select id, classId, name, stat_val from V$SYSSTAT where id in (118,126);
LINEID id classId name
---------- ----------- ----------- ------------
stat_val
--------------------
1 118 12 DB time(ms)
50905612
2 126 12 CPU time(ms)
11009985
used time: 21.333(ms). Execute id is 13784006.
SQL> select id, classId, name, stat_val from V$SYSSTAT where id in (118,126);
LINEID id classId name stat_val
---------- ----------- ----------- ------------ --------------------
1 118 12 DB time(ms) 58381226
2 126 12 CPU time(ms) 11474566
used time: 21.165(ms). Execute id is 13784007.
进行了一些更多的测试观察,DB time(ms) CPU time(ms) , 这里的单位 ms 应该是指的微秒。
DB Time= CPU time + 非空闲wait time;
https://blog.csdn.net/stevendbaguo/article/details/8604639
可以参考一下上面的这个文档