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.
-------------------------------
As I'll demonstrate, an active Oracle process updates the time model performance views about every 6 seconds. All time is in milliseconds, so be sure when converting to seconds to divide by six zeros-that is, 1,000,000.
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.
©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.
|