ORACLE9i_性能调优基础五(Sizing Other SGA structures)

本文深入探讨了数据库性能优化的关键技术,包括SGA组件、重做日志缓冲区、动态视图使用、调优指南、减少重做操作、监控Java池内存、设置SGA大小等,提供了一套全面的性能提升策略。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >



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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值