Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Latch gets and CPU usage

RE: Latch gets and CPU usage

From: Kristian Myllymäki <kristian_at_kmja.com>
Date: Mon, 15 May 2006 13:33:37 +0200 (CEST)
Message-ID: <22387.212.247.9.194.1147692817.squirrel@glenlivet.oderland.com>


Hi John,

Thanks for your explanation. If I understand this correct - during latch spinning the 'CPU used' statistic is incremented (the 'c' value measured in the trace file), and the 'latch free' wait event is incremented when the process sleeps between the latch spins.

I'll try to investigate it further by looking at which child latch this could be caused by.

Systemwide, the number of sleeps for 'cache buffers chains' latch has increased enormously, but not the number of get requests, so I'll try and see if there's any hot chain / block that could be the culprit.

Thanks again,

/Kristian

> When a process needs a latch and can't obtain one, it'll constantly try to
> get for the latch "_spin_count" number of times (where each "_spin_count"
> consumes a CPU tick). If it can't get the latch after [_spin_count]
> number
> of times, it'll sleep and post a wait to the latch free wait event.
>
> So your "CPU used by this session" number should increment while spinning,
> and your latch free wait will increment after it goes to sleep. This time
> waited on latch free waits will exponentially increase between spin
> attempts.
>
> Below, you have 1.87 seconds of CPU usage and 1.10 seconds of latch free
> waiting, which means that latch spinning consumed at least a portion of
> the
> 1.87 seconds -- but impossible to tell how much of this 1.87 seconds was
> latch related just from a tkprof and/or raw trace file perspective, since
> this also includes 'other stuff' (i.e., LIO, parsing, etc).
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 15 2006 - 06:33:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US