What is the Reserved Area?
A cache miss on the data dictionary cache or library cache is more expensive than a miss on the buffer cache. For this reason, the Shared Pool should be sized to ensure that frequently used data is cached. If there is not enough free space in the Shared Pool, then Oracle must search for and free enough memory to satisfy this request. This operation could conceivably hold latch resources for detectable periods of time, causing minor disruption to other concurrent attempts at memory allocation.
By default, Oracle configures a small Reserved Pool (or Reserved Area) inside the Shared Pool. This memory can be used for operations such as PL/SQL and trigger compilation or for temporary space while loading Java objects. After the memory allocated from the Reserved Pool is freed, it returns to the Reserved Pool.
5% of the Shared Pool is set aside as the Reserved Pool to handle allocations of memory higher than defined by the hidden parameter _shared_pool_reserved_pct. Issue
select a.ksppinm "Parameter",
b.ksppstvl "Session Value",
c.ksppstvl "Instance Value"
from sys.x$ksppi a, sys.x$ksppcv b, sys.x$ksppsv c
where a.indx = b.indx and a.indx = c.indx
and a.ksppinm = '_shared_pool_reserved_pct';
to see the current setting in your environment. In some application environments, 5% is too small. If an ORA-04031 problem indicates a very large memory request failure, increase the size of the Reserved Area by manually setting SHAREPOOL_RESERVED_SIZE or if using SGA_TARGET>0, change the hidden parameter, _shared_pool_reserved_pct to 10 or 15 (see example below) to ensure that when the Shared Pool grows or shrinks automatically, the Reserved Area will change as well.
Warning:
If you decide to use the SHARED_POOL_RESERVED_SIZE parameter and SGA_TARGET>0, you may experience ORA-4031 situations on large memory requests because the MMAN process may be increasing the size of the Shared Pool over time, while the Reserved Area remains constant. Thus the Reserved Area may start out at 10% of the Shared Pool size, but over time it may end up 2% or 3% (much smaller than expected in relation to the new Shared Pool size).
The Reserved Area handles bigger memory allocations in an attempt to decrease the chances of fragmentation in the Shared Pool over time.
SQL> alter system set "_shared_pool_reserved_pct"=10 scope=spfile
or add this in the pfile
"_shared_pool_reserved_pct"=10
For large allocations, Oracle attempts to allocate space in the Shared Pool in the following order:
1. From the unreserved part of the shared pool.
2. From the reserved pool. If there is not enough space in the unreserved part of the Shared Pool, then Oracle checks whether the reserved pool has enough space.
3. If there is not enough space in the unreserved and reserved parts of the Shared Pool, then Oracle attempts to free enough memory for the allocation. It then retries the unreserved and reserved parts of the Shared Pool. These mini-flushes will clean out RECREATABLE memory chunks from the LRU list that have not been reused for a while
Mohammed Riyaz Ahmed Khan
Apps DBA “The PATHAN Boy”
Tuesday, May 12, 2009
sga_target - hidden parameter shared pool parameter size
Posted by ryzpathan at 5:16 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment