ASMM and shared_pool_reserved_size
Hello All,
Setting below parameters would affect memory available to MMAN when ASMM is turned on.
shared_pool_size
java_pool_size
large_pool_size
streams_pool_size
db_cache_size
Is this true for Shared_pool_reserved_size as well?
Thanks
S~
SHARED_POOL_RESERVED_SIZE is taken from SHARED_POOL_SIZE
Oracle recommend set it to 10% of SHARED_POOL_SIZE default is 5%,
upper limit of this pool is 50% of SHARED_POOL_SIZE, over that Oracle will signal error.
In ASMM the shared pool size is dynamic so you better not set this pool size too high.
7.3.8.1 Using SHARED_POOL_RESERVED_SIZE
The default value for SHARED_POOL_RESERVED_SIZE is 5% of the SHARED_POOL_SIZE. This means that, by default, the reserved list is configured.
If you set SHARED_POOL_RESERVED_SIZE to more than half of SHARED_POOL_SIZE, then Oracle signals an error. Oracle does not let you reserve too much memory for the reserved pool. The amount of operating system memory, however, might constrain the size of the shared pool. In general, set SHARED_POOL_RESERVED_SIZE to 10% of SHARED_POOL_SIZE. For most systems, this value is sufficient if you have already tuned the shared pool. If you increase this value, then the database takes memory from the shared pool. (This reduces the amount of unreserved shared pool memory available for smaller allocations.)
Statistics from the V$SHARED_POOL_RESERVED view help you tune these parameters. On a system with ample free memory to increase the size of the SGA, the goal is to have the value of REQUEST_MISSES equal zero. If the system is constrained for operating system memory, then the goal is to not have REQUEST_FAILURES or at least prevent this value from increasing.
If you cannot achieve these target values, then increase the value for SHARED_POOL_RESERVED_SIZE. Also, increase the value for SHARED_POOL_SIZE by the same amount, because the reserved list is taken from the shared pool.
SHARED_POOL_RESERVED_SIZE
Similar Messages
-
Hi, all.
"shared pool free memory" from v$sgastat include "SHARED_POOL_RESERVED_SIZE" ??
For example,
select * from v$sgastat
where pool ='shared pool'
and name like 'free memory'
assuming that the result of the above query is about 100Megabytes
and "SHARED_POOL_RESERVED_SIZE" is 50Megabytes,
"100 M free memory" in shared pool includes 50M (reserved area)??
Thanks and Regards.
Message was edited by:
user507290Shortly after the database starts up, some of the 'shared_pool_reserved_size' will probably be in use, although quite a lot of it may still be free; so you cannot say (directly) how much of the "free memory" belongs in the reserved area and how much comes from the rest of the shared pool.
However, there is a view called v$shared_pool_reserved that tells you how much of the reserved area is currently free (and gives various other statisics about the pool's use). There are some versions of Oracle where the definition of this view is wrong, though - possibly in the lower 9i versions.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk -
ASMM - DB_KEEP_CACHE_SIZE
Hello colleagues
10.2.0.2 - MS2003 SP2
I'm using ASMM and I like to pin a frequently scanned table to the KEEP buffer. The parameter DB_KEEP_CACHE_SIZE is per default 0. Do I have to change this parameter to the size of the object (at least) I like to pin?
If I set a fixed size of e.g. 200M - is this space allocated as one piece and not used anymore by other SGA components or is the "unused" space still available?
How can I prove that my object is located in the KEEP cache?
Thx for your hints.
TonyDBAHello colleagues
10.2.0.2 - MS2003 SP2
I'm using ASMM and I like to pin a frequently scanned table to the KEEP buffer. The parameter DB_KEEP_CACHE_SIZE is per default 0. Do I have to change this parameter to the size of the object (at least) I like to pin?
If I set a fixed size of e.g. 200M - is this space allocated as one piece and not used anymore by other SGA components or is the "unused" space still available?
How can I prove that my object is located in the KEEP cache?
Thx for your hints.
TonyDBA
Keep buffer usually to keep small, almost never updated table which used as look up table.
Set DB_KEEP_CACHE_SIZE size big enough to keep the table. Memory allocated for DB_KEEP_CACHE_SIZE will not be used by other component of SGA.
Use below query to check the tables that sitting on buffer cache:
select
object_name c1,
object_type c2,
num_blocks c3,
(num_blocks/decode(sum(blocks), 0, .001, sum(blocks)))*100 c4
from
(select
o.object_name object_name,
o.object_type object_type,
count(1) num_blocks
from
dba_objects o,
v$bh bh
where
o.object_id = bh.objd
and
o.owner not in ('SYS','SYSTEM')
group by
o.object_name,
o.object_type)
t1,
dba_segments s
where
s.segment_name = t1.object_name
and
num_blocks > 10
group by
object_name,
object_type,
num_blocks
order by
num_blocks desc
regards
AM -
Shared_pool_reserved_size in 10g
Hai all,
Is there any thumb rule for setting shared_pool_reserved_size in 10g.. DB : 10.2.0.4.in our environment we have shared_pool_size - 1GB and shared_pool_reserved_size is 120M
Os : RHEL ES 5
Please share
Kai
Edited by: KaiS on May 4, 2009 12:59 PMBefore going to read some Rule of thumb, go through the official doc, always better to get advices from the doc instead of getting help from some "magician" :
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/memory.htm#i39982
Nicolas. -
Hello Team:
I ran a metalink script to report the shared pool utilization recently. I took this output when the database was on peak load.
SQL> /
Obj mem: 66435759 bytes (63.36MB)
Shared sql: 324219036 bytes (309.2MB)
Cursors: 341207073 bytes (325.4MB)
Free memory: 67228508 bytes (64.11MB)
Shared pool utilization (total): 468785754 bytes (447.07MB)
Shared pool allocation (actual): 754974720bytes (720MB)
Percentage Utilized: 91%
does this mean I have to add more space to shared pool. If so what is the threshold value?
Regards,
BalaBhawani nandan Prasad - Principal DBA -- See a to z diagnostics about Shared pool
1. Memory 2
a. Shared Pool 2
1. Introduction 2
2. Architecture 2
3. Scripts for different DBA tasks: 5
a.Measure object usage inside the shared pool and Tune shared pool 7
b.Check reload problem in library cache 12
c.Find the large queries in the shared pool library cache (using > 4mb each) 13
d.Find objects that can be considered pining into the shared pool 13
e.LRU work and objects were loaded and flushed 13
f.How much are waiting for Library Cache Latch 14
g.Queries identical but aren’t shared. 14
h.Get Biggest chunk of free memory. 14
i.Check the shared pool reserved size status 16
j.When having multiple subheaps: 16
k.Check shared pool at first glance quick diagnostics 17
l.Memory Usage - object list level view 17
m.Loads Number of times object has been loaded 17
n.Check number of times and object has been executed 18
o.Check shared pool in more details 18
p.Library Cache Statistics 18
q.Reserve Pool Settings 19
r.Pinned Objects 19
s.Finding literal SQL 19
t.Finding the Library Cache hit ratio 19
u. Row Cache Misses – Dictionary cache stats 19
v. Checking hash chain lengths 20
w. Checking for high version counts 20
x. Finding statement/s which use lots of shared pool memory 20
y. Allocations causing shared pool memory to be 'aged' out 21
z. Issues in various Oracle Releases 21
4. Terminology 22
5. Oracle 11g Caching and Pooling – SQL Result Cache 27
6. References 37
2. SQL 38
3. Statistics 38
4. Wait events 38
5. Schema 39
6. General 39
a. Scripts 39
1. accept.sql 39
1. Memory
a. Shared Pool
1. Introduction
Shared pool is used to cache different types of data such as textual and executable forms of PL/SQL blocks and SQL statements, dictionary cache data, and other data in SGA. Additional shared memory needed in the SHARED POOL if using ASM storage. Gathering schema/database stats (table/index stats) makes database query performance better and it reduce utilization of shared pool. Hence, practice to schedule job to gather stats regularly which suites your database performance. If you use shared pool effectively you can reduce resource consumption in at least four ways
1. Parse overhead is avoided if the SQL statement is already in the shared pool. This saves CPU resources on the host and elapsed time for the end user.
2. Latching resource usage is significantly reduced, which results in greater scalability.
3. Shared pool memory requirements are reduced, because all applications use the same pool of SQL statements and dictionary resources.
4. I/O resources are saved, because dictionary elements that are in the shared pool do not require disk access.
This sharable area of memory is managed as a sophisticated cache and heap manager rolled into one. It has 3 fundamental problems to overcome:
1. The unit of memory allocation is not a constant - memory allocations from the pool can be anything from a few bytes to many kilobytes
2. Not all memory can be 'freed' when a user finishes with it (as is the case in a traditional heap manager) as the aim of the shared pool is to maximize share of information. The information in the memory may be useful to another session - Oracle cannot know in advance if the items will be of any use to anyone else or not.
3. There is no disk area to page out to so this is not like a traditional cache where there is a file backing store. Only "rewriteable" information can be discarded from the cache and it has to be re-created when it is next needed.
Oracle 10g architecture of Shared pool:
Library Cache Shared SQL Area (Hash Value, SQL source, Execution plan)
Data Dictionary Cache
Enqueues Fixed Area Other
Latches
Oracle 11g architecture of Shared pool:
Library Cache Shared SQL Area (Hash Value, SQL source, Execution plan)
Data Dictionary Cache
Result Cache
Enqueues Fixed Area Other
Latches
1. Library Cache
Shared Sql Area: contains Parsed SQL and execution Plans for statements already run against the database. This area allows SQL execution plans to be reused by many users.
Private SQL Area: Private SQL areas are non-shared memory areas assigned to unique user sessions.
Pl/sql Area: contains the recently executed Procedures, Functions and Packages.
Control Structures: Common control structure information example Memory for Latches and locks, sequence cache.
2. Dictionary cache known as the row cache.
Dictionary cache stores all the metadata info of tables and views in the database, Names and data types of the columns in the database, Object and system privileges of all the Users. Oracle maintains the stats of all the objects in the shared pool, if any of the memory objects are not used from the last 3 seconds, these memory objects will be aged out and will be removed from the cache. All the Shared Pool Structures are maintained by a LRU (least recently Used) algorithm, by which Oracle removes the objects from the shared Pool, until there is enough free space in the shared Pool to keep new Object.
3. Scripts for different DBA tasks:
Dictionary Views for shared POOL:
NON-RAC
V$DB_CACHE_ADVICE
V$DB_OBJECT_CACHE
V$DLM_LATCH
V$DLM_LOCKS
V$LATCH
V$LATCHHOLDER
V$LATCHNAME
V$LATCH_CHILDREN
V$LATCH_MISSES
V$LATCH_PARENT
V$LIBRARYCACHE
V$LOCK
V$LOCKED_OBJECT
V$LOCKS_WITH_COLLISIONS
V$LOCK_ACTIVITY
V$LOCK_ELEMENT
V$OPEN_CURSOR
V$PROCESS
V$PX_PROCESS
V$PX_PROCESS_SYSSTAT
V$PX_SESSION
V$PX_SESSTAT
V$ROWCACHE
V$ROWCACHE_PARENT
V$ROWCACHE_SUBORDINATE
V$SESSION
V$SESSION_CONNECT_INFO
V$SESSION_CURSOR_CACHE
V$SESSION_EVENT
V$SESSION_LONGOPS
V$SESSION_OBJECT_CACHE
V$SESSION_WAIT
V$SESSTAT
V$SESS_IO
V$SGA
V$SGASTAT
V$SGAINFO
V$SGA_DYAMIC_COMPONENTS
V$SGA_DYNAMIC_FREE_MEMORY
V$SGA_RESIZE_OPS
V$SGA_CURRENT_RESIZE_OPS
v$shared_pool_advice
V_$SHARED_POOL_ADVICE
V$SHARED_POOL_RESERVED
V$SHARED_SERVER
V$SORT_SEGMENT
V$SORT_USAGE
V$SQL
V$SQLAREA
V$SQLTEXT
V$SQLTEXT_WITH_NEWLINES
V$SQL_BIND_DATA
V$SQL_BIND_METADATA
V$SQL_CURSOR
V$SQL_SHARED_CURSOR
V$SQL_SHARED_MEMORY
V$STATNAME
V$SUBCACHE
V$SYSSTAT
V$SYSTEM_CURSOR_CACHE
V$SYSTEM_EVENT
V$SYSTEM_PARAMETER
X$KSMSP
RAC
GV$LATCH
GV$LATCHHOLDER
GV$LATCHNAME
GV$LATCH_CHILDREN
GV$LATCH_MISSES
GV$LATCH_PARENT
GV$LIBRARYCACHE
GV$LOCK
GV$LOCKED_OBJECT
GV$LOCKS_WITH_COLLISIONS
GV$LOCK_ACTIVITY
GV$LOCK_ELEMENT
GV$PROCESS
GV$PX_PROCESS
GV$PX_PROCESS_SYSSTAT
GV$PX_SESSION
GV$PX_SESSTAT
GV$ROWCACHE
GV$ROWCACHE_PARENT
GV$ROWCACHE_SUBORDINATE
GV$SESSION
GV$SESSION_CONNECT_INFO
GV$SESSION_CURSOR_CACHE
GV$SESSION_EVENT
GV$SESSION_LONGOPS
GV$SESSION_OBJECT_CACHE
GV$SESSION_WAIT
GV$SESSTAT
GV$SESS_IO
GV$SGA
GV$SGASTAT
gv$shared_pool_advice
GV$SHARED_POOL_RESERVED
GV$SHARED_SERVER
GV$SORT_SEGMENT
GV$SORT_USAGE
GV$SQL
GV$SQLAREA
GV$SQLTEXT
GV$SQLTEXT_WITH_NEWLINES
GV$SQL_BIND_DATA
GV$SQL_BIND_METADATA
GV$SQL_CURSOR
GV$SQL_SHARED_CURSOR
GV$SQL_SHARED_MEMORY
GV$STATNAME
GV$SUBCACHE
GV$SYSSTAT
GV$SYSTEM_CURSOR_CACHE
GV$SYSTEM_EVENT
GV$SYSTEM_PARAMETER
GV$WAITSTAT
GV$_LOCK
a.Measure object usage inside the shared pool and Tune shared pool
set pagesize 132
column owner format a16
column name format a36
column sharable_mem format 999,999,999
column executions format 999,999,999
prompt
prompt Memory Usage of Shared Pool Order - Biggest First
prompt
column name format 45
select owner, name||' - '||type name, sharable_mem from v$db_object_cache
where sharable_mem > 10000
and type in ('PACKAGE', 'PACKAGE BODY', 'FUNCTION', 'PROCEDURE')
order by sharable_mem desc
prompt
prompt Loads into Shared Pool - Most Loads First
prompt
select owner, name||' - '||type name, loads , sharable_mem from v$db_object_cache
where loads > 3
and type in ('PACKAGE', 'PACKAGE BODY', 'FUNCTION', 'PROCEDURE')
order by loads desc
prompt
prompt Executions of Objects in the Shared Pool - Most Executions First
prompt
select owner, name||' - '||type name, executions from v$db_object_cache
where executions > 100
and type in ('PACKAGE', 'PACKAGE BODY', 'FUNCTION', 'PROCEDURE')
order by executions desc
select 'If the values for the EXEC and LOADS close increase SHARED_POOL_SIZE!' from dual ;
set feedback off
set linesize 80
set pagesize 52
clear columns
clear breaks
col executions HEADING EXEC
col sharable_mem heading SHAMEM
col owner format a8
col name format a30
col type format a12
set numwidth 8
ttitle center 'Data Base Objects Owned by All Users Statistics' skip 2
select name, type, sharable_mem, loads, executions, pins
from sys.v_$db_object_cache ;
b.Check reload problem in library cache
select namespace, pins, reloads from v$librarycache;
show parameters shared_pool
select bytes/1024/1024 from v$sgastat where pool='shared pool' and name='free memory';
c.Find the large queries in the shared pool library cache (using > 4mb each)
SELECT sql_text "Stmt", count(*), sum(sharable_mem) "Mem",
sum(users_opening) "Open", sum(executions) "Exec"
FROM v$sql GROUP BY sql_text HAVING sum(sharable_mem) > 4096000;
d.Find objects that can be considered pining into the shared pool
column name format a40
column owner format a15
select owner, name, executions, locks, pins, loads, kept from v$db_object_cache where loads > 10;
create temp table and insert records of candidates to be pinned.
CREATE TABLE LRU_TMP AS SELECT * FROM X$KSMLRU;
INSERT INTO LRU_TMP SELECT * FROM X$KSMLRU;
Use the LRU_TMP table for analysis.
SELECT USERNAME, KSMLRCOM, KSMLRHON, KSMLRNUM, KSMLRSIZ, SQL_TEXT
FROM V$SQLAREA A, LRU_TMP K, V$SESSION S WHERE KSMLRSIZ > 3000
AND A.ADDRESS=S.SQL_ADDRESS AND A.HASH_VALUE = S.SQL_HASH_VALUE
AND SADDR=KSMLRSES;
You can see the candidates to pin from the query below
COL STORED_OBJECT FORMAT A40;
COL SQ_EXECUTIONS FORMAT 999,999;
SELECT /*+ ORDERED USE_HASH(D) USE_HASH(C) */ O.KGLNAOWN||’.'||O.KGLNAOBJ STORED_OBJECT, SUM(C.KGLHDEXC) SQL_EXECUTIONS
FROM SYS.X$KGLOB O, SYS.X$KGLRD D, SYS.X$KGLCURSOR C
WHERE
O.INST_ID = USERENV(’INSTANCE’) AND
D.INST_ID = USERENV(’INSTANCE’) AND
C.INST_ID = USERENV(’INSTANCE’) AND
O.KGLOBTYP IN (7, 8, 9, 11, 12) AND
D.KGLHDCDR = O.KGLHDADR AND
C.KGLHDPAR = D.KGLRDHDL
GROUP BY O.KGLNAOWN, O.KGLNAOBJ
HAVING SUM(C.KGLHDEXC) > 0
ORDER BY 2 DESC;
How to pin object
EXECUTE SYS.DBMS_SHARED_POOL.SIZES(150);
EXECUTE SYS.DBMS_SHARED_POOL.KEEP('SYS.STANDARD');
EXECUTE SYS.DBMS_SHARED_POOL.UNKEEP('SYS.STANDARD');
e.LRU work and objects were loaded and flushed
LRU work in the shared pool KSMLRNUM stores the number of objects that were flushed to load the large object. KSMLRISZ stores the size of the object that was loaded (contiguous memory allocated)
column ksmlrcom format a20
column username format a5
select username,sid,KSMLRCOM,KSMLRSIZ,KSMLRNUM, KSMLRHON, KSMLROHV, KSMLRSES from x$ksmlru , v$session where KSMLRSES=SADDR and KSMLRNUM >2 ;
f.How much are waiting for Library Cache Latch
select count(*),event from v$session_wait where event not like '%SQL%' and event not like '%ipc%' and event not like '%timer%' GROUP BY EVENT;
select count(*),wait_time from v$session_wait where event='latch free' and p2=106 group by wait_time;
select sid,wait_time,seconds_in_wait from v$session_wait where event='latch free' and p2=106 and WAIT_TIME>1;
g.Queries identical but aren’t shared.
SELECT address, hash_value, version_count , users_opening , users_executing,
substr(sql_text,1,240) "SQL" FROM v$sqlarea WHERE version_count > 10;
h.Get Biggest chunk of free memory.
select sysdate, decode( sign(ksmchsiz - 812), -1, (ksmchsiz - 16) / 4,
decode(sign(ksmchsiz - 4012),-1, trunc((ksmchsiz + 11924) / 64),
decode(sign(ksmchsiz - 65548), -1, trunc(1/log(ksmchsiz - 11, 2)) + 238,254))) bucket,
sum(ksmchsiz) free_space, count(*) free_chunks, trunc(avg(ksmchsiz)) average_size,
max(ksmchsiz) biggest from x$ksmsp
where inst_id = userenv('Instance') and ksmchcls = 'free' group by
decode(sign(ksmchsiz - 812),-1, (ksmchsiz - 16) / 4,
decode(sign(ksmchsiz - 4012),-1, trunc((ksmchsiz + 11924) / 64),
decode(sign(ksmchsiz - 65548),-1, trunc(1/log(ksmchsiz - 11, 2)) + 238,254 ))) ;
SELECT KSMCHCLS CLASS, COUNT(KSMCHCLS) NUM, SUM(KSMCHSIZ) SIZ,
To_char( ((SUM(KSMCHSIZ)/COUNT(KSMCHCLS)/1024)),’999,999.00′)||’k’ “AVG SIZE”
FROM X$KSMSP GROUP BY KSMCHCLS;
CLASS NUM SIZ AVG SIZE
freeabl 19010 34519404 1.77k
recr 23581 24967956 1.03k
R-freea 68 1632 .02k
perm 22 39801268 1,766.75k
R-free 34 7238192 207.90k
free 2389 36075980 14.75k
Watch for trends using these guidelines:
a) if ‘free’ memory is low (less than 5mb or so) you may need to increase the shared_pool_size and shared_pool_reserved_size. You should expect ‘free’ memory to increase and decrease over time. Seeing trends where ‘free’ memory decreases consistently is not necessarily a problem, but seeing consistent spikes up and down could be a problem.
b) if ‘freeable’ or ‘perm’ memory continually grows then it is possible you are seeing a memory bug.
c) if ‘freeabl’ and ‘recr’ memory classes are always huge, this indicates that you have a lot of cursor info stored that is not releasing.
d) if ‘free’ memory is huge but you are still getting 4031 errors, the problem is likely reloads and invalids in the library cache causing fragmentation.
-Note says that this query can hang database on HP platforms
See the shared pool parameters
column name format a30
select name,value from v$parameter where name like '%shared_pool%' ;
select x.ksppinm, y.ksppstvl from x$ksppi x , x$ksppcv y where x.indx = y.indx and lower(x.ksppinm) like '%spin%';
SELECT count(*) FROM v$latch_children WHERE NAME = 'library cache';
Shrinking and growing operations from V$SGA_RESIZE_OPS dynamic view:
select to_char(end_time, ‘dd-Mon-yyyy hh24:mi’) end, oper_type, initial_size, target_size, final_size from V$SGA_RESIZE_OPS where component=’shared pool’ order by end;
#shared_pool_summary.sql -get an overview of chunks in the shared pool
select
ksmchcom contents,
count(*) chunks,
sum(decode(ksmchcls, 'recr', ksmchsiz)) recreatable,
sum(decode(ksmchcls, 'freeabl', ksmchsiz)) freeable,
sum(ksmchsiz) total
from
sys.x_$ksmsp
where
inst_id = userenv('Instance') and
ksmchcls not like 'R%'
group by
ksmchcom
#reserved_pool_summary.sql - get an overview of chunks in the reserved pool
select
ksmchcom contents,
count(*) chunks,
sum(decode(ksmchcls, 'R-recr', ksmchsiz)) recreatable,
sum(decode(ksmchcls, 'R-freea', ksmchsiz)) freeable,
sum(ksmchsiz) total
from
sys.x_$ksmspr
where
inst_id = userenv('Instance')
group by
ksmchcom
#save_sqlplus_settings.sql -reset sqlplus settings
set termout off
store set sqlplus_settings replace
clear breaks
clear columns
clear computes
set feedback off
set verify off
set termout on
set define "&"
#restore_sqlplus_settings.sql -reset sqlplus settings
set termout off
@sqlplus_settings
clear breaks
clear columns
clear computes
set termout on
i.Check the shared pool reserved size status
SELECT free_space, avg_free_size, used_space, avg_used_size, REQUEST_MISSES, request_failures, last_miss_size FROM v$shared_pool_reserved;
An ORA-04031 error referencing large failed requests, indicates the Reserved Area is too fragmented. The reserved pool is small when: REQUEST_FAILURES > 0 (and increasing), The DBA should Increase shared_pool_reserved_size and shared_pool_size together. It is possible that too much memory has been allocated to the reserved list. The DBA should Decrease shared_pool_reserved_size, If: REQUEST_MISS = 0 or not increasing
FREE_MEMORY = > 50% of shared_pool_reserved_size minimum
col free_space for 999,999,999,999 head “TOTAL FREE”
col avg_free_size for 999,999,999,999 head “AVERAGE|CHUNK SIZE
col free_count for 999,999,999,999 head “COUNT”
col request_misses for 999,999,999,999 head “REQUEST|MISSES
col request_failures for 999,999,999,999 head “REQUEST|FAILURES”
col max_free_size for 999,999,999,999 head “LARGEST CHUNK”
select free_space, avg_free_size, free_count, max_free_size, request_misses, request_failures from v$shared_pool_reserved;
TOTAL FREE AVERAGE
CHUNK SIZE COUNT LARGEST CHUNK REQUEST
MISSES REQUEST
FAILURES
7,238,192 212,888 34 212,888 0 0
You should also use hidden and unsupported parameter “_shared_pool_reserved_pct” to control reserved pool. This parameter controls the allocated percentage of shared pool for reserved pool. By default it is %5 of the shared pool and if you use ASMM for memory management you can set this value higher like 10 to allocate reserved pool dynamically. When you set the parameter you will see the shared_pool_reserved_size parameter will be adjusted to the new setting. The parameter can not be modified when instance is started. You can use the query below to see the current value
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’;
Parameter Session Value Instance Value
sharedpool_reserved_pct 10 10
j.When having multiple subheaps:
select KSMCHIDX, ksmchcom ChunkComment,
decode(round(ksmchsiz/1000),0,'0-1K', 1,'1-2K', 2,'2-3K', 3,'3-4K',4,'4-5K',5,'5-6k',6,'6-7k',7,'7-8k',8,'8-9k', 9,'9-10k', '> 10K'), count(*), ksmchcls Status, sum(ksmchsiz) Bytes
from x$ksmsp where KSMCHCOM = 'free memory' group by KSMCHIDX,ksmchcom, ksmchcls, decode(round(ksmchsiz/1000),0,'0-1K', 1,'1-2K', 2,'2-3K', 3,'3-4K',4,'4-5K',5,'5-6k',6,'6-7k',7,'7-8k',8,'8-9k', 9,'9-10k','> 10K');
SubPool SGA_HEAP CHUNKCOMMENT size COUNT(*) STATUS BYTES
1 sga heap(1,0) free memory > 10K 34 R-free 7238192
1 sga heap(1,0) free memory 3-4K 2 free 6284
1 sga heap(1,0) free memory > 10K 241 free 35707400
1 sga heap(1,0) free memory 8-9k 1 free 7712
1 sga heap(1,0) free memory 2-3K 4 free 6752
1 sga heap(1,0) free memory 0-1K 2090 free 133288
1 sga heap(1,0) free memory 9-10k 21 free 188676
1 sga heap(1,0) free memory 1-2K 30 free 25868
If you see lack of large chunks it is possible that you can face with ORA-04031 in near future.
k.Check shared pool at first glance quick diagnostics
select 'You may need to increase the SHARED_POOL_RESERVED_SIZE' Description, 'Request Failures = '||REQUEST_FAILURES Logic
from v$shared_pool_reserved where REQUEST_FAILURES > 0
and 0 != (select to_number(VALUE) from v$parameter
where NAME = 'shared_pool_reserved_size')
union
select 'You may be able to decrease the SHARED_POOL_RESERVED_SIZE' Description,'Request Failures = '||REQUEST_FAILURES Logic
from v$shared_pool_reserved where REQUEST_FAILURES < 5
and 0 != (select to_number(VALUE) from v$parameter
where NAME = 'shared_pool_reserved_size')
l.Memory Usage - object list level view
• Owner - Owner of the object
• Object - Name/namespace of the object
• Sharable Memory - Amount of sharable memory in the shared pool consumed by the object
select OWNER, NAME||' - '||TYPE object,SHARABLE_MEM
from v$db_object_cache where SHARABLE_MEM > 10000
and type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
order by owner asc ,SHARABLE_MEM desc
SELECT * FROM (SELECT ROW_NUMBER () over (PARTITION BY NAMESPACE ORDER BY SHARABLE_MEM DESC) ROW_within , NAMESPACE, SHARABLE_MEM, SUBSTR(NAME,1,40) NAME FROM V$DB_OBJECT_CACHE ORDER BY SHARABLE_MEM DESC) WHERE ROW_WITHIN <= 2 ORDER BY NAMESPACE, ROW_WITHIN;
ROW_WITHIN NAMESPACE SHARABLE_MEM NAME
1 CLUSTER 2794 C_OBJ#_INTCOL#
2 CLUSTER 1684 SMON_SCN_TO_TIME
1 RSRCPLAN 5117 SYS_GROUP -
Sga_target vs sga_max_size
Hi,
I'm using ASMM and sga_target is set to 1000M.
the sga_max_size parameter should be have the same value as sga_target?
For example: what's happen if i set sga_max_size to 1200M ?
Thank'sHi,
I think, that if you set sga_max_size to 1200M and you have SGA_target=1000M, then you could dynamicaly (without restarting instance) increase sga up to 1200M. SGA_MAX_SIZE is only about possibility to increase your sga and oracle DOESN'T allocate whole SGA_MAX_SIZE - it allocate only your sga_target.
You can test it by decreasing SGA_TARGET by command ALTER SYSTEM SET SGA_TARGET=800M SCOPE=MEMORY; and you can see that memory will be released. You can test it in other direction too - increase sga_target to 1200M and aditional memory will be allocated from free memory.
Pavel -
Oracle 11g Enterprise Manager Issue -- Cannot run DB & em dbconsole at 1ce
Hi All
I am coming for your help with a query uncommon. I have configured, my oracle 11g database, on windows 32 bit machine. Initially I had set sga_target to enable ASMM expecting Oracle to manage this part. However, upon subsequent restart, DB could never be started with continuous +"ORA-12853 cannot allocate xxxxK blocks to PX"+ stuff.
Reading some content over the net, I've unset SGA_TARGET and turned OFF ASMM and managed to start the db. Now, when I configured the EM on this machine and start it up I am able to open the URL https://xxx.xxx.xxx.xxx:1158/em, I am not able to login as authentication failure is returned where as the same set of userid and password work with out any complaints. Upon some look up, I realise EM dbconsole on the db server is consuming almost all of the available memory on the host leaving no space for Oracle or other processes on server. I cannot add any more memory for H/W restrictions. Having a page file of 4xRAM is not doing the trick. My attempts to grow oracle also do not help. I thought if I could control the memory utils of the EM AGENT and the corresponding Java process, it might help. I do not if that could be achieved.
Can we control, the REAL Memory Utilisation of the EM processes? Does any OS setting or Oracle setting help us achieve this? Please advice.
Regards!
SaratI am running windows 32 bit on Intel x86. Below is the extract of the system info. I hope this is useful.
OS Name: Microsoft Windows XP Professional
OS Version: 5.1.2600 Service Pack 2 Build 2600
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free\
Sarat -
Dear All,
We have Oracle 11g R1 64-bit database on MS Windows 2008 64-bit. It is having Oracle RAC and we have two nodes on RAC. It was crashed due to out of memory issue. Where as each node is having 16GB of RAM. I am displaying current init parameters file. Can any body suggest the correct parameters for this please?
I have few questions do we need local listeners for this? What about Shared Server option? etc
RacNode2.__db_cache_size=503316480
RacNode1.__db_cache_size=167772160
RacNode1.__java_pool_size=33554432
RacNode2.__java_pool_size=16777216
RacNode1.__large_pool_size=16777216
RacNode2.__large_pool_size=16777216
RacNode1.__oracle_base='C:\app\Administrator'#ORACLE_BASE set from environment
RacNode2.__oracle_base='C:\app\Administrator'#ORACLE_BASE set from environment
RacNode1.__pga_aggregate_target=369098752
RacNode2.__pga_aggregate_target=738197504
RacNode1.__sga_target=704643072
RacNode2.__sga_target=1409286144
RacNode1.__shared_io_pool_size=0
RacNode2.__shared_io_pool_size=0
RacNode2.__shared_pool_size=822083584
RacNode1.__shared_pool_size=436207616
RacNode1.__streams_pool_size=16777216
RacNode2.__streams_pool_size=16777216
*._spin_count=2000
*.audit_file_dest='C:\app\Administrator\admin\RacNode\adump'
*.audit_trail='db'
*.cluster_database_instances=2
*.cluster_database=true
*.compatible='11.1.0.0.0'
*.control_files='+DATAR10/RacNode/controlfile/current.256.710013115','+DATAR5/RacNode/controlfile/current.256.710013117'
*.db_block_size=16384
*.db_create_file_dest='+DATAR10'
*.db_domain='moigis1'
*.db_name='RacNode'
*.db_recovery_file_dest='+DATAR5'
*.db_recovery_file_dest_size=17179869184
*.diagnostic_dest='C:\app\Administrator'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=RacNodeXDB)'
RacNode2.instance_number=2
RacNode1.instance_number=1
RacNode1.local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 110.48.27.14)(PORT = 1521))'
RacNode2.local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 110.48.27.13)(PORT = 1521))'
*.log_archive_dest_1='LOCATION=+DATAR5/'
*.log_archive_format='ARC%S_%R.%T'
RacNode1.memory_max_target=3221225472
RacNode2.memory_max_target=3221225472
*.memory_target=2133852160
RacNode1.memory_target=1073741824
RacNode2.memory_target=2147483648
*.nls_language='AMERICAN'
*.nls_territory='USA'
*.open_cursors=3000
*.processes=500
*.remote_listener='LISTENERS_RacNode'
*.remote_login_passwordfile='exclusive'
*.session_cached_cursors=200
*.session_max_open_files=15
*.sessions=555
*.shared_servers=1
RacNode2.thread=2
RacNode1.thread=1
*.transactions=550
RacNode1.undo_tablespace='UNDOTBS1'
RacNode2.undo_tablespace='UNDOTBS2'
ThanksUse Automatic Shared Memory Management (ASMM) and start back the instance using the pfile.
-
Sir,how to find the last DML operations
Hi,
Please tell me how to find the last DML Operations at least minimum 30 queries.
Thanks in advance,Shared Pool is a memory location in SGA that contains SQL Statement that are submitted to Oracle for execution. This area is common to the entire database. Its not specific to user.
So what ever Unique SQL statement that is submitted to the SQL Engine will be available here. Shared Pool has a size limit. That is defined by the parameters SHARED_POOL_SIZE and SHARED_POOL_RESERVED_SIZE. So when the Shared pool becomes full the data needs to be removed from it. That is done in FIFO basis.
Oracle provides a visibility to this area through dictionary view V$SQLAREA. So this view will not only contain the SQL executed by you but also by every one. Even the one executed by oracle itself.
So in my opinion what you are asking is not possible to get. You must have some logging mechanism in your application to get this information. -
Upgrade in hangs in XPRAS_UPG phase
We are experimenting an hang situation during the upgrade from 46C sandbox system to ECC6 Sr3, latest patches.
The upgrade is in phase XPRAS_UPG, and in Sap we see the job RDDEXECL running from very long time (more than 1 days); in SM50 we see the several programmes (SAPLSTXG and others) working with sequential read, update or delete actions on the table STXL.
But neither the job log is updated or the logs into the put directory on the filesystem.
Before the upgrade we applied the note 558197 (that one for the script dba_ind_column,....), and we enlarged the shared_pool_size and shared_pool_reserved_size as described into the upgrade guide.
We run also the del_priv_ind script as suggested by Prepare.
We try also to stop and restart the upgrade, but nothing change; it continue to stay in hangs on the STXL table in phase XPRAS_UPG.
The latest row of the SAPR700ZG1.SID is :
"Post-import method 'AFTER_IMP_FORM' started for FORM 'L' ....."
Is the first time we see this situation during an upgrade.
Any suggestion ?Hi,
Is this your first test upgrade in the Landscape? How many records the table has?
Is not uncommon that XPRAS_UPG takes a long time, in one system I won´t forget the downtime took 72 hours running ! and most of this time was during XPRAS_UPG so if this is taking so long and it is working it will be better to let it finish and analize the upgrade report. Normaly when some processes are running the log files are not updated because they don´t trace all work done by the processes. Have you analize if Hard disks are working more than normal during this phase? if so then let if finish and you will be able to see why it took so long.
Good luck -
Problem while using XML with Oracle
I have a problem using XML with oracle applications
The process I am following
1. Making a XML string.
2. Parsing it to get a document
3. Free the parser using xmlparser.freeparser
4. Traversing through nodes .
5. Freeing the document.
The whole Process is executed in batch mode.
The problem occurs after executing the procedure for 5000 records and I get the error
ORA-04031: unable to allocate 4176 bytes of shared memory ("shared pool","unknown object","sga
heap","library cache")
Can you please help me out to overcome this problem
It's urgent
I have
Oracle version 8.1.7.0.0
XML version 1.2
OS Windows NT
To resolve the problem I have increase shared memory size and java initialization parameters ,which seems OK
Looking forward for your answer.Hello, Reena
Your process flow seems to be correct in term of getting/freeing memory.
Following error
The problem occurs after executing the procedure for 5000 records and I get the error
ORA-04031: unable to allocate 4176 bytes of shared memory ("shared pool","unknown object","sga
heap","library cache")may be caused by memory leaks in xdk or memory fragmentation(due to get/free memory cycle)
To find out if this is an memory leak issue you could try to monitor V$SGASTAT from one session while running your batch process in another session.
To prevent (or lower its impact) fragmentation issues try to PIN objects, and adjust java_pool_size and shared_pool_reserved_size.
Anyway, counsult your Oracle DBA.
Oracle version 8.1.7.0.0I think, you should apply database patch first of all. The latest one (8.1.7.4.x) could be accured from Metalink. -
Problem while using cewolf library with jsf jboss.
Hi Guys,
I am trying to use cewolf library to generate graphs in my web application based on jsf. But I am getting the following exception.
I have pointed down that cewolf. jar file is causing the problem.
javax.servlet.ServletException: #{LoginBean.validateUser}: javax.faces.el.EvaluationException: javax.ejb.NoSuchObjectLocalException: Object Not Found ; CausedByException is:
Receive timed out
javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
root cause
javax.faces.FacesException: #{LoginBean.validateUser}: javax.faces.el.EvaluationException: javax.ejb.NoSuchObjectLocalException: Object Not Found ; CausedByException is:
Receive timed out
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
javax.faces.component.UICommand.broadcast(UICommand.java:312)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
And this login pages does not at all uses the cewolf library.Hello, Reena
Your process flow seems to be correct in term of getting/freeing memory.
Following error
The problem occurs after executing the procedure for 5000 records and I get the error
ORA-04031: unable to allocate 4176 bytes of shared memory ("shared pool","unknown object","sga
heap","library cache")may be caused by memory leaks in xdk or memory fragmentation(due to get/free memory cycle)
To find out if this is an memory leak issue you could try to monitor V$SGASTAT from one session while running your batch process in another session.
To prevent (or lower its impact) fragmentation issues try to PIN objects, and adjust java_pool_size and shared_pool_reserved_size.
Anyway, counsult your Oracle DBA.
Oracle version 8.1.7.0.0I think, you should apply database patch first of all. The latest one (8.1.7.4.x) could be accured from Metalink. -
ORA-27102: out of memory - cannot start RAC node
I have a test 2 node RAC system 10.2.0.4 RHEL5 64 bit. 32 GB RAM on each node, nothing else running on these servers. I was playing around with different parameter settings, specifically setting up ASMM and I upped my SGA_TARGET and SGA_MAX_SIZE and changed the STATISTICS_LEVEL=typical. I previously had SGA_TARGET and SGA_MAX set to 1536M and upped it to 8GB on the first node (only):
alter system set SGA_MAX_SIZE=8G scope=spfile SID='NODE1';
alter system set SGA_TARGET=8G scope=spfile SID='NODE1';After trying to restart the first node via SRVCTL (it didn't, simply saying that the node couldn't start), and attempting to restart the node stand-alone connected via sqlplus as sys, I get the following errors:
SQL> startup nomount
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on deviceThe alert log just has the following:
Starting ORACLE instance (normal)
Mon Mar 8 17:03:52 2010
Starting ORACLE instance (normal)And there aren't really any relevant trace files. Top looks fine, memory isn't over-allocated.
I'm sure this has something to do with shmmax and my other kernel settings which I stupidly forgot to check and read up on before upping the SGA_TARGET. At this point, I just want to go back to my original settings of 1536 M - but since I'm not able to start the instance even in nomount, and am using SPFILE and not pfiles, I'm not sure how to do that. Any help is appreciated. This is a test system and I have no automated backups going at the present time.You're most likely correct - I have been running without issue with the existing kernel params and SGA set to 1536M - but at this point, I just want to get back to my original settings to start the first node, then do additional research on the kernel params and SGA settings. So, any help in setting the SGA back to what I had previously would be most appreciated.
Here are my kernel params:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max =1048536 -
Oracle 11gR2 question:
spfile.ora AMM, ASMM configuration
Goal: only use AMM
Issue: both AMM and ASMM are ENABLED !
memory_target 1.5G
memory_max_target 1.28G
sga_target 0
sga_max_size 768M
1. Are AMM and ASMM mutually exclusive.
2. What is expected outcome if both AMM and ASMM are ENABLEDoracletune wrote:
Aman,
Our production system has run since December 2012, with above AMM settings.
The PGA hit ratio was between 98-100 during this period.
The transaction load have been constant and consistent.
Only change: Yesterday re-organized 10million row table [21G] -> to Interval Partitioned Table.
Result a: Fast-Fast query response from Partitioned Table
Result b: New Problem PGA hit ratio 63.52That sounds pretty good as far as problems go. You should look at the plans for your Result a. It could very well be that you've done something like convert a PGA thrashing query to a non-thrashing query, or perhaps even a direct read, leaving only other random queries to hit the PGA. Is anything else slower? Rather than result b being a problem, it could be you just demonstrated the back-asswardness of hit ratios - things may be "better" with a "worse" ratio.
And what sb said. -
ASMM - sga dynamic components and standby
Are SGA dynamic modifications "transferred" from the primary to the standby?
i.e: if __shared_pool is resized in primary will this also trigger standby?
Trying to determine if dynamic pools may somehow end up being different upon switchover/failover or if it's possible that upon switchover standby's dynamic shared_pool size results smaller than that of former primaryAbsolutely, yet there are some things DG broker does upon switch over. Was wondering if somehow standby would be "updated" upon switcher...
But then again, it's SGA as a hole may be smaller to begin with...
Were you to tell if the following is true or false:
"After activation standby database may have a SGA configuration different than that of primary"
what would you say?
Hole intention here is to determine whether after a switch over it's possible to start getting ORA-04031 on account of dynamic pools being different
and oracle struggling to re-size them...
Suppose we have a 6Gb SGA... primary has been working full steam for say 2 months and dynamic pools are set by oracle in the following way:
shared_pool...3Gb
cache...3Gb
Now if standby has not acknowledged those dynamic changes, it may be using values of it's own... maybe a larger cache... say
shared_pool...1Gb
cache...5Gb
Now we switch-over and if sga settings are not "synced", then new primary will have 2Gb less of shared pool...
Application kicks in, shared pool runs low... Oracle will have to move 1 or 2Gbs from cache to shared pool, this will cause serious latching and most likely ORA-04031
so is that likely to happen?
Maybe you are looking for
-
How to configure AnyConnect ACL's?
I am a little new to Cisco ASA's but we bought two new 5540's to use as a new VPN solution for our company. We want to implement Cisco Anyconnect full client and Clientless based solutions for our end users. I am having problems working with setting
-
hi there, I met a problem, when i put the data, and get it. key data aaa aaaaaa bbb bbbbbb ccc cccccc I have put "aaa", "bbb" and "ccc" into db, but when I try to get the key for "aaa" , "bbb", it return the data "cccccc", how can I solve it? after t
-
Unistalling and Re-installing Mac OS X Tiger
What are the steps to follow for uninstalling Tiger OS from my mac and then re-installing it? Actually what I want is to reset all my hard disk. Thanks in advance.
-
HT203167 How do I get back my old apps?
I just updated my iTouch software and when everything was finished - I lost all my old apps. Most of the apps I paid a lot of money for. How do I find my lost Apps?
-
30" Cinema Display paralyses my 17" 3.06 GHz MBP - why?
Real issue here, I have a Macbook Pro 17" 3.06 GHz Core 2 Duo with 8GB of ram and a 7200 speed 500gb Hard Drive My 30" Cinema Displays make my 17" MBP crash, flicker, mouse go crazy etc at least once a day and kernel panic occasionally. When its not