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.
-------------------------------
The Mutex_Sleep function has the same objectives as with latches, but Oracle takes advantage of inherent mutex function calls. Figure 3-15 shows Oracle developers have a number of options to sleep an Oracle process. The desired sleep tactic is established when the mutex is created. In essence, it's part of the mutex creation process. Oracle developers can use mutex-specific sleep options, or they can create their own hybrid routine. But regardless, the general mutex options are to either yield the CPU, sleep, or block other processes from acquiring the mutex. By operating system tracing some Oracle server processes with heavy mutex contention, it appears Oracle is currently using the CPU yield option.
As you can see, Oracle has taken what was designed for high-concurrency thread control and incorporated-or perhaps retrofitted is a better word-mutexes into its serialization control scheme. The result is a stellar serialization scheme that is both flexible and fast. I suspect we'll continue to see Oracle kernel code developers take advantage of mutexes.
It is exceptionally rare to have mutex-related contention. I don't state this lightly, but if I found such contention in a system, I would immediately suspect an Oracle bug and contact Oracle support.
©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.
|