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.
-------------------------------
Along with using Statspack or AWR to gather and report CPU consumption, you can also easily collect this information yourself. Simply gather the initial value, final value, and if you want, the consumption per second, over the desired time interval. Figure 9-4 shows a code snippet used to collect CPU consumption based on v$sys_time_model. During the 60-second interval, the Oracle instance processes consumed 82.4 seconds of CPU; that is, on average 1.37 seconds each second.
Figure 9-4. Shown is a code snippet used to collect and then determine instance CPU consumption, based on v$sys_time_model, over a 60-second interval. The CPU consumed (82.4s) and also the CPU consumed per second (1.37s) are displayed.
Gathering IO requirements is more complicated than gathering CPU requirements. Oracle9i Release 2 and earlier require querying from both v$sysstat and v$filestat, whereas later Oracle releases require querying only from v$sysstat. And depending on the information desired, different statistics are required. The following snippet shows the formulas for raw Oracle IO consumption (requirements) for Oracle9i Release.2 and earlier versions:
©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.
|