Oracle Concepts - Guidelines for Tuning the Oracle Shared Pool
2016-03-22 00:06
423 查看
Oracle Concepts - Guidelines for Tuning the Oracle Shared Pool
In Summary
I hope you nowunderstand that the old "just increase the shared pool" answer isn'tgood enough anymore when it comes to tuning problems. You must take an in depthlook at your shared pool and tune what needs to be
tuned, not just throw memoryat a problem until it submerges. Indeed, I have shown that in some casesincreasing the size of the shared pool may harm performance and decreasing thesize may be advisable. The shared pool is vital to the proper performanceof your
Oracle database, you must have it properly tuned or drown in badperformance. Next we will cover what to pin, the shared pool and multi-threadedserver, hashing and generalized library and dictionary cache tuning. We havealso discussed ways to monitor for what
objects should be pinned, discussedmulti-threaded server, looked at hashing problems and their resolution as wellas examined classic library and data dictionary cache tuning. We haveestablished 8 guidelines for tuning the Oracle shared pool:
Guideline 1: Ifgross usage of the shared pool in a non-ad-hoc environment exceeds 95% (risesto 95% or greater and stays there) establish a shared pool size large enough tohold the fixed size portions, pin reusable
packages and procedures. Graduallyincrease shared pool by 20% increments until usage drops below 90% on theaverage.
Guideline 2: Ifthe shared pool shows a mixed ad-hoc and reuse environment, establish a sharedpool size large enough to hold the fixed size portions, pin reusable packagesand establish a comfort level above this required
level of pool fill. Establisha routine flush cycle to filter non-reusable code from the pool.
Guideline 3: Ifthe shared pool shows that no reusable SQL is being used establish a sharedpool large enough to hold the fixed size portions plus a few megabytes (usuallynot more than 40) and allow the shared pool
modified least recently used (LRU)algorithm to manage the pool. (also see guideline 8)
Guideline 4:Determine usage patterns of packages, procedures, functions and cursors and pinthose that are frequently used.
Guideline 5: InOracle7when using MTS increase the shared pool size to accommodate MTSmessaging and queuing as well as UGA requirements. In Oracle8 use the LargePool to prevent MTS from effecting the shared pool areas.
Guideline 6: Usebind variables, PL/SQL (procedures or functions) and views to reduce the sizeof large SQL statements to prevent hashing problems.
Guideline 7: In asystem where there is no flushing increase the shared pool size in 20%increments to reduce reloads and invalidations and increase object cache hitratios.
Guideline 8: Inany shared pool, if the overall data dictionary cache miss ratio exceeds 1percent, increase the size of the shared pool.
Using theseguidelines and the scripts and techniques covered in this lesson, your shouldbe well on the way towards a well tuned and well performing shared pool.
Table 18:Initialization Parameters That Effect The Shared Pool
Table 19:Initialization Parameters Used In Tuning Shared Pool
Table 20: ViewsDealing With Shared Pool and Buffer Tuning
Table 21: SoftwareMentioned in Lessons
In Summary
I hope you nowunderstand that the old "just increase the shared pool" answer isn'tgood enough anymore when it comes to tuning problems. You must take an in depthlook at your shared pool and tune what needs to be
tuned, not just throw memoryat a problem until it submerges. Indeed, I have shown that in some casesincreasing the size of the shared pool may harm performance and decreasing thesize may be advisable. The shared pool is vital to the proper performanceof your
Oracle database, you must have it properly tuned or drown in badperformance. Next we will cover what to pin, the shared pool and multi-threadedserver, hashing and generalized library and dictionary cache tuning. We havealso discussed ways to monitor for what
objects should be pinned, discussedmulti-threaded server, looked at hashing problems and their resolution as wellas examined classic library and data dictionary cache tuning. We haveestablished 8 guidelines for tuning the Oracle shared pool:
Guideline 1: Ifgross usage of the shared pool in a non-ad-hoc environment exceeds 95% (risesto 95% or greater and stays there) establish a shared pool size large enough tohold the fixed size portions, pin reusable
packages and procedures. Graduallyincrease shared pool by 20% increments until usage drops below 90% on theaverage.
Guideline 2: Ifthe shared pool shows a mixed ad-hoc and reuse environment, establish a sharedpool size large enough to hold the fixed size portions, pin reusable packagesand establish a comfort level above this required
level of pool fill. Establisha routine flush cycle to filter non-reusable code from the pool.
Guideline 3: Ifthe shared pool shows that no reusable SQL is being used establish a sharedpool large enough to hold the fixed size portions plus a few megabytes (usuallynot more than 40) and allow the shared pool
modified least recently used (LRU)algorithm to manage the pool. (also see guideline 8)
Guideline 4:Determine usage patterns of packages, procedures, functions and cursors and pinthose that are frequently used.
Guideline 5: InOracle7when using MTS increase the shared pool size to accommodate MTSmessaging and queuing as well as UGA requirements. In Oracle8 use the LargePool to prevent MTS from effecting the shared pool areas.
Guideline 6: Usebind variables, PL/SQL (procedures or functions) and views to reduce the sizeof large SQL statements to prevent hashing problems.
Guideline 7: In asystem where there is no flushing increase the shared pool size in 20%increments to reduce reloads and invalidations and increase object cache hitratios.
Guideline 8: Inany shared pool, if the overall data dictionary cache miss ratio exceeds 1percent, increase the size of the shared pool.
Using theseguidelines and the scripts and techniques covered in this lesson, your shouldbe well on the way towards a well tuned and well performing shared pool.
Table 18:Initialization Parameters That Effect The Shared Pool
NAME | DESCRIPTION |
shared_pool_size | size in bytes of shared pool (7 and 8) |
shared_pool_reserved_size | size in bytes of reserved area of shared pool (7 and 8) |
shared_pool_reserved_min_alloc | minimum allocation size in bytes for reserved area of shared pool (7 and 8) |
large_pool_size | size in bytes of the large allocation pool (8 only) |
parallel_max_servers | Maximum number of parallel query slaves, if set forces calculation and setting of large pool size parameter (8i) |
parallel_adaptive_multi_user | If set forces calculation of large pool size is over-ridden if size manually set(8i). Oracle DOES NOT recommend setting parallel_adaptive_multi_user. |
parallel_automatic_tuning | If set forces calculation of large pool size is over-ridden if size is manually set (8i) |
large_pool_min_alloc | minimum allocation size in bytes for the large allocation pool (8 only, obsolete in 8i) |
parallel_min_message_pool | minimum size of shared pool memory to reserve for pq servers (8 only, obsolete in 8i) |
backup_io_slaves | Number of backup IO slaves to configure (8 only) |
temporary_table_locks | Number of temporary table locks to configure (7 and 8) |
dml_locks | Number of DML locks to configure (7 and 8) |
sequence_cache_entries | Number of sequence numbers to cache (7 and 8) |
row_cache_cursors | Number of row caches to set up (7 and 8) |
max_enabled_roles | Number of role caches to set up (7 and 8) |
mts_dispatchers | Number of MTS dispatcher processes to start with (7 and 8) |
mts_max_dispatchers | Maximum number of dispatcher processes to allow (7 and 8) |
mts_servers | Number of MTS servers to start with (7 and 8) |
mts_max_servers | Maximum number of MTS servers to allow (7 and 8) |
open_cursors | Maximum number of open cursors per session (7 and 8) |
Cursor_space_for_time | Hold open cursors until process exits (7 and 8) |
VIEW NAME | PURPOSE |
V$PARAMETER | Contains current settings for all documented initialization parameters |
V$SGASTAT | Contains sizing information for all SGA areas |
V$SQLAREA | Contains information and statistics on the SQL area of the shared pool |
V$DB_OBJECT_CACHE | Contains information on all cached objects in the database shared pool area |
V$LIBRARYCACHE | Contains statistics on the library caches |
V$ROWCACHE | Contains statistics on the data dictionary caches |
DBA_USERS | Contains database user information |
V$BUFFER_POOL | Oracle8 view showing pool areas |
V$BUFFER_POOL_STATISTICS | Oracle8 buffer pool statistics |
V$BH | View that monitors every buffer in buffer pool |
Software | Manufacturer | Purpose |
Oracle Administrator | RevealNet, Inc. | Administration Knowledge base |
Q Diagnostic | Savant, Corp. | Provide Oracle DB diagnostics |
相关文章推荐
- Oracle Concepts - General Guidelines for Shared Pool Sizing
- Oracle12c的数据库向11g导进的方法
- Oracle Shared Pool Advisory Utility
- Oracle Concepts - Shared Pool
- oracle中rownum的理解
- Oracle新建数据库和用户及表空间
- oracle学习笔记系列------oracle操作例子的专用表
- ORACLE 11G flashback 相关讨论
- oracle学习笔记系列------oracle 基本操作之基本函数的用法
- c3p0连接oracle数据库单元测试
- Oracle归档日志管理
- Oracle数据库语句大全
- 第十七讲--Oracle存储结构:段区块
- oracle基于odbc建立dblink访问sqlserver
- sql中的text字段如何导入oracle
- oracle的客户,就可以使用pl/sql访问远程oracle 数据库的方法
- oracle 用 imp 导入数据 指定用户,密码,ip , 端口 和表单
- 第十六讲--Oracle存储结构:表空间
- 第十五讲--Oracle存储结构:文件
- ORACLE数据库操作基本语句