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.

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

If you operating system trace an active Oracle process, you will notice not only a large number of gettimeofday calls, but also some getrusage calls. As you learned in Chapter 2, Oracle uses the gettimeofday call to determine system call time, with the results fed into Oracle's wait interface. The getrusage system call is used for complementary service time collection. The getrusage system call allows a process to gather its own CPU, memory, IO, and other consumption information. Oracle embeds this call in both its server processes and background processes. Oracle can use this call to determine Oracle session-level resource consumption at a very granular level. As you may have guessed, this information is also available from the /proc virtual file system (which exists on all Linux/Unix systems I've encountered).

One of the limitations of the instance statistics view (for example, v$sysstat) approach is the statistics may be updated only when a call completes. And just as bad, background processes may not have their CPU time recorded (as demonstrated shortly in Figure 5-6). The time system model conquers this problem. To illustrate this, Figure 5-5 is the result of a 5-minute operating system trace of the database writer. Doing some simple math, since the duration is 300 seconds (5 _ 60) and the database writer made 49 getrusage calls, we know that Oracle at least has the capability to update the v$sess_time_model (which feeds into the v$sys_time_model) about once every 6 seconds.

Figure 5-5. Oracle processes call the getrusage system call to determine their resource consumption details. This DBWR operating system trace duration was 300 seconds, which means the database writer background process called getrusage about once every 6 seconds. By the way, notice the DBWR does make some read calls.

©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!