美创科技技术社区

注册

 

发新话题 回复该主题

空闲等待事件(Idle Event) [复制链接]

1#

Oracle等待事件中,包含很多空闲等待事件,可以来帮助我们诊断系统处于什么状态,可以以以下命令获取空闲等待事件:

SQL> select name from v$event_name where wait_class=’Idle’;

NAME                                                             WAIT_CLASS
—————————————————————- —————————————————————-
pmon timer                                                       Idle
rdbms ipc message                                                Idle
i/o slave wait                                                   Idle
wait for unread message on broadcast channel                     Idle
wait for unread message on multiple broadcast channels           Idle
class slave wait                                                 Idle
KSV master wait                                                  Idle
watchdog main loop                                               Idle
DIAG idle wait                                                   Idle
ges remote message                                               Idle
gcs remote message                                               Idle
SGA: MMAN sleep for component shrink                             Idle
LNS ASYNC archive log                                            Idle
LNS ASYNC dest activation                                        Idle
LNS ASYNC end of log                                             Idle
PX Deq: Par Recov Reply                                          Idle
PX Deq: Par Recov Execute                                        Idle
PX Deq: Par Recov Change Vector                                  Idle
LogMiner: slave waiting for activate message                     Idle
LogMiner: wakeup event for builder                               Idle

NAME                                                             WAIT_CLASS
—————————————————————- —————————————————————-
LogMiner: wakeup event for preparer                              Idle
LogMiner: wakeup event for reader                                Idle
LogMiner: client waiting for transaction                         Idle
parallel recovery coordinator waits for cleanup of slaves        Idle
smon timer                                                       Idle
PX Deq: Txn Recovery Start                                       Idle
PX Deq: Txn Recovery Reply                                       Idle
PX Deq: Index Merge Reply                                        Idle
PX Deq: Index Merge Execute                                      Idle
PX Deq: Index Merge Close                                        Idle
PX Deq: kdcph_mai                                                Idle
PX Deq: kdcphc_ack                                               Idle
virtual circuit status                                           Idle
dispatcher timer                                                 Idle
jobq slave wait                                                  Idle
pipe get                                                         Idle
PX Deque wait                                                    Idle
PX Idle Wait                                                     Idle
PX Deq: Join ACK                                                 Idle
PX Deq Credit: need buffer                                       Idle
PX Deq: Msg Fragment                                             Idle

NAME                                                             WAIT_CLASS
—————————————————————- —————————————————————-
PX Deq: Parse Reply                                              Idle
PX Deq: Execute Reply                                            Idle
PX Deq: Execution Msg                                            Idle
PX Deq: Table Q Normal                                           Idle
PX Deq: Table Q Sample                                           Idle
Streams fetch slave: waiting for txns                            Idle
single-task message                                              Idle
SQL*Net message from client                                      Idle
SQL*Net message from dblink                                      Idle
PL/SQL lock timer                                                Idle
EMON idle wait                                                   Idle
Streams AQ: waiting for messages in the queue                    Idle
Streams AQ: waiting for time management or cleanup tasks         Idle
Streams AQ: delete acknowledged messages                         Idle
Streams AQ: deallocate messages from Streams Pool                Idle
Streams AQ: qmn coordinator idle wait                            Idle
Streams AQ: qmn slave idle wait                                  Idle
Streams AQ: RAC qmn coordinator idle wait                        Idle
HS message to agent                                              Idle
ASM background timer                                             Idle
JS external job                                                  Idle

62 rows selected

我们在对系统性能做快速扫描的时候可以简单做如下查询:
SQL>select sid,event,p1,p2,p3 from v$session_wait

where event not in(select name from v$event_name where wait_class=’Idle’);

几乎所有的空闲等待事件都表示为:我空闲,我等待被唤醒或者等待其他进程回答。我们在性能统计的时候可以忽略这些等待事件,但在个别情况下这些空闲等待事件也会反映出问题所在。

我等待,一般情况也意味着别人无法提供,特别是在目前Oracle Wait Event无法标记出CPU处理的情况下,某些等待事件并不一定意味着系统空闲,而有可能是CPU繁忙。等待事件并不是性能的全部而只是性能的一部分,当等待事件无法衡量性能状况的时候,空闲等待事件就会成为一个辅助诊断因子。

比如一个大内存的CPU繁忙系统,几乎所有时间都在等待SQLNET信息。

分享 转发
TOP
发新话题 回复该主题