|
 |
|
Oracle Overload
Oracle Tips by Burleson Consulting
Don Burleson
|
Oracle is optimized to work on any database server from an Mainframe
to a Macintosh, but you must be careful to avoid server overload
conditions.
 |
|
Because
Oracle10g AWR tracks server performance over time, we produce
management reports that show you exactly when your server was
overloaded.
You can also get AWR RAM, I/O and
CPU trend reports to help you predict when you need new hardware. |
Tip!
Take two AWR/STATSPACK snapshots, 30 seconds apart and generate a one
minute elapsed time report. This will often reveal the source of
a server loverload.
If you have not yet completely
optimized your SQL, the following conditions are generally true:
-
I/O overload - This is
evidenced by high "db file sequential read" and "db file scattered
read" waits and can be detected in the Oracle10g
dba_hist_filestatxs view. You may want to look at SQL that
issues unnecessary table block access, possibly due to missing
indexes or poor CBO statistics. Assuming that your SQL is
optimized, your only solutions are adding additional RAM for your
data buffers or switching to solid-state disk.
-
CPU overhead - With the
advent of 64-bit Oracle and super-large data block buffers (db_cache_size,
db_keep_cache_size), the main bottleneck for many databases has
shifted from I/O to CPU. If you see CPU in your top wait
events, you should look at SQL that may be causing unnecessary
Logical I/O against the data buffers. You also want to look at
the library cache to see if excessive parsing might be causing the
CPU consumption. Assuming your have optimized Oracle, your
option is to add more CPU's or faster CPU processors.
http://www.dba-oracle.com/oracle_tips_intel.htm
-
RAM overload - The Oracle
10g Automatic Memory Management (AMM) utility has facilities in
Oracle10g Enterprise Manager for detecting too-small SGA regions (db_cache_size,
shared_pool_size, pga_aggregate_target, etc.). You can
re-allocate RAM within these regions, reducing
pga_aggregate_target if you have no disk sorts or hash joins,
reducing shared_pool_size if you have no library cache
contention and reducing db_cache_size if you have low disk
I/O.
Detecting I/O
Overload
Here is a sample Oracle 10g script
to detect all files with physical reads over 10,000 during the
snapshot period:
break on
begin_interval_time skip 2
column phyrds format 999,999,999
column begin_interval_time format a25
select
begin_interval_time,
filename,
phyrds
from
dba_hist_filestatxs
natural join
dba_hist_snapshot
where
phyrds > 10000
;
Below we see a running total of
Oracle physical reads from phys_reads.sql. Note that the snapshots
are collected every hour in this example, and many DBAs will
increase the default collection frequency of AWR snapshots. Starting
from this script, we could easily add a where clause criteria and
create a unique time-series exception report.
SQL> @phys_reads
BEGIN_INTERVAL_TIME FILENAME PHYRDS
------------------------- ----------------------------------------
------------
24-FEB-04 11.00.32.000 PM E:\ORACLE\ORA92\FSDEV10G\SYSTEM01.DBF
164,700
E:\ORACLE\ORA92\FSDEV10G\UNDOTBS01.DBF 26,082
E:\ORACLE\ORA92\FSDEV10G\SYSAUX01.DBF 472,008
E:\ORACLE\ORA92\FSDEV10G\USERS01.DBF
21,794
E:\ORACLE\ORA92\FSDEV10G\T_FS_LSQ.ORA 12,123
24-FEB-04 12.00.32.000 PM
E:\ORACLE\ORA92\FSDEV10G\SYSTEM01.DBF 164,700
E:\ORACLE\ORA92\FSDEV10G\UNDOTBS01.DBF 26,082

|
|