You were brought to this page based on an internet search
and as a free service to Oracle DBAs.
The text below is an except from the book,
Oracle Performance Firefighting, written by
Craig Shallahamer of
OraPub, Inc.
Figures and tables are not included on this page, only their reference.
To order the book in either print or PDF form, click
here.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
-------------------------------
Another solution is to structure the multiple latches to take advantage of the underlying memory structure itself. For example, if the memory structure consists of 500 linked lists,3 then instead of having one latch controlling access to all 500 lists, have 100 latches, each related to 5 linked lists. Referring back to Figure 3-2, it would be like control structure CS101 being associated with memory structure MS1-A, MS1-B, ... MS1-n, and control structure CS375 being associated with memory structure MS2-A, MS2-B, ... MS2-n. Oracle takes this approach with at least two memory structures: the least recently used list and the cache buffer chains.
Years ago, it was common for Oracle's single least recently used (LRU) list to have latching contention issues. LRU lists are used to ensure that the popular buffers remain in the buffer cache and to help server processes quickly locate free and unpopular buffers. The LRU lists are not used to find or locate a specific block; that is the purpose of the cache buffer chains.
One approach that can work well with a single long linked list is to simply divide the list into multiple smaller lists, as illustrated in Figure 3-4. Each of the smaller lists will have its own latch.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
|