Granule
1.SGA components are allocated and deallocated in units of contiguous memory called granules
2.The size of a granule depends on the estimated total SGA, If the estimated SGA size if :
a.Less than or equal to 128MB then the granule size is 4MB
b.Greater than 128MB then the granule size is 16MB
Sizing Redo Log Buffer
1.Adjust the LOG_BUFFER parameter
2.Default_value:Either 512K or 128K * the value of CPU_COUNT, whichever is greater.
Using Dynamic Views
Tuning Guidlines
SQL> select * from v$sysstat where name like 'redo buffer%' or name like 'redo entries';
STATISTIC# NAME CLASS VALUE STAT_ID
---------- --------------- ---------- ---------- ----------
133 redo entries 2 43861 3488821837
135 redo buffer all 2 0 1446958922
ocation retries
SQL> select sid,event,seconds_in_wait,state FROM v$session_wait where event='log buffer space%';
Reducing Redo Operations
1.Direct Path loading without archiving does not generate redo.
2.Direct Path loading with archiving can use Nologging mode
3.Direct Load Insert can use Nologging mode
4.Some SQL statements can use Nologging mode.
Monitoring Java Pool Mem
Limit Java session memory useage:
1.JAVA_SOFT_SESSIONSPACE_LIMIT
2.JAVA_MAX_SESSIONSAPCE_SIZE
SQL> select * from v$sgastat where pool ='java pool';
POOL NAME BYTES
------------ --------------- ----------
java pool free memory 4194304
Sizing the SGA for JAVA
1.SHARED_POOL_SIZE:
a.8KB per loaded class
b.50MB for loading large JAR files
2.Configure Oracle Shared Server
3.JAVA_POOL_SIZE
24MB default
50MB for medium-sized Java application
Monitoring Dispatchers
1.Use the following dynamic views:
a.v$shared_server_monitor
b.v$dispatcher
c.v$dispatcher_rate
2.Identify contention for dispatchers by checking:
a.Busy rates
b.Dispatcher waiting time
3.Check for dispatcer contention
4.Add or remove dispatchers while the database is open
SQL> show parameter disp;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dispatchers string (protocol=tcp)(dispatchers=3)
max_dispatchers integer 5
SQL> select sum(owned) "clinets",sum(busy)*100/(sum(busy)+sum(idle)) "Busy rate" from v$dispatcher;
clinets Busy rate
---------- ----------
0 .000076756
SQL> select * from v$queue;
PADDR TYPE QUEUED WAIT TOTALQ
-------- ---------- ---------- ---------- ----------
00 COMMON 0 0 0
30E1A71C DISPATCHER 0 0 0
30E1ACD0 DISPATCHER 0 0 0
30E1B284 DISPATCHER 0 0 0
第一个是 接受队列 后三个是响应队列
SQL> select name, bytes, idle,busy,requests from v$shared_server;
NAME BYTES IDLE BUSY REQUESTS
---- ---------- ---------- ---------- ----------
S000 0 572435 0 0
S001 0 572408 0 0
S002 0 572391 0 0
S003 0 572383 0 0
S004 0 572373 0 0
Memory Usage
1.Some user information goes into the shared pool
2.To reduce the load on the shared pool set a large pool
3.Overall memory demand is lower when using shared servers
4.Shared servers use the global area(UGA) for sorts
Trouble shooting
1.the database listener is not running
2. the oracle shared server initialization parameters are set incorrectly
3.The dispacher process has been killed
4. The Dba does not have a dedicated connection
5.The PROCESSES parameter is too low.
Obtaining Dictionary Info
v$circuit
v$dispatcher
v$dispatcher_rate
v$queue
v$shared_server_monitor
v$session
v$shared_server