Tuning SGA
Tuning SGA
2. init.ora parameters -
iii. select sum(250 * user_opening) from v$sqlarea; during peak application use
or in a test environment
d. Avoid fragmentation
- V$SHARED_POOL_RESERVED
-- goal of request_misses = 0
iii. Use small PL/SQL packaged functions instead of large anonoymous blocks
1. Buffer Cache: block can be either free buffers, dirty blocks, pinned buffers. Managed by
DBWR process.
b. Use utilities to estimate the hit-ratio change when buffers are added or removed.
- select sum(count) ach from v$recent_bucket where rownum < 20; Use ach
value in statement below.
iii. If hit ratio is high and reducing memory usage is desired then:
ii. There is added memory for other processes as determined by amount of page
faults.
d. Sizing
ii. Select table_name, blocks from dba_tables where owner = ‘??’ and
table_name=’aname’; Sum the blocks from DBA_TABLES, DBA_INDEXES,
DBA_CLUSTERS for each object.
iii.
3. Tuning guidelines:
a. V$SYSSTAT - redo log space requests to the number of redo entries should not be
greater than 1 in 5000.
- V$SESSION_WAIT - see if there are any waits for log switch. The
SECONDS_IN_WAIT value of the ‘log buffer space’ event indicates time spent waiting
for space in the redo log buffer because log switch has not occured.
-- This indicates that the buffers are being filled up faster then LGWR is writing.
-- This might also mean disk I/O contention on the redo log files.
-- Increase the size of the redo log files and or add groups.