- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2012-5-15 13:07:44
Elapsed: 60.44 (mins)
DB Time: 14,264.94 (mins)
AAS= 237 负载极高 ,系统有队列拥堵在 意料之中
Redo size: 17,012,404.62 每秒的 redo 16MB
Logical reads: 120,116.92 每秒逻辑读 938MB
Physical reads: 9,324.95 每秒物理读 72MB
Top 5
db file sequential read avg wait =20 ms , 物理 read I/O 较差
PX Deq Credit: send blkd 说明有使用parallel并行,但是并行交互本身消耗了大量时间
gc buffer busy avg wait=70ms global cache争用严重,结合log file sync可以知道 redo flush极慢
log file sync avg wait=44ms 日志文件写性能极差
Top 5 Timed Events Avg %Total
~~~~~~~~~~~~~~~~~~ wait Call
Event Waits Time (s) (ms) Time Wait Class
------------------------------ ------------ ----------- ------ ------ ----------
db file sequential read 26,334,305 515,434 20 60.2 User I/O
PX Deq Credit: send blkd 1,050,587 129,608 123 15.1 Other
gc buffer busy 890,182 62,544 70 7.3 Cluster
CPU time 32,758 3.8
log file sync 537,254 23,495 44 2.7 Commit
Avg
%Time Total Wait wait Waits
Wait Class Waits -outs Time (s) (ms) /txn
-------------------- ---------------- ------ ---------------- ------- ---------
User I/O 27,099,066 .0 522,856 19 51.2
Other 18,479,696 76.9 144,094 8 34.9
Cluster 22,765,706 .2 129,952 6 43.0
Commit 537,254 .0 23,495 44 1.0
User I/O 和 other 类型的等待 耗费了大量的时间:
很多SQL 都加了 parallel的 hint , 但不代表parallel 有益
Module: fetchbill@cxfs02 (TNS V1-V3)
select /*+ full(a) parallel(a,4) */ rtrim(user_id) || chr(9)|| rowidtochar(row
id)|| chr(9) || rtrim(source_type) || chr(9) || rtrim(record_type)|| chr(9) ||
rtrim(ni_pdp) || chr(9) || rtrim(msisdn) || chr(9) || rtrim(start_date)|| rtrim
(start_time) || chr(9) || rtrim(imsi_number) || chr(9)|| rtrim(sgsn)|| chr(9)||
Module: SQL*Plus
INSERT INTO SMS_QS_USER_TMP NOLOGGING (S_DATE, MSISDN, SMS_CNT, FILE_SOURCE) SEL
ECT /*+parallel(t,15) */ SUBSTR(TO_CHAR(TO_DATE(T.SEND_DATE, 'yyyy/mm/dd hh24:mi
:ss'), 'yyyymmddhh24miss'), 1, 11), MSISDN, COUNT(*), FILE_SOURCE FROM SMS_QS_LO
AD_SOURCE_CDR T WHERE T.FILE_SOURCE = :B3 AND SUBSTR(T.MSISDN, 3, 11) NOT IN (SE
建议:
1. 调优I/O 减少 db file sequential read 和 log file sync的平均等待时间
2. 减少使用parallel hint的语句
3. 优化SQL 减少 物理读 和逻辑读 |
|