오라클의 프로세스가 자원을 접근/사용할때 세부단계별로 상세한 Wait Event 가 발생한다

(자원- cpu,mem, io..)

wait event 발생할 떄 마다 기록을 하면 느리지 않나? 싶지만 oracle은 wait event 부분을 굉장히 발전 시켰기에 걱정없다 

 

성능 요소 와 자원 사용현황은 "Wait Event 발생정도"에 따라 모니터링 가능하다

 

 

인프런  -권철민 강사님 자료 발췌

프로세스가 동작할때 세분화하여 개별적인 병목구간에 wait event가 발생 

SGA접근. buffer cache , write redo log 등등 

oracle 의 wait event는 모두 1100가지가 넘는다 (11g 기준)

 

 

주요 wait event

2-30개만 알면 된다 

유형 Event 명  내용
Disk iO dbfile Sequential Read Single block Access시에 발생 (디스크에 Random I/O 수행할 경우 발생)
일반적으로  OLTP시스템에서 가장 많이 발생
  dbfile Scattered Read 디스크로부터FullScan을수행할경우발생
자원 경합 library Cache Latch Library cache 메모리에 접근하기 위해 Latch를 얻을 경우 발생
  library Cache Lock Library cache 내의 특정 Object에 Lock 접근할때 발생
  logfile sync 변경 log buffer 를 log file에 반영하는 동안 발생 
  enqueue 주로 table 자체, 또는 table data 의 lock 수행 시 발생
  latch free 다양한 Shared Memory 영역에 대한 latch

 

 

 

Classes of Wait Events (oracle.com)

Classes of Wait Events

Administrative

Waits resulting from DBA commands that cause users to wait (for example, an index rebuild)

- index rebuild 같은 DBA command로 인해 발생 (ex. Alter rbs offlne)

 

Application

Waits resulting from user application code (for example, lock waits caused by row level locking or explicit lock commands)

- 사용자 app에서 row level lockiing 또는 명확한 lock Command 수행 시 (ex. Enq:TX–row lock Contention Wait for Table Lock)

 

Cluster

Waits related to Oracle Real Application Clusters resources (for example, global cache resources such as 'gc cr block busy')

- RAC의 자원과 관련된 wait event (ex.GC cr block busy)

 

Commit

This wait class only comprises one wait event - wait for redo log write confirmation after a commit (that is, 'log file sync')

- Commit시 발생하는 redo log write 에 관련된 wait event (ex.logfile sync)

 

Concurrency

Waits for internal database resources (for example, latches)

- latch 와 같은 DB 내부 자원 접근 시 (ex. buffer busy wait, library cache lock)

 

Configuration

Waits caused by inadequate configuration of database or instance resources (for example, undersized log file sizes, shared pool size)

- 부적절한 환경 설정 logfile size. shared pool size 등을 적절하게 설정 못한 경우 (ex. Write complete waits)

 

Idle

Waits that signify the session is inactive, waiting for work (for example, 'SQL*Net message from client')

- Inactive 세션이 다시 Active 준비하는 단계에서 발생 

 

Network

Waits related to network messaging (for example, 'SQL*Net more data to dblink')

 

Other

Waits which should not typically occur on a system (for example, 'wait for EMON to spawn')

- 정상적인 상황에서는 잘 발생하지 않음 

 

Queueing

Contains events that signify delays in obtaining additional data in a pipelined environment. The time spent on these waitevents indicates inefficiency or other problems in the pipeline. It affects features such as parallel queries or DBMS_PIPE PL/SQL packages.

 

Scheduler

Resource Manager related waits (for example, 'resmgr: become active')

 

System I/O

Waits for background process I/O (for example, DBWR wait for 'db file parallel write')

 

User I/O

Waits for user I/O (for example 'db file sequential read')