Oracle Performance Firefighting
by Craig Shallahamer

Get the book here



Craig Shallahamer's Blog

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.
Please—Out 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.

-------------------------------

Imagine you have a boiling cup of coffee and you need to quickly walk across a room. As you briskly walk, you will notice an oscillation pattern develop in your coffee cup. If conditions are not in your favor and you continue your brisk pace, the oscillation pattern will cause some of the coffee to spill on your hand, and you will scream (or at least your eyes will water).4 You have a couple of options. First, you could stop, and the oscillation pattern will subside. But since this is an Oracle process illustration and there is a benchmark to reach, slowing or stopping a process is absurd. Another very creative option is to slightly shake the coffee cup. If done correctly, the oscillation pattern will be disrupted and subside. In a very real sense, you have placed some randomness, or at a minimum, disrupted a potentially harmful situation.

Ask an operating system tuning specialists which is better: a calm and evenly paced system or one with wild and dynamic load swings. Most will say that they prefer the calm option. Quick and intense process scheduling activities result in large run queue variances and increased CPU consumption. Notice anything special about the Oracle sleep times? They are all multiples of 10 ms! This means during very heavy latch contention conditions, every 10 ms, many Oracle processes will wake up from their slumber and need to be placed back onto the CPU run queue. Once the CPU has dwindled down the run queue, it will receive another jolt, and so on and so on.

One way to reduce the impact of this oscillation-like situation is to inject into the mix some sleep time randomness. Interestingly, Oracle lets the operating system do this! Figure 3-8 is the partial output of an Oracle server process operating system trace. The Oracle system is experiencing severe CBC contention, and the CPUs are pegged at 100% busy. When the server process is traced, Oracle Database 10g Release 1 on Linux creatively uses and issues a select system call to enact the sleep effect. It's unfortunate for Oracle DBAs that the select call is issued, because it creates confusion with the Select SQL statement. But rest assured, select is a system call kernel developers put into their code, and you can even get a Linux manual page by submitting the man select command at the operating system prompt. As the manual page states, the select call provides a fairly portable way to sleep with subsecond precision. However, while the sleep parameter is in microseconds, the operating system does not guarantee precision to the microsecond.

©2009, 2010 by Craig Shallahamer. This is copyrighted material.
Please—Out 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.


Know what's important before it's too late!

OraPub's
Performance Training

is like no other...





More Class Pics...
Get student testimonials!