Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Getting a Library Cache dump
The counts tell you how many objects are covered by each latch, and it's a fairly even distribution, it doesn't tell you anything about how often the objects are being accessed.
Given your previous posts your next step probably ought to be an examination of v$latch_children to see if one of the child library cache latches is responsible for most of the contention.
At the same time, you can check v$sql to see if any one or two cursors have an extreme number of executions compared to the rest. If you have the most recent version of Oracle, you will find that v$sql has a column called something like child_latch, which tells you which library cache latch child is covering that cursor.
Option 1: every latch is hot - in which case you may get some benefit if you increase the number of kgl latches significantly.
Option 2: you have a small number of hot cursors on a single latch - in which case fiddling with the number of latches until you get lucky and those cursors are spread more evenly may give you some benefit
Option 3: you have one hot cursor which is makeing one hot latch - in which case you have to execute that cursor less frequently, and fiddling with latches won't help.
Regards
Jonathan Lewis
http://www.jlcomp.demon.co.uk
The educated person is not the person
who can answer the questions, but the
person who can question the answers -- T. Schick Jr
Next public appearances:
March 2004 Hotsos Symposium - The Burden of Proof
March 2004 Charlotte NC OUG - CBO Tutorial
April 2004 Iceland
One-day tutorials:
http://www.jlcomp.demon.co.uk/tutorial.html
Three-day seminar:
see http://www.jlcomp.demon.co.uk/seminar.html
____UK___February
____UK___June
The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html
I am encountering Library Cache latch contention.
On the 4 CPU server, I have 5 Child latches to the Library Cache Latch. I need to verify if only one particular latch is busier.
Is a "alter session set events 'immediate trace name library_cache level
3';"
the right command to dump to a trace file ?
The trace file shows multiple entries for
"latch=0" to "latch=4"
I did a count on the trace file and got
7528 entries for latch=0 8002 entries for latch=1 8137 entries for latch=2 7926 entries for latch=3 7726 entries for latch=4
Is my interpretation that the latches are equally busy
valid ?
Would _kgl_latch_count help ?
Hemant K Chitale
http://hkchital.tripod.com
![]() |
![]() |