Reducing shared pool latch contention
I see a lot of shared pool latch contention on my 11gR2 database because there are over 100 identical schemas that run identical SQL. This causes lots of child cursors to be created. Scheduled jobs kick off hourly for every schema at the same time and that produces contention for shared pool latches for the same parent cursor.
I want to reduce that contention. Here's my question...
If I make the SQL text unique by either
(a) changing the object referenbes from "TableName" to "SchemaName.TableName", or
(b) adding a comment to the SQL that includes the SchemaName
...will that cause a separate cursor to be created in the shared pool?
I know in older versions even a change in a comment would cause Oracle to treat it as a separate statement. Is that still true in 11gR2?
FWIW cursor_sharing is set to EXACT.
Chuck1958 wrote:
If I make the SQL text unique by either
(a) changing the object referenbes from "TableName" to "SchemaName.TableName", or
(b) adding a comment to the SQL that includes the SchemaName
...will that cause a separate cursor to be created in the shared pool?
I know in older versions even a change in a comment would cause Oracle to treat it as a separate statement. Is that still true in 11gR2?
Yes:
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
SQL> select * /* schema1 */ from t where x=0;
no rows selected
SQL> select * /* schema2 */ from t where x=0;
no rows selected
SQL> select sql_id, child_number, sql_text
2 from v$sql
3 where sql_text like '%/* schema%';
SQL_ID CHILD_NUMBER SQL_TEXT
4d03bxnvbw4ac 0 select * /* schema2 */ from t where x=0
76xtkkpvfqx1h 0 select * /* schema1 */ from t where x=0
b3zjvv0cfbhrx 0 select sql_id, child_number, sql_text fr
om v$sql where sql_text like '%/* schema
%'
Similar Messages
-
Contention for latches related to the shared pool was consuming significant
We are having performance issue on our database. When I look at the AWR, I see that there is a contention for latches. Below is the AWR Report.
ADDM Report for Task 'ADDM:1775307360_12808'
Analysis Period
AWR snapshot range from 12807 to 12808.
Time period starts at 10-MAY-11 01.00.15 PM
Time period ends at 10-MAY-11 02.00.23 PM
Analysis Target
Database 'ADVFDWP' with DB ID 1775307360.
Database version 11.1.0.7.0.
ADDM performed an analysis of all instances.
Activity During the Analysis Period
Total database time was 27827 seconds.
The average number of active sessions was 7.71.
Summary of Findings
Description Active Sessions Recommendations
Percent of Activity
1 Shared Pool Latches 6.43 | 83.42 0
2 Top SQL by DB Time 2.41 | 31.24 3
3 "Concurrency" Wait Class 2.18 | 28.22 0
4 PL/SQL Execution 1.53 | 19.86 1
5 "User I/O" wait Class 1.33 | 17.24 0
6 Hard Parse 1.24 | 16.14 0
7 Undersized Buffer Cache .83 | 10.73 0
8 CPU Usage .7 | 9.02 0
9 Top SQL By I/O .31 | 4.04 1
10 Top Segments by I/O .24 | 3.12 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Findings and Recommendations
Finding 1: Shared Pool Latches
Impact is 6.43 active sessions, 83.42% of total activity.
Contention for latches related to the shared pool was consuming significant
database time in some instances.
Instances that were significantly affected by this finding:
Number Name Percent Impact ADDM Task Name
1 ADVFDWP1 99.31 ADDM:1775307360_1_12808
Check the ADDM analysis of affected instances for recommendations.
Finding 2: Top SQL by DB Time
Impact is 2.41 active sessions, 31.24% of total activity.
SQL statements consuming significant database time were found.
Recommendation 1: SQL Tuning
Estimated benefit is 1.07 active sessions, 13.82% of total activity.
Action
Run SQL Tuning Advisor on the SQL statement with SQL_ID "fdk73nhpt93a5".
Related Object
SQL statement with SQL_ID fdk73nhpt93a5.
INSERT INTO SFCDM.F_LOAN_PTFL_MOL_SNPSHT SELECT * FROM
F_LOAN_PTFL_MOL_SNPSHT_STG
Recommendation 2: SQL Tuning
Estimated benefit is 1 active sessions, 12.96% of total activity.
Action
Tune the PL/SQL block with SQL_ID "7nvgzsgy9ydn9". Refer to the "Tuning
PL/SQL Applications" chapter of Oracle's "PL/SQL User's Guide and
Reference".
Related Object
SQL statement with SQL_ID 7nvgzsgy9ydn9.
begin
insert into SFCDM.F_LOAN_PTFL_MOL_SNPSHT select * from
F_LOAN_PTFL_MOL_SNPSHT_STG;
end;
Recommendation 3: SQL Tuning
Estimated benefit is .4 active sessions, 5.2% of total activity.
Action
Investigate the SQL statement with SQL_ID "fcvfq2gzmxu0t" for possible
performance improvements.
Related Object
SQL statement with SQL_ID fcvfq2gzmxu0t.
select
a11.DT_YR_MO DT_YR_MO,
a11.IND_SCRTZD IND_SCRTZD,
a13.CD_LNSTAT CD_LNSTAT_INTGRTD,
sum(a11.CNT_LOAN) WJXBFS1,
sum(a11.AMT_PART_EOP_UPB) WJXBFS2,
sum(a11.AMT_LST_VLD_PART_UPB) WJXBFS3
from
SFCDM.F_LOAN_PTFL_MOL_SNPSHT
a11
join
SFCDM.D_DETD_LNSTAT_CURR
a12
on
(a11.ID_CYCL_CLOS_DETD_LNSTAT_SRGT = a12.ID_DETD_LNSTAT_SRGT)
join
SFCDM.D_LNSTAT_CD
a13
on
(a12.ID_LNSTAT_CD_SRGT = a13.ID_LNSTAT_CD_SRGT)
join
SFCDM.D_LOAN_CHARTC_CURR_MINI
a14
on
(a11.ID_LOAN_CHARTC_SRGT = a14.ID_LOAN_CHARTC_SRGT)
where
(a11.DT_YR_MO in (201103)
and a14.CD_SFCRM_LOAN_BUS_LI not in ('L', 'T', 'W')
and a13.CD_LNSTAT in (14)
and not exists
(select * from SFCDM.F_LOAN_PTFL_MOL_SNPSHT s
where s.id_loan_syst_gend = a11.id_loan_syst_gend
and s.dt_yr_moIt is worth checking the actual size of the shared pool e.g.
select pool,sum(bytes)/1024/1024/1024 from v$sgastat group by pool;
the parameters you ahve posted suggest you have set a minimum but no maximum, so it could very large.
Next up is looking for unhared SQL i.e.
select column1 from some_table where column2='A_VALUE';
select column1 from some_table where column2='Another_Value';
where the code should be using binds instead of literals for security and performance reasons, a simple way to find this is to look in v$sql for sql having the same plan_hash_value but different sql_Ids and compare the sql_fulltext of each statement.
Also a possibility is sql with many child cursors, this is trickier as the cause may vary and may not be easy to fix. check th econtents of v$sql for sql that have high values in the child_number column anmd investigate the contents of v$sql_shared_cursor for the reason there are multiple child cursors.
Chris -
100% CPU, wait event : latch shared pool
I have a store procedure, run in one of database, it hangs in a "create table ... as select ..." statement.
the wait event is : latch shared pool, and CPU is up to 100%, it has run over few hours and seems hang.
Same stored procedure run on others enviroment, never seen such problem, even run on the same data size or even much much bigger data size.
This procedure has been used more than 2 years, never see such problem in any others enviroment. it only happend in this new setup enviroment.
however, in this enviroment, if I try to reduce data to be very very small, I was able to see procudure complate in 10 sec.
I suspect parameter, for example, I changed shared_pool_size from 40MB to 150 MB, re-start database and re-run, still see the same problem here.
Could anybody suggest any thing I can look into?
Thanksjjzz wrote:
I have a store procedure, run in one of database, it hangs in a "create table ... as select ..." statement.
the wait event is : latch shared pool, and CPU is up to 100%, it has run over few hours and seems hang.
If it's running at 100% CPU, it's not waiting.
Does v$session_wait (or even v$session since you seem to be running 10g) tell you that the session is *"waiting"*, or is it simply noting that your last wait was on the shared pool latch ?
If the latter, then you probably have some SQL in the procedure that has changed its execution plan to become much more CPU intensive - perhaps because of a small change in the data volume, data distribution, or statistics.
First step - find out what SQL statements are executing, and see how much work they are doing. You could query v$session for that session a few times and check what the sql_id and sql_child number are, also prev_sql_id and prev_child_number. If these stay constant, one or other may give you the guilty SQL statement. If not check v$open_cursor for the session.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"Science is more than a body of knowledge; it is a way of thinking"
Carl Sagan -
Shared Pool Statistics - awr report -m 10.2.0.1
Hi,
I'm new to reading awr report and performance tuning.
I have the below in my statspack.
Do i need to increase my shared pool?
Any one can advise and explain "% Memory for SQL w/exec" and "% SQL with executions>1"
Shared Pool Statistics
Begin End
Memory Usage %: 95.78 97.71
% SQL with executions>1: 51.51 80.85
% Memory for SQL w/exec> 1: 67.88 82.46
thanks!user21123 wrote:
The sweet point for the shared pool Memory Usage % is at about ~70%-80% because of aging out. You are at ~90%. It would be advisable to increase the shared pool, but if you're using 10g SGA_TARGET and SGA_MAX_SIZE, then that might require increasing those parameters. It depends how your AWR report looks for the Buffer Cache.
What makes you think this ?
In an OLTP system you hope for 100% shareable SQL, and correct allocation for the other objects, which would lead to 100% usage. In realistic terms, you're likely to get a few percent (which is often the shared_pool_reserved) free because there's a constant turn-over of non-shareable SQL.
If you're always seeing 70% - 80%, then there are several scenraios that might explain the figure. One is that you've simply made shared pool a bit too big. At the opposite extreme you might be constantly flushing 20%-30% of the material from the shared pool because it has become so fragmented that you have to clear a lot of garbage to create a small amount of contiguous space.
The best guideline to follow is to check whether you appear to be losing a significant amount of time on libarary cache and shared pool latches, using up an undesirable amount of CPU on parse time, see lots of reloads (without corresponding invalidations) in v$librarycache.
Without further information, we really can't say how good or bad the situation is. In fact, it's possible that the information that +"50% of your SQL has been shared, 50% has been single use"+ is a possible indicator that the shared_pool_size is too small, and we are filling the excess space with garbage rather than keeping the garbage (and library cache search time) to a minimum.
I would be interested to hear the thinking behind your suggestion, though.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." Stephen Hawking. -
% shared pool free problem in OEM database health
can u tell me what to do when the %shared pool free falls below 1% ..
what can be the solution.
if it is in the form of changing the shared pool size, how are the calculations done (in detail)?
other two parameters have values 99.99% and 98.95(buffer cache hit % and library cache hit %)user630185,
First look at things the other way round - if you have free memory in the shared pool, that means you have memory you are not using, why do you want to increase the amount of memory you are not using ?
Unless you can see a performance problem relating to a memory shortfall in the shared pool then you don't need to increase it. In fact, you could find that you introduce performance problems by increasing the shared pool if you are not making good use of shared SQL throughout your system.
Check for things like time lost on library and shared pool latches, CPU spent on parsing and "hard" parsing, successful use of the session cursor cache before worrying about the 1% free.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk -
Latch contention in Oracle 10.2.0.4
Hello All,
There is one script which takes 8 hours to complete on one of our Oracle 10.2.0.3 databases.
The TKPROF Output shows the below Wait events:
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file scattered read 28965 0.00 0.00
db file sequential read 1394318 0.00 0.00
SQL*Net message to client 4467645 0.00 0.00
SQL*Net message from client 4467645 0.00 0.00
latch: shared pool 2847 29.05 864.44
latch: library cache 1221 5.78 389.93
latch: row cache objects 126 0.58 2.39
latch: cache buffers chains 2765 0.02 0.16
log file sync 3 0.00 0.00
latch free 63 1.06 1.71
latch: object queue header operation 5 0.00 0.01
SQL*Net break/reset to client 1156 0.00 0.00
read by other session 21609 0.99 3.99
latch: library cache lock 1 0.01 0.01How can we reduce the "latch: shared pool" and "latch: library cache" wait/contentions?
The script in question runs 95 SELECT Statements, 3 UPDATE Statements and 1 INSERT Statement.
For more information, please let me know. Thanks.
Suddhasatwa.
Edited by: user13021719 on Mar 16, 2012 12:27 AMThanks for the above note.
yes the numbers are correct: there are 95 SELECT statements only in the program as well as in the TRACE file.
From the output of TKPROF I can see these 2 SELECT Statements taking maximum of these wait events:
TKPROF: Release 10.2.0.4.0 - Production on Fri Mar 16 01:25:38 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: hr84tax_ora_3391.trc
Sort options: exeela fchela prsela
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
SELECT PAYCALL2.PAY_BEGIN_DT, PAYCALL2.PAY_END_DT, PAYCALL2.CHECK_DT,
PSPCL1.COMPANY, PSPCL1.PAYGROUP, PSPCL1.PAY_END_DT, PSPCL1.PAGE_NUM,
PSPCL1.LINE_NUM, PSPCL1.OFF_CYCLE, PSPCL1.SEPCHK, PSPCL1.EMPLID,
PSPCL1.CHECK_DT, PSPCL1.PAYCHECK_OPTION, PSPCL1.PAYCHECK_STATUS
FROM
PS_PAY_CHECK PSPCL1, PS_PAY_CALENDAR PAYCALL2, PS_PAY_CAL_BAL_ID BALL1
WHERE PAYCALL2.COMPANY = BALL1.COMPANY AND PAYCALL2.PAYGROUP =
BALL1.PAYGROUP AND PAYCALL2.PAY_END_DT = BALL1.PAY_END_DT AND
BALL1.BALANCE_ID = :1 AND PAYCALL2.CHECK_DT >= :2 AND
PAYCALL2.CHECK_DT <= :3 AND PSPCL1.COMPANY = :4 AND PSPCL1.EMPLID
= :5 AND PSPCL1.COMPANY = PAYCALL2.COMPANY AND PSPCL1.PAYGROUP
= PAYCALL2.PAYGROUP AND PSPCL1.PAY_END_DT = PAYCALL2.PAY_END_DT AND
PSPCL1.PAYCHECK_STATUS IN ('F','R','A') ORDER BY PAYCALL2.CHECK_DT
call count cpu elapsed disk query current rows
Parse 11087 0.00 0.60 0 0 0 0
Execute 15222 0.00 17.59 11 22 0 0
Fetch 30444 0.00 16726.93 976663 8991463 0 23572
total 56753 0.00 16745.12 976674 8991485 0 23572
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 28
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
latch: shared pool 60 1.34 10.00
latch: library cache 22 0.34 0.86
SQL*Net message to client 41531 0.00 0.00
SQL*Net message from client 41531 0.00 0.00
db file sequential read 976663 0.00 0.00
latch: cache buffers chains 2 0.00 0.00
latch: object queue header operation 2 0.00 0.00
SELECT JB.OFFICER_CD, JB.EMPL_CLASS, JB.JOBCODE, JB.PAYGROUP,
JB.BUSINESS_UNIT, JB.STD_HOURS, JB.STD_HRS_FREQUENCY, JB.COMPRATE,
JB.EMPL_STATUS, JB.TAX_LOCATION_CD, JB.LOCATION, JB.EMPL_TYPE, JB.HOURLY_RT,
JB.EFFDT, JB.EFFSEQ, JB.EMPL_RCD, JB.DEPTID, JB.SETID_JOBCODE, JB.ESTABID,
JB.SAL_ADMIN_PLAN, JB.FICA_STATUS_EE, JB.SETID_LOCATION
from
PS_JOB JB Where JB.EMPLID = :1 AND JB.COMPANY = :2 AND JB.EFFDT =
(SELECT MAX(JB1.EFFDT) FROM PS_JOB JB1 WHERE JB1.EMPLID = JB.EMPLID
AND JB1.COMPANY = JB.COMPANY AND JB1.EFFDT <= :3) AND JB.EFFSEQ = (SELECT
MAX(JB2.EFFSEQ) FROM PS_JOB JB2 WHERE JB2.EMPLID = JB.EMPLID AND
JB2.COMPANY = JB.COMPANY AND JB2.EFFDT = JB.EFFDT) ORDER by JB.EFFDT,
JB.EFFSEQ
call count cpu elapsed disk query current rows
Parse 14305 0.00 1.62 0 0 0 0
Execute 25852 0.00 62.80 0 44 0 0
Fetch 51704 0.00 2429.58 167169 1036420 0 25888
total 91861 0.00 2494.01 167169 1036464 0 25888
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 28
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
latch: shared pool 242 9.08 66.46
latch: library cache 108 5.78 61.32
latch: row cache objects 23 0.06 0.20
SQL*Net message to client 66009 0.00 0.00
SQL*Net message from client 66009 0.00 0.00
db file sequential read 167169 0.00 0.00
latch free 1 0.04 0.04
read by other session 1 0.00 0.00
********************************************************************************The OEM tuning advisor does not recommend any tuning options for these.
Please advice.
For more information, please let me know.
Thanks
Suddhasatwa
Edited by: user13021719 on Mar 16, 2012 12:27 AM -
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 -
How to set the correct shared pool size and db_buffer_cache using awr
Hi All,
I want to how to set the correct size for shared_pool_size and db_cache_size using shared pool advisory and buffer pool advisory of awr report. I have paste the shared and buffer pool advisory of awr report.
Shared Pool Advisory
* SP: Shared Pool Est LC: Estimated Library Cache Factr: Factor
* Note there is often a 1:Many correlation between a single logical object in the Library Cache, and the physical number of memory objects associated with it. Therefore comparing the number of Lib Cache objects (e.g. in v$librarycache), with the number of Lib Cache Memory Objects is invalid.
Shared Pool Size(M) SP Size Factr Est LC Size (M) Est LC Mem Obj Est LC Time Saved (s) Est LC Time Saved Factr Est LC Load Time (s) Est LC Load Time Factr Est LC Mem Obj Hits (K)
4,096 1.00 471 25,153 184,206 1.00 149 1.00 9,069
4,736 1.16 511 27,328 184,206 1.00 149 1.00 9,766
5,248 1.28 511 27,346 184,206 1.00 149 1.00 9,766
5,760 1.41 511 27,346 184,206 1.00 149 1.00 9,766
6,272 1.53 511 27,346 184,206 1.00 149 1.00 9,766
6,784 1.66 511 27,346 184,206 1.00 149 1.00 9,766
7,296 1.78 511 27,346 184,206 1.00 149 1.00 9,766
7,808 1.91 511 27,346 184,206 1.00 149 1.00 9,766
8,320 2.03 511 27,346 184,206 1.00 149 1.00 9,766
Buffer Pool Advisory
* Only rows with estimated physical reads >0 are displayed
* ordered by Block Size, Buffers For Estimate
P Size for Est (M) Size Factor Buffers (thousands) Est Phys Read Factor Estimated Phys Reads (thousands) Est Phys Read Time Est %DBtime for Rds
D 4,096 0.10 485 1.02 1,002 1 0.00
D 8,192 0.20 970 1.00 987 1 0.00
D 12,288 0.30 1,454 1.00 987 1 0.00
D 16,384 0.40 1,939 1.00 987 1 0.00
D 20,480 0.50 2,424 1.00 987 1 0.00
D 24,576 0.60 2,909 1.00 987 1 0.00
D 28,672 0.70 3,394 1.00 987 1 0.00
D 32,768 0.80 3,878 1.00 987 1 0.00
D 36,864 0.90 4,363 1.00 987 1 0.00
D 40,960 1.00 4,848 1.00 987 1 0.00
D 45,056 1.10 5,333 1.00 987 1 0.00
D 49,152 1.20 5,818 1.00 987 1 0.00
D 53,248 1.30 6,302 1.00 987 1 0.00
D 57,344 1.40 6,787 1.00 987 1 0.00
D 61,440 1.50 7,272 1.00 987 1 0.00
D 65,536 1.60 7,757 1.00 987 1 0.00
D 69,632 1.70 8,242 1.00 987 1 0.00
D 73,728 1.80 8,726 1.00 987 1 0.00
D 77,824 1.90 9,211 1.00 987 1 0.00
D 81,920 2.00 9,696 1.00 987 1 0.00
My shared pool size is 4gb and db_cache_size is 40Gb.
Please help me in configuring the correct size for this.
Thanks and Regards,Hi ,
Actually batch load is taking too much time.
Please find below the 1 hr awr report
Snap Id Snap Time Sessions Cursors/Session
Begin Snap: 6557 27-Nov-11 16:00:06 126 1.3
End Snap: 6558 27-Nov-11 17:00:17 130 1.6
Elapsed: 60.17 (mins)
DB Time: 34.00 (mins)
Report Summary
Cache Sizes
Begin End
Buffer Cache: 40,960M 40,960M Std Block Size: 8K
Shared Pool Size: 4,096M 4,096M Log Buffer: 25,908K
Load Profile
Per Second Per Transaction Per Exec Per Call
DB Time(s): 0.6 1.4 0.00 0.07
DB CPU(s): 0.5 1.2 0.00 0.06
Redo size: 281,296.9 698,483.4
Logical reads: 20,545.6 51,016.4
Block changes: 1,879.5 4,667.0
Physical reads: 123.7 307.2
Physical writes: 66.4 164.8
User calls: 8.2 20.4
Parses: 309.4 768.4
Hard parses: 8.5 21.2
W/A MB processed: 1.7 4.3
Logons: 0.7 1.6
Executes: 1,235.9 3,068.7
Rollbacks: 0.0 0.0
Transactions: 0.4
Instance Efficiency Percentages (Target 100%)
Buffer Nowait %: 100.00 Redo NoWait %: 100.00
Buffer Hit %: 99.66 In-memory Sort %: 100.00
Library Hit %: 99.19 Soft Parse %: 97.25
Execute to Parse %: 74.96 Latch Hit %: 99.97
Parse CPU to Parse Elapsd %: 92.41 % Non-Parse CPU: 98.65
Shared Pool Statistics
Begin End
Memory Usage %: 80.33 82.01
% SQL with executions>1: 90.90 86.48
% Memory for SQL w/exec>1: 90.10 86.89
Top 5 Timed Foreground Events
Event Waits Time(s) Avg wait (ms) % DB time Wait Class
DB CPU 1,789 87.72
db file sequential read 27,531 50 2 2.45 User I/O
db file scattered read 26,322 30 1 1.47 User I/O
row cache lock 1,798 20 11 0.96 Concurrency
OJVM: Generic 36 15 421 0.74 Other
Host CPU (CPUs: 24 Cores: 12 Sockets: )
Load Average Begin Load Average End %User %System %WIO %Idle
0.58 1.50 2.8 0.7 0.1 96.6
Instance CPU
%Total CPU %Busy CPU %DB time waiting for CPU (Resource Manager)
2.2 63.6 0.0
Memory Statistics
Begin End
Host Mem (MB): 131,072.0 131,072.0
SGA use (MB): 50,971.4 50,971.4
PGA use (MB): 545.5 1,066.3
% Host Mem used for SGA+PGA: 39.30 39.70
RAC Statistics
Begin End
Number of Instances: 2 2
Global Cache Load Profile
Per Second Per Transaction
Global Cache blocks received: 3.09 7.68
Global Cache blocks served: 1.86 4.62
GCS/GES messages received: 78.64 195.27
GCS/GES messages sent: 53.82 133.65
DBWR Fusion writes: 0.52 1.30
Estd Interconnect traffic (KB) 65.50
Global Cache Efficiency Percentages (Target local+remote 100%)
Buffer access - local cache %: 99.65
Buffer access - remote cache %: 0.02
Buffer access - disk %: 0.34
Global Cache and Enqueue Services - Workload Characteristics
Avg global enqueue get time (ms): 0.0
Avg global cache cr block receive time (ms): 1.7
Avg global cache current block receive time (ms): 1.0
Avg global cache cr block build time (ms): 0.0
Avg global cache cr block send time (ms): 0.0
Global cache log flushes for cr blocks served %: 1.4
Avg global cache cr block flush time (ms): 0.9
Avg global cache current block pin time (ms): 0.0
Avg global cache current block send time (ms): 0.0
Global cache log flushes for current blocks served %: 0.1
Avg global cache current block flush time (ms): 0.0
Global Cache and Enqueue Services - Messaging Statistics
Avg message sent queue time (ms): 0.0
Avg message sent queue time on ksxp (ms): 0.4
Avg message received queue time (ms): 0.5
Avg GCS message process time (ms): 0.0
Avg GES message process time (ms): 0.0
% of direct sent messages: 79.13
% of indirect sent messages: 17.10
% of flow controlled messages: 3.77
Cluster Interconnect
Begin End
Interface IP Address Pub Source IP Pub Src
en9 10.51.10.61 N Oracle Cluster Repository
Main Report
* Report Summary
* Wait Events Statistics
* SQL Statistics
* Instance Activity Statistics
* IO Stats
* Buffer Pool Statistics
* Advisory Statistics
* Wait Statistics
* Undo Statistics
* Latch Statistics
* Segment Statistics
* Dictionary Cache Statistics
* Library Cache Statistics
* Memory Statistics
* Streams Statistics
* Resource Limit Statistics
* Shared Server Statistics
* init.ora Parameters
More RAC Statistics
* RAC Report Summary
* Global Messaging Statistics
* Global CR Served Stats
* Global CURRENT Served Stats
* Global Cache Transfer Stats
* Interconnect Stats
* Dynamic Remastering Statistics
Back to Top
Statistic Name Time (s) % of DB Time
sql execute elapsed time 1,925.20 94.38
DB CPU 1,789.38 87.72
connection management call elapsed time 99.65 4.89
PL/SQL execution elapsed time 89.81 4.40
parse time elapsed 46.32 2.27
hard parse elapsed time 25.01 1.23
Java execution elapsed time 21.24 1.04
PL/SQL compilation elapsed time 11.92 0.58
failed parse elapsed time 9.37 0.46
hard parse (sharing criteria) elapsed time 8.71 0.43
sequence load elapsed time 0.06 0.00
repeated bind elapsed time 0.02 0.00
hard parse (bind mismatch) elapsed time 0.01 0.00
DB time 2,039.77
background elapsed time 122.00
background cpu time 113.42
Statistic Value End Value
NUM_LCPUS 0
NUM_VCPUS 0
AVG_BUSY_TIME 12,339
AVG_IDLE_TIME 348,838
AVG_IOWAIT_TIME 221
AVG_SYS_TIME 2,274
AVG_USER_TIME 9,944
BUSY_TIME 299,090
IDLE_TIME 8,375,051
IOWAIT_TIME 6,820
SYS_TIME 57,512
USER_TIME 241,578
LOAD 1 2
OS_CPU_WAIT_TIME 312,200
PHYSICAL_MEMORY_BYTES 137,438,953,472
NUM_CPUS 24
NUM_CPU_CORES 12
GLOBAL_RECEIVE_SIZE_MAX 1,310,720
GLOBAL_SEND_SIZE_MAX 1,310,720
TCP_RECEIVE_SIZE_DEFAULT 16,384
TCP_RECEIVE_SIZE_MAX 9,223,372,036,854,775,807
TCP_RECEIVE_SIZE_MIN 4,096
TCP_SEND_SIZE_DEFAULT 16,384
TCP_SEND_SIZE_MAX 9,223,372,036,854,775,807
TCP_SEND_SIZE_MIN 4,096
Back to Wait Events Statistics
Back to Top
Operating System Statistics - Detail
Snap Time Load %busy %user %sys %idle %iowait
27-Nov 16:00:06 0.58
27-Nov 17:00:17 1.50 3.45 2.79 0.66 96.55 0.08
Back to Wait Events Statistics
Back to Top
Foreground Wait Class
* s - second, ms - millisecond - 1000th of a second
* ordered by wait time desc, waits desc
* %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
* Captured Time accounts for 95.7% of Total DB time 2,039.77 (s)
* Total FG Wait Time: 163.14 (s) DB CPU time: 1,789.38 (s)
Wait Class Waits %Time -outs Total Wait Time (s) Avg wait (ms) %DB time
DB CPU 1,789 87.72
User I/O 61,229 0 92 1 4.49
Other 102,743 40 31 0 1.50
Concurrency 3,169 10 24 7 1.16
Cluster 58,920 0 11 0 0.52
System I/O 45,407 0 6 0 0.29
Configuration 107 7 1 5 0.03
Commit 383 0 0 1 0.01
Network 15,275 0 0 0 0.00
Application 52 8 0 0 0.00
Back to Wait Events Statistics
Back to Top
Foreground Wait Events
* s - second, ms - millisecond - 1000th of a second
* Only events with Total Wait Time (s) >= .001 are shown
* ordered by wait time desc, waits desc (idle events last)
* %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Event Waits %Time -outs Total Wait Time (s) Avg wait (ms) Waits /txn % DB time
db file sequential read 27,531 0 50 2 18.93 2.45
db file scattered read 26,322 0 30 1 18.10 1.47
row cache lock 1,798 0 20 11 1.24 0.96
OJVM: Generic 36 42 15 421 0.02 0.74
db file parallel read 394 0 7 19 0.27 0.36
control file sequential read 22,248 0 6 0 15.30 0.28
reliable message 4,439 0 4 1 3.05 0.18
gc current grant busy 7,597 0 3 0 5.22 0.16
PX Deq: Slave Session Stats 2,661 0 3 1 1.83 0.16
DFS lock handle 3,208 0 3 1 2.21 0.16
direct path write temp 4,842 0 3 1 3.33 0.15
library cache load lock 39 0 3 72 0.03 0.14
gc cr multi block request 37,008 0 3 0 25.45 0.14
IPC send completion sync 5,451 0 2 0 3.75 0.10
gc cr block 2-way 4,669 0 2 0 3.21 0.09
enq: PS - contention 3,183 33 1 0 2.19 0.06
gc cr grant 2-way 5,151 0 1 0 3.54 0.06
direct path read temp 1,722 0 1 1 1.18 0.05
gc current block 2-way 1,807 0 1 0 1.24 0.03
os thread startup 6 0 1 108 0.00 0.03
name-service call wait 12 0 1 47 0.01 0.03
PX Deq: Signal ACK RSG 2,046 50 0 0 1.41 0.02
log file switch completion 3 0 0 149 0.00 0.02
rdbms ipc reply 3,610 0 0 0 2.48 0.02
gc current grant 2-way 1,432 0 0 0 0.98 0.02
library cache pin 903 32 0 0 0.62 0.02
PX Deq: reap credit 35,815 100 0 0 24.63 0.01
log file sync 383 0 0 1 0.26 0.01
Disk file operations I/O 405 0 0 0 0.28 0.01
library cache lock 418 3 0 0 0.29 0.01
kfk: async disk IO 23,159 0 0 0 15.93 0.01
gc current block busy 4 0 0 35 0.00 0.01
gc current multi block request 1,206 0 0 0 0.83 0.01
ges message buffer allocation 38,526 0 0 0 26.50 0.00
enq: FB - contention 131 0 0 0 0.09 0.00
undo segment extension 8 100 0 6 0.01 0.00
CSS initialization 8 0 0 6 0.01 0.00
SQL*Net message to client 14,600 0 0 0 10.04 0.00
enq: HW - contention 96 0 0 0 0.07 0.00
CSS operation: action 8 0 0 4 0.01 0.00
gc cr block busy 33 0 0 1 0.02 0.00
latch free 30 0 0 1 0.02 0.00
enq: TM - contention 49 6 0 0 0.03 0.00
enq: JQ - contention 19 100 0 1 0.01 0.00
SQL*Net more data to client 666 0 0 0 0.46 0.00
asynch descriptor resize 3,179 100 0 0 2.19 0.00
latch: shared pool 3 0 0 3 0.00 0.00
CSS operation: query 24 0 0 0 0.02 0.00
PX Deq: Signal ACK EXT 72 0 0 0 0.05 0.00
KJC: Wait for msg sends to complete 269 0 0 0 0.19 0.00
latch: object queue header operation 4 0 0 1 0.00 0.00
gc cr block congested 5 0 0 0 0.00 0.00
utl_file I/O 11 0 0 0 0.01 0.00
enq: TO - contention 3 33 0 0 0.00 0.00
SQL*Net message from client 14,600 0 219,478 15033 10.04
jobq slave wait 7,726 100 3,856 499 5.31
PX Deq: Execution Msg 10,556 19 50 5 7.26
PX Deq: Execute Reply 2,946 31 27 9 2.03
PX Deq: Parse Reply 3,157 35 3 1 2.17
PX Deq: Join ACK 2,976 28 2 1 2.05
PX Deq Credit: send blkd 7 14 0 4 0.00
Back to Wait Events Statistics
Back to Top
Background Wait Events
* ordered by wait time desc, waits desc (idle events last)
* Only events with Total Wait Time (s) >= .001 are shown
* %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Event Waits %Time -outs Total Wait Time (s) Avg wait (ms) Waits /txn % bg time
os thread startup 140 0 13 90 0.10 10.35
db file parallel write 8,233 0 6 1 5.66 5.08
log file parallel write 3,906 0 6 1 2.69 4.62
log file sequential read 350 0 5 16 0.24 4.49
control file sequential read 13,737 0 5 0 9.45 3.72
DFS lock handle 2,990 27 2 1 2.06 1.43
db file sequential read 921 0 2 2 0.63 1.39
SQL*Net break/reset to client 18 0 1 81 0.01 1.19
control file parallel write 2,455 0 1 1 1.69 1.12
ges lms sync during dynamic remastering and reconfig 24 100 1 50 0.02 0.98
library cache load lock 35 0 1 24 0.02 0.68
ASM file metadata operation 3,483 0 1 0 2.40 0.65
enq: CO - master slave det 1,203 100 1 0 0.83 0.46
kjbdrmcvtq lmon drm quiesce: ping completion 9 0 1 62 0.01 0.46
enq: WF - contention 11 0 0 35 0.01 0.31
CGS wait for IPC msg 32,702 100 0 0 22.49 0.19
gc object scan 28,788 100 0 0 19.80 0.15
row cache lock 535 0 0 0 0.37 0.14
library cache pin 370 55 0 0 0.25 0.12
ksxr poll remote instances 19,119 100 0 0 13.15 0.11
name-service call wait 6 0 0 19 0.00 0.10
gc current block 2-way 304 0 0 0 0.21 0.09
gc cr block 2-way 267 0 0 0 0.18 0.08
gc cr grant 2-way 355 0 0 0 0.24 0.08
ges LMON to get to FTDONE 3 100 0 24 0.00 0.06
enq: CF - contention 145 76 0 0 0.10 0.05
PX Deq: reap credit 8,842 100 0 0 6.08 0.05
reliable message 126 0 0 0 0.09 0.05
db file scattered read 19 0 0 3 0.01 0.05
library cache lock 162 1 0 0 0.11 0.04
latch: shared pool 2 0 0 27 0.00 0.04
Disk file operations I/O 504 0 0 0 0.35 0.04
gc current grant busy 148 0 0 0 0.10 0.04
gcs log flush sync 84 0 0 1 0.06 0.04
ges message buffer allocation 24,934 0 0 0 17.15 0.02
enq: CR - block range reuse ckpt 83 0 0 0 0.06 0.02
latch free 22 0 0 1 0.02 0.02
CSS operation: action 13 0 0 2 0.01 0.02
CSS initialization 4 0 0 6 0.00 0.02
direct path read 1 0 0 21 0.00 0.02
rdbms ipc reply 153 0 0 0 0.11 0.01
db file parallel read 2 0 0 8 0.00 0.01
direct path write 5 0 0 3 0.00 0.01
gc current multi block request 49 0 0 0 0.03 0.01
gc current block busy 5 0 0 2 0.00 0.01
enq: PS - contention 24 50 0 0 0.02 0.01
gc cr multi block request 54 0 0 0 0.04 0.01
ges generic event 1 100 0 10 0.00 0.01
gc current grant 2-way 35 0 0 0 0.02 0.01
kfk: async disk IO 183 0 0 0 0.13 0.01
Log archive I/O 3 0 0 2 0.00 0.01
gc buffer busy acquire 2 0 0 3 0.00 0.00
LGWR wait for redo copy 123 0 0 0 0.08 0.00
IPC send completion sync 18 0 0 0 0.01 0.00
enq: TA - contention 11 0 0 0 0.01 0.00
read by other session 2 0 0 2 0.00 0.00
enq: TM - contention 9 89 0 0 0.01 0.00
latch: ges resource hash list 135 0 0 0 0.09 0.00
PX Deq: Slave Session Stats 12 0 0 0 0.01 0.00
KJC: Wait for msg sends to complete 89 0 0 0 0.06 0.00
enq: TD - KTF dump entries 8 0 0 0 0.01 0.00
enq: US - contention 7 0 0 0 0.00 0.00
CSS operation: query 12 0 0 0 0.01 0.00
enq: TK - Auto Task Serialization 6 100 0 0 0.00 0.00
PX Deq: Signal ACK RSG 24 50 0 0 0.02 0.00
log file single write 6 0 0 0 0.00 0.00
enq: WL - contention 2 100 0 1 0.00 0.00
ADR block file read 13 0 0 0 0.01 0.00
ADR block file write 5 0 0 0 0.00 0.00
latch: object queue header operation 1 0 0 1 0.00 0.00
gc cr block busy 1 0 0 1 0.00 0.00
rdbms ipc message 103,276 67 126,259 1223 71.03
PX Idle Wait 6,467 67 12,719 1967 4.45
wait for unread message on broadcast channel 7,240 100 7,221 997 4.98
gcs remote message 218,809 84 7,213 33 150.49
DIAG idle wait 203,228 95 7,185 35 139.77
shared server idle wait 121 100 3,630 30000 0.08
ASM background timer 3,343 0 3,611 1080 2.30
Space Manager: slave idle wait 723 100 3,610 4993 0.50
heartbeat monitor sleep 722 100 3,610 5000 0.50
ges remote message 73,089 52 3,609 49 50.27
dispatcher timer 66 88 3,608 54660 0.05
pmon timer 1,474 82 3,607 2447 1.01
PING 1,487 19 3,607 2426 1.02
Streams AQ: qmn slave idle wait 125 0 3,594 28754 0.09
Streams AQ: qmn coordinator idle wait 250 50 3,594 14377 0.17
smon timer 18 50 3,505 194740 0.01
JOX Jit Process Sleep 73 100 976 13370 0.05
class slave wait 56 0 605 10806 0.04
KSV master wait 2,215 98 1 0 1.52
SQL*Net message from client 109 0 0 2 0.07
PX Deq: Parse Reply 27 44 0 1 0.02
PX Deq: Join ACK 30 40 0 1 0.02
PX Deq: Execute Reply 20 30 0 0 0.01
Streams AQ: RAC qmn coordinator idle wait 259 100 0 0 0.18
Back to Wait Events Statistics
Back to Top
Wait Event Histogram
* Units for Total Waits column: K is 1000, M is 1000000, G is 1000000000
* % of Waits: value of .0 indicates value was <.05%; value of null is truly 0
* % of Waits: column heading of <=1s is truly <1024ms, >1s is truly >=1024ms
* Ordered by Event (idle events last)
% of Waits
Event Total Waits <1ms <2ms <4ms <8ms <16ms <32ms <=1s >1s
ADR block file read 13 100.0
ADR block file write 5 100.0
ADR file lock 6 100.0
ARCH wait for archivelog lock 3 100.0
ASM file metadata operation 3483 99.6 .1 .1 .2
CGS wait for IPC msg 32.7K 100.0
CSS initialization 12 50.0 50.0
CSS operation: action 21 28.6 9.5 61.9
CSS operation: query 36 86.1 5.6 8.3
DFS lock handle 6198 98.6 1.2 .1 .1
Disk file operations I/O 909 95.7 3.6 .7
IPC send completion sync 5469 99.9 .1 .0 .0
KJC: Wait for msg sends to complete 313 100.0
LGWR wait for redo copy 122 100.0
Log archive I/O 3 66.7 33.3
OJVM: Generic 36 55.6 44.4
PX Deq: Signal ACK EXT 72 98.6 1.4
PX Deq: Signal ACK RSG 2070 99.7 .0 .1 .0 .1
PX Deq: Slave Session Stats 2673 99.7 .2 .1 .0
PX Deq: reap credit 44.7K 100.0
SQL*Net break/reset to client 20 95.0 5.0
SQL*Net message to client 14.7K 100.0
SQL*Net more data from client 32 100.0
SQL*Net more data to client 689 100.0
asynch descriptor resize 3387 100.0
buffer busy waits 2 100.0
control file parallel write 2455 96.6 2.2 .6 .6 .1
control file sequential read 36K 99.4 .3 .1 .1 .1 .1 .0
db file parallel read 397 8.8 .8 5.5 12.6 17.4 46.3 8.6
db file parallel write 8233 85.4 10.3 2.3 1.4 .4 .1
db file scattered read 26.3K 79.2 1.5 8.2 10.5 .6 .1 .0
db file sequential read 28.4K 60.2 3.3 18.0 18.1 .3 .1 .0
db file single write 2 100.0
direct path read 2 50.0 50.0
direct path read temp 1722 95.8 2.8 .1 .5 .8 .1
direct path write 6 83.3 16.7
direct path write temp 4842 96.3 2.7 .5 .2 .0 .0 .2
enq: AF - task serialization 1 100.0
enq: CF - contention 145 99.3 .7
enq: CO - master slave det 1203 98.9 .8 .2
enq: CR - block range reuse ckpt 83 100.0
enq: DR - contention 2 100.0
enq: FB - contention 131 100.0
enq: HW - contention 97 100.0
enq: JQ - contention 19 89.5 10.5
enq: JS - job run lock - synchronize 3 100.0
enq: MD - contention 1 100.0
enq: MW - contention 2 100.0
enq: PS - contention 3207 99.5 .4 .1
enq: TA - contention 11 100.0
enq: TD - KTF dump entries 8 100.0
enq: TK - Auto Task Serialization 6 100.0
enq: TM - contention 58 100.0
enq: TO - contention 3 100.0
enq: TQ - DDL contention 1 100.0
enq: TS - contention 1 100.0
enq: UL - contention 1 100.0
enq: US - contention 7 100.0
enq: WF - contention 11 81.8 18.2
enq: WL - contention 2 50.0 50.0
gc buffer busy acquire 2 50.0 50.0
gc cr block 2-way 4934 99.9 .1 .0 .0
gc cr block busy 35 68.6 31.4
gc cr block congested 6 100.0
gc cr disk read 2 100.0
gc cr grant 2-way 4824 100.0 .0
gc cr grant congested 2 100.0
gc cr multi block request 37.1K 99.8 .2 .0 .0 .0 .0 .0
gc current block 2-way 2134 99.9 .0 .0
gc current block busy 7 14.3 14.3 14.3 28.6 28.6
gc current block congested 2 100.0
gc current grant 2-way 1337 99.9 .1
gc current grant busy 7123 99.2 .2 .2 .0 .0 .3 .1
gc current grant congested 2 100.0
gc current multi block request 1260 99.8 .2
gc object scan 28.8K 100.0
gcs log flush sync 65 95.4 3.1 1.5
ges LMON to get to FTDONE 3 100.0
ges generic event 1 100.0
ges inquiry response 2 100.0
ges lms sync during dynamic remastering and reconfig 24 16.7 29.2 54.2
ges message buffer allocation 63.1K 100.0
kfk: async disk IO 23.3K 100.0 .0 .0
kjbdrmcvtq lmon drm quiesce: ping completion 9 11.1 88.9
ksxr poll remote instances 19.1K 100.0
latch free 52 59.6 40.4
latch: call allocation 2 100.0
latch: gc element 1 100.0
latch: gcs resource hash 1 100.0
latch: ges resource hash list 135 100.0
latch: object queue header operation 5 40.0 40.0 20.0
latch: shared pool 5 40.0 20.0 20.0 20.0
library cache load lock 74 9.5 5.4 8.1 17.6 10.8 13.5 35.1
library cache lock 493 99.2 .4 .4
library cache pin 1186 98.4 .3 1.2 .1
library cache: mutex X 6 100.0
log file parallel write 3897 72.9 1.5 17.1 7.5 .6 .3 .1
log file sequential read 350 4.6 3.1 59.4 30.0 2.9
log file single write 6 100.0
log file switch completion 3 33.3 66.7
log file sync 385 90.4 3.6 4.7 .8 .5
name-service call wait 18 5.6 5.6 5.6 16.7 44.4 22.2
os thread startup 146 100.0
rdbms ipc reply 3763 99.7 .3
read by other session 2 50.0 50.0
reliable message 4565 99.7 .2 .0 .0 .1
row cache lock 2334 99.3 .2 .1 .1 .3
undo segment extension 8 50.0 37.5 12.5
utl_file I/O 11 100.0
ASM background timer 3343 57.0 .3 .1 .1 .1 21.1 21.4
DIAG idle wait 203.2K 3.4 .2 .4 18.0 41.4 14.8 21.8
JOX Jit Process Sleep 73 2.7 97.3
KSV master wait 2213 99.4 .1 .2 .3
PING 1487 81.0 19.0
PX Deq Credit: send blkd 7 57.1 14.3 14.3 14.3
PX Deq: Execute Reply 2966 59.8 .8 9.5 5.6 10.2 2.6 11.4
PX Deq: Execution Msg 10.6K 72.4 12.1 2.6 2.5 .1 5.6 4.6 .0
PX Deq: Join ACK 3006 77.9 22.1 .1
PX Deq: Parse Reply 3184 67.1 31.1 1.6 .2
PX Idle Wait 6466 .2 8.7 4.3 4.8 .3 .1 5.0 76.6
SQL*Net message from client 14.7K 72.4 2.8 .8 .5 .9 .4 2.8 19.3
Space Manager: slave idle wait 722 100.0
Streams AQ: RAC qmn coordinator idle wait 259 100.0
Streams AQ: qmn coordinator idle wait 250 50.0 50.0
Streams AQ: qmn slave idle wait 125 100.0
class slave wait 55 67.3 7.3 1.8 5.5 1.8 7.3 9.1
dispatcher timer 66 6.1 93.9
gcs remote message 218.6K 7.7 1.8 1.2 1.6 1.7 15.7 70.3
ges remote message 72.9K 29.7 5.1 2.7 2.2 1.5 4.0 54.7
heartbeat monitor sleep 722 100.0
jobq slave wait 7725 .1 .0 99.9
pmon timer 1474 18.4 81.6
rdbms ipc message 103.3K 20.7 2.7 1.5 1.3 .9 .7 40.7 31.6
shared server idle wait 121 100.0
smon timer 18 100.0
wait for unread message on broadcast channel 7238 .3 99.7
Back to Wait Events Statistics
Back to Top
Wait Event Histogram Detail (64 msec to 2 sec)
* Units for Total Waits column: K is 1000, M is 1000000, G is 1000000000
* Units for % of Total Waits: ms is milliseconds s is 1024 milliseconds (approximately 1 second)
* % of Total Waits: total waits for all wait classes, including Idle
* % of Total Waits: value of .0 indicates value was <.05%; value of null is truly 0
* Ordered by Event (only non-idle events are displayed)
% of Total Waits
Event Waits 64ms to 2s <32ms <64ms <1/8s <1/4s <1/2s <1s <2s >=2s
ASM file metadata operation 6 99.8 .1 .1
DFS lock handle 6 99.9 .1 .0
OJVM: Generic 16 55.6 2.8 41.7
PX Deq: Signal ACK RSG 3 99.9 .0 .1
PX Deq: Slave Session Stats 3 99.9 .0 .0 .0
SQL*Net break/reset to client 1 95.0 5.0
control file sequential read 1 100.0 .0
db file parallel read 34 91.4 8.6
db file scattered read 4 100.0 .0 .0
db file sequential read 6 100.0 .0 .0 .0
direct path write temp 11 99.8 .1 .1 .0
enq: WF - contention 2 81.8 18.2
gc cr block 2-way 1 100.0 .0
gc cr multi block request 1 100.0 .0
gc current block 2-way 1 100.0 .0
gc current block busy 2 71.4 28.6
gc current grant busy 8 99.9 .0 .1
ges lms sync during dynamic remastering and reconfig 13 45.8 20.8 33.3
kjbdrmcvtq lmon drm quiesce: ping completion 8 11.1 11.1 77.8
latch: shared pool 1 80.0 20.0
library cache load lock 26 64.9 14.9 12.2 4.1 4.1
log file parallel write 2 99.9 .0 .0
log file sequential read 10 97.1 2.0 .6 .3
log file switch completion 2 33.3 66.7
name-service call wait 4 77.8 22.2
os thread startup 146 100.0
reliable message 4 99.9 .0 .1
row cache lock 2 99.7 .0 .0 .3
Back to Wait Events Statistics
Back to Top
Wait Event Histogram Detail (4 sec to 2 min)
* Units for Total Waits column: K is 1000, M is 1000000, G is 1000000000
* Units for % of Total Waits: s is 1024 milliseconds (approximately 1 second) m is 64*1024 milliseconds (approximately 67 seconds or 1.1 minutes)
* % of Total Waits: total waits for all wait classes, including Idle
* % of Total Waits: value of .0 indicates value was <.05%; value of null is truly 0
* Ordered by Event (only non-idle events are displayed)
% of Total Waits
Event Waits 4s to 2m <2s <4s <8s <16s <32s < 1m < 2m >=2m
row cache lock 6 99.7 .3
Back to Wait Events Statistics
Back to Top
Wait Event Histogram Detail (4 min to 1 hr)
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Service Statistics
* ordered by DB Time
Service Name DB Time (s) DB CPU (s) Physical Reads (K) Logical Reads (K)
ubshost 1,934 1,744 445 73,633
SYS$USERS 105 45 1 404
SYS$BACKGROUND 0 0 1 128
ubshostXDB 0 0 0 0
Back to Wait Events Statistics
Back to Top
Service Wait Class Stats
* Wait Class info for services in the Service Statistics section.
* Total Waits and Time Waited displayed for the following wait classes: User I/O, Concurrency, Administrative, Network
* Time Waited (Wt Time) in seconds
Service Name User I/O Total Wts User I/O Wt Time Concurcy Total Wts Concurcy Wt Time Admin Total Wts Admin Wt Time Network Total Wts Network Wt Time
ubshost 60232 90 2644 4 0 0 13302 0
SYS$USERS 997 2 525 19 0 0 1973 0
SYS$BACKGROUND 1456 2 1258 14 0 0 0 0
I am not able to paste the whole awr report. I have paste some of the sections of awr report.
Please help.
Thanks and Regards, -
Hi,
We recently upgraded the oracle version from 9.07 to 9.08. Since the upgrade out application has been performing poorly. We spoke to the Oracle DBAs and they identified this to be a latch contention problem. They changed the cursor sharing from exact to similar. They even increased the buffer cache size. But we continue to have performance issues with the database.
Had anyone come across latch contention issues and how was it resolved? Is there is a bug in 9.08 version? Do we think of downgrading it back to 9.07?
Please suggest.Hi,
shared pool housekeeping is not as simple as you imagine it to be. It's not like at any given moment of time there is only one "correct" child cursor, the rest being subject to purging, it's much more complex, and the exact housekeeping algorithms are not accessible to us users. Plus, you only have several child curors; I once had over a hundred and raised a SR to that effect -- the customer support represebtatuve said that cursor sharing mechanisms in Oracle aren't perfect and unless one has thousands of child cursors one shouldn't be worried.
Best regards,
Nikolay -
Explain one query in 256M shared pool and ORA-4031 .
Hi,
looks like Oracle 9.2.0.8 got some problems with explaining huge (1000 lines) queries, here
goes ORA-4031 dump, shared pool is about 256 M but there are no other sessions in that DB only mine .
I can reproduce that in 1GB shared pool as well .
*** 2010-09-06 09:43:24.005
*** SESSION ID:(13.24) 2010-09-06 09:43:23.997
=================================
Begin 4031 Diagnostic Information
=================================
The following information assists Oracle in diagnosing
causes of ORA-4031 errors. This trace may be disabled
by setting the init.ora parameter _4031_dump_bitvec = 0
======================================
Allocation Request Summary Information
======================================
Current information setting: 00654fff
Dump Interval=300 seconds SGA Heap Dump Interval=3600 seconds
Last Dump Time=09/06/2010 09:43:22
Allocation request for: qknAllocate : qkn
Heap: 70000002aa6f4e8, size: 640
HEAP DUMP heap name="sga heap" desc=700000000000058
extent sz=0xfe0 alt=200 het=32767 rec=9 flg=-126 opc=0
parent=0 owner=0 nex=0 xsz=0x0
HEAP DUMP heap name="sql area" desc=70000002aa6f4e8
extent sz=0x1040 alt=32767 het=32 rec=0 flg=2 opc=2
parent=700000000000058 owner=0 nex=0 xsz=0x1
Subheap has 102506016 bytes of memory allocated
====================
Process State Object
====================
SO: 7000000222fe540, type: 2, owner: 0, flag: INIT/-/-/0x00
(process) Oracle pid=12, calls cur/top: 700000021736ba0/700000021736ba0, flag: (0) -
int error: 0, call error: 0, sess error: 0, txn error 0
(post info) last post received: 199 0 4
last post received-location: kslpsr
last process to post me: 7000000222fca88 1 6
last post sent: 0 0 16
last post sent-location: ksasnd
last process posted by me: 7000000222fca88 1 6
(latch info) wait_event=0 bits=0
Process Group: DEFAULT, pseudo proc: 7000000212e7290
O/S info: user: oracle, term: UNKNOWN, ospid: 6766752
OSD pid info: Unix process pid: 6766752, image: oracle@prod3 (TNS V1-V3)
=========================
User Session State Object
=========================
SO: 7000000226ee540, type: 4, owner: 7000000222fe540, flag: INIT/-/-/0x00
(session) trans: 0, creator: 7000000222fe540, flag: (100045) USR/- BSY/-/-/-/-/-
DID: 0001-000C-00000002, short-term DID: 0000-0000-00000000
txn branch: 0
oct: 50, prv: 0, sql: 70000002aa7fbf8, psql: 0, user: 2622/INSTALL
program: sqlplus.exe
application name: SQL*Plus, hash value=3669949024
last wait for 'db file sequential read' blocking sess=0x0 seq=93 wait_time=11432
file#=1, block#=106e8, blocks=1
temporary object counter: 0
=========================
Current Parent KGL Object
=========================
LIBRARY OBJECT HANDLE: handle=70000002aa7fbf8
name=
explain plan for
select *
from salda
where saldo <> 0
and konta in ('361','362','363','371','372','373','380','381','382','383','384','385','386','387','388','389','390','391','392','393',
'394','395','396','397','398','399','400','401','402','403','404','405','406','407','408','409','410','411','412','413',
hash=ff099bfd timestamp=09-06-2010 09:41:45
namespace=CRSR flags=RON/KGHP/TIM/PN0/[10010000]
kkkk-dddd-llll=0000-0001-0001 lock=N pin=X latch#=7
lwt=70000002aa7fc28[70000002aa7fc28,70000002aa7fc28] ltm=70000002aa7fc38[70000002aa7fc38,70000002aa7fc38]
pwt=70000002aa7fc58[70000002aa7fc58,70000002aa7fc58] ptm=70000002aa7fce8[70000002aa7fce8,70000002aa7fce8]
ref=70000002aa7fc08[70000002aa7fc08, 70000002aa7fc08] lnd=70000002aa7fd00[70000002aa7fd00,70000002aa7fd00]
LIBRARY OBJECT: object=70000002aa6fc98
type=CRSR flags=EXS[0001] pflags= [00] status=VALD load=0
CHILDREN: size=16
child# table reference handle
0 70000002aa6ff08 70000002aa6fbc0 70000002aa6f7a0
==================
Current KGL Object
==================
LIBRARY OBJECT HANDLE: handle=70000002aa6f7a0
namespace=CRSR flags=RON/KGHP/PN0/[10010000]
kkkk-dddd-llll=0000-0000-0000 lock=N pin=X latch#=7
lwt=70000002aa6f7d0[70000002aa6f7d0,70000002aa6f7d0] ltm=70000002aa6f7e0[70000002aa6f7e0,70000002aa6f7e0]
pwt=70000002aa6f800[70000002aa6f800,70000002aa6f800] ptm=70000002aa6f890[70000002aa6f890,70000002aa6f890]
ref=70000002aa6f7b0[70000002aa6fbc0, 70000002aa6fbc0] lnd=70000002aa6f8a8[70000002aa6f8a8,70000002aa6f8a8]
LIBRARY OBJECT: object=70000002aa6f3b8
type=CRSR flags=EXS[0001] pflags= [00] status=VALD load=0
===========================
Current Instatiation Object
===========================
INSTANTIATION OBJECT: object=1102fa2e0
type="cursor"[2] lock=70000002865ffe0 handle=70000002aa7fbf8 body=0 level=0
flags=FST[60] executions=0
cursor name:
explain plan for
select *
from salda
where saldo <> 0
and nr_konta in ('361','362','363','371','372','373','380','381','382','383','384','385','386','387','388','389','390','391','392','393',
'394','395','396','397','398','399','400','401','402','403','404','405','406','407','408','409','410','411','412','413',
'414','432','450','453','454','455','456','457','458','459','460','461','462','463','464','465','466','467','468','469',
'470','471','472','473','474','475','476','477','478','479','480','481')
and (
(umowa = lpad('2169725150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2170639147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2170815147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2170991138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2173034150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2173821138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2174491138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2176065138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2177180150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2178183150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2178609150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2180241147',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2180252147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2180377148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2180787148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2181011148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2183314150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2187754150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189036150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189362150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189685150',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2191061124',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2194768150',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2195063150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2195568150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2196774143',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2196872143',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2196964143',10) and nr_klasy = lpad('7',3)) or
.... a lot off similar lines
child pin: 0, child lock: 70000002865fb18, parent lock: 70000002865ffe0
xscflg: 4004, parent handle: 70000002aa7fbf8, xscfl2: 0
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
ksm_4031_dump+065c bl ksedst 110006450 ?
ksmasg+0084 bl ksm_4031_dump FFFFFFFFFFF5F60 ? 10299AAF8 ?
000000000 ? 70000002A9007F8 ?
000000000 ? 000000000 ?
kghnospc+0178 bl _ptrgl
kghalp+00f0 bl kghnospc FFFFFFFFFFF6150 ?
422222247FFFFFFC ?
100107620 ? 080000000 ?
000000000 ?
kksalc+0048 bl kghalp 100107620 ? 000000000 ?
FFFFFFFFFFF62C0 ? 000000000 ?
000000080 ? 000000003 ?
qknAllocate+0040 bl kksalc 70000002AC2E1C0 ?
70000002C873DD8 ?
70000002AC2E1C0 ?
qknltAllocate+00d0 bl qknAllocate FFFFFFFFFFF65C0 ?
7000000345292A0 ? 000000000 ?
000000003 ?
qkatab+0ec8 bl qknltAllocate 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
70000002C874170 ?
qkajoi+0b30 bl qkatab 000000000 ? 110378F00 ?
000000000 ? 000000042 ?
100002100050000 ? 110378530 ?
qkaqkn+08d0 bl qkajoi 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
qkadrv+07a0 bl qkaqkn 000000000 ? 10299B690 ?
===============================
Memory Utilization of Subpool 1
===============================
Allocation Name Size
"free memory " 148632616
"miscellaneous " 3998104
"qmps connections " 1454200
"errors " 0
"txncallback " 246640
"PL/SQL MPCODE " 506520
"enqueue " 6054632
"KSXR pending messages que" 853952
"KQR L PO " 221192
"parameters " 1064
"Checkpoint queue " 1026560
"1M buffer " 528384
"db_block_hash_buckets " 589824
"fixed allocation callback" 1112
"sim trace entries " 196608
"KGLS heap " 374728
"KGK heap " 552
"channel handle " 780672
"MTTR advisory " 34088
"DML lock " 1022032
"trigger source " 2288
"trigger defini " 280
"dictionary cache " 2137216
"table definiti " 456
"KQR X PO " 28352
"transaction " 2747760
"constraints " 824960
"library cache " 2030512
"message pool freequeue " 213264
"sql area " 1546168
"sessions " 4467008
"replication session stats" 1004720
"event statistics per sess" 18791304
"KQR S SO " 5632
"sim memory hea " 157768
"PL/SQL DIANA " 80104
"KQR M PO " 141320
"messages " 624000
===============================
Memory Utilization of Subpool 2
===============================
Allocation Name Size
"free memory " 6285488
"miscellaneous " 8927008
"log_buffer " 1056800
"FileOpenBlock " 16270720
"sim memory hea " 162008
"KQR S SO " 9472
"transaction " 3297312
"PL/SQL DIANA " 0
"KGLS heap " 47776
"table definiti " 0
"db_handles " 3480000
"KQR L PO " 213056
"Temporary Tables State Ob" 775488
"trigger inform " 0
"message pool freequeue " 558720
"trigger defini " 0
"fixed allocation callback" 1168
"branch " 1180120
"ktlbk state objects " 1948360
"PLS non-lib hp " 2088
"KGK heap " 6448
"KQR M SO " 1024
"dictionary cache " 2137216
"parameters " 0
"Checkpoint queue " 1026560
"trigger source " 0
"enqueue resources " 768192
"library cache " 1798152
"KSXR receive buffers " 1034000
"sql area " 105380864
"processes " 4104000
"sessions " 4469712
"joxs heap init " 4240
"errors " 0
"event statistics per sess" 18779936
"PL/SQL MPCODE " 0
"KQR M PO " 173592
"UNDO INFO SEGMENTED ARRAY" 649856
LIBRARY CACHE STATISTICS:
namespace gets hit ratio pins hit ratio reloads invalids
CRSR 3184 0.874 12550 0.950 97 11
TABL/PRCD/TYPE 1917 0.871 2293 0.811 0 0
BODY/TYBD 52 0.788 52 0.788 0 0
TRGR 33 0.939 33 0.939 0 0
INDX 74 0.514 43 0.140 0 0
CLST 353 0.977 489 0.980 0 0
OBJE 0 0.000 0 0.000 0 0
PIPE 0 0.000 0 0.000 0 0
LOB 0 0.000 0 0.000 0 0
DIR 0 0.000 0 0.000 0 0
QUEU 0 0.000 0 0.000 0 0
OBJG 0 0.000 0 0.000 0 0
PROP 0 0.000 0 0.000 0 0
JVSC 0 0.000 0 0.000 0 0
JVRE 0 0.000 0 0.000 0 0
ROBJ 0 0.000 0 0.000 0 0
REIP 0 0.000 0 0.000 0 0
CPOB 0 0.000 0 0.000 0 0
EVNT 8 0.750 91 0.978 0 0
SUMM 0 0.000 0 0.000 0 0
DIMN 0 0.000 0 0.000 0 0
CTX 0 0.000 0 0.000 0 0
OUTL 0 0.000 0 0.000 0 0
RULS 0 0.000 0 0.000 0 0
RMGR 0 0.000 0 0.000 0 0
IFSD 0 0.000 0 0.000 0 0
PPLN 0 0.000 0 0.000 0 0
PCLS 0 0.000 0 0.000 0 0
SUBS 0 0.000 0 0.000 0 0
LOCS 0 0.000 0 0.000 0 0
RMOB 0 0.000 0 0.000 0 0
RSMD 0 0.000 0 0.000 0 0
JVSD 0 0.000 0 0.000 0 0
ENPR 0 0.000 0 0.000 0 0
RELC 0 0.000 0 0.000 0 0
STREAM 0 0.000 0 0.000 0 0
APPLY 0 0.000 0 0.000 0 0
APPLY SOURCE 0 0.000 0 0.000 0 0
APPLY DESTN 0 0.000 0 0.000 0 0
TEST 0 0.000 0 0.000 0 0
CUMULATIVE 5621 0.874 15551 0.928 97 11
Permanent space allocted for Load Locks
LATCH:0 TOTAL SPACE: 4248
FREELIST CHUNK COUNT:59 OBJECT SIZE:72
Permanent space allocted for KGL pins
LATCH:0 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:13 OBJECT SIZE:128
LATCH:1 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:15 OBJECT SIZE:128
LATCH:2 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:18 OBJECT SIZE:128
LATCH:3 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:19 OBJECT SIZE:128
LATCH:4 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:21 OBJECT SIZE:128
LATCH:5 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:27 OBJECT SIZE:128
LATCH:6 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:16 OBJECT SIZE:128
Permanent space allocted for KGL locks
LATCH:0 TOTAL SPACE: 4216
FREELIST CHUNK COUNT:11 OBJECT SIZE:136
LATCH:1 TOTAL SPACE: 4216
FREELIST CHUNK COUNT:13 OBJECT SIZE:136
LATCH:2 TOTAL SPACE: 4216
FREELIST CHUNK COUNT:16 OBJECT SIZE:136
...<snipped>...any ideas ?GregG wrote:
Thanks,
but I'm interested in what is the particular problem. Looks like sql area is short on free chunks .I can't say if it is an oracle bug so feel free to ignore my post.
select *
from salda
where saldo 0
and nr_konta in ('361','362','363','371','372','373','380','381','382','383','384','385','386','387','388','389','390','391','392','393',
'394','395','396','397','398','399','400','401','402','403','404','405','406','407','408','409','410','411','412','413',
'414','432','450','453','454','455','456','457','458','459','460','461','462','463','464','465','466','467','468','469',
'470','471','472','473','474','475','476','477','478','479','480','481')
and (
(umowa = lpad('2169725150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2170639147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2170815147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2170991138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2173034150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2173821138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2174491138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2176065138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2177180150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2178183150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2178609150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2180241147',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2180252147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2180377148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2180787148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2181011148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2183314150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2187754150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189036150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189362150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189685150',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2191061124',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2194768150',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2195063150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2195568150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2196774143',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2196872143',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2196964143',10) and nr_klasy = lpad('7',3)) or
.... a lot off similar linesThis looks like an ideal candidate for using a Global Temporary table (if you can).
So if you can insert all combination of valid values for "umowa" and "nr_klasy" columns in a GTT,
you can simplify your query as
select *
from salda
where saldo 0
and nr_konta in ('361','362','363','371','372','373','380','381','382','383','384','385','386','387','388','389','390','391','392','393',
'394','395','396','397','398','399','400','401','402','403','404','405','406','407','408','409','410','411','412','413',
'414','432','450','453','454','455','456','457','458','459','460','461','462','463','464','465','466','467','468','469',
'470','471','472','473','474','475','476','477','478','479','480','481')
and (umowa, nr_klasy) in (select lpad(col1,10), lpad(col2,3) from gtt_temp) -
12c - limited space in shared pool
HI ,
I am creating a Container Database in 12C and dbca errors out with
Due to limited space in shared pool (need 6094848 bytes, have 4194112 bytes), limiting Resource Manager entities from 2048 to 32 LICENSE_MAX_SESSION = 0 LICENSE_SESSIONS_WARNING = 0 Initial number of CPU is 2 CELL communication is configured to use 0 interface(s): CELL IP affinity details: NUMA status: non-NUMA system cellaffinity.ora status: N/A CELL communication will use 1 IP group(s): Grp 0: Picked latch-free SCN scheme 3 Autotune of undo retention is turned on. IMODE=BR ILAT =51 LICENSE_MAX_USERS = 0 SYS auditing is disabled NOTE: remote asm mode is local (mode 0x1; from cluster type)
Due to limited space in shared pool (need 6094848 bytes, have 3981120 bytes), limiting Resource Manager entities from 2048 to 32
Due to limited space in shared pool (need 6094848 bytes, have 3981120 bytes), limiting Resource Manager entities from 2048 to 32
Due to limited space in shared pool (need 6094848 bytes, have 3981120 bytes), limiting Resource Manager entities from 2048 to 32
ORA-01501: CREATE DATABASE failed
ORA-01519: error while processing file '?/rdbms/admin/dcore.bsq' near line 1065
ORA-01519: error while processing file '?/rdbms/admin/dcore.bsq' near line 76
ORA-00604: error occurred at recursive SQL level 1
ORA-01119: error in creating database file '/oraceledata01/RND1/datafile/pdbseed/RND1_system_01.dbf'
ORA-27040: file create error, unable to create file
I am using RHEL 6 host
Thanks"ORA-27040: file create error, unable to create file" is pretty explicit. Either the path doesn't exist or permissions for the path don't exist.
Also, I suggest that you verify if the target path has enough disk space for the database you are creating.
What about the memory allocation you have specified ? Is it adequate ?
Hemant K Chitale -
Shared versus dedicated connections in the fragmentation of shared pool mem
Hi,
I have a old Oracle 8.1.7 database server.
I have a legacy application with no source code. This application don't use memory efficiently (no bind variables, etc.) , ie memory becomes fragmented.
I know that exists two ways to connect the database (dedicated and shared)
Based on this, I want to know which of the two options creates more fragmentation. I know that recommendation is to use dedicated connection, but I'm not sure if this is recomendation is applicable in this particular environment.
Thanks in advance.Whether you use shared or dedicated connections makes no difference for fragmentation in the shared pool. Whether your hard parse or do not hard parse does matter.
Measures you can take
- make sure often used packages like dbms_standard are pinned in the shared pool using a startup trigger
- set session_cached_cursors to 50 or 100. This will reduce parsing.
Sybrand Bakker
Senior Oracle DBA -
Hi,
Apologies for double posting!
I had posted this query to the SQL and PL/SQL forum last week.
Result cache latch contention: http://forums.oracle.com/forums/thread.jspa?threadID=1553667&tstart=0*
Posting it here again as I am trying to better understand the RC Latch behavior before using it in our production system.
Thanks!
Edited by: kedruwsky on Oct 10, 2010 9:32 PMsb92075 wrote:
Latches exist to manage potential contention.
What else do you not understand?
Since latches exist, they will used used regardless if you understand or not.That was profound!
Did you check the results of the 3 test cases that were executed to check how the RC Latch was used?
Results of the test cases show how many times the latch was acquired (per invocation and throughout the iterations).
I want to understand the why behind the results?
i.e. 2 latch GETS per request and acquire/release of the latch when there is a change in the request signature.
Also, result of test case 3 does not fit with the observations of test case 1 & 2.
Concurrent executions of the test cases have shown degraded performance.
Thus, I am not ready to implement this feature until I understand how it works and if there are any ways to reduce the contention. -
제품 : ORACLE SERVER
작성날짜 : 2003-08-26
SHARED POOL에 대한 점검 사항들
======================
PURPOSE
다음은 shared pool에 관련된 performance 에 대한 점검 사항들이다.
Explanation
1. literal SQL Statements
SELECT substr(sql_text,1,40) "SQL", count(*) ,
sum(executions) "TotExecs"
FROM v$sqlarea
WHERE executions < 5
GROUP BY substr(sql_text,1,40)
HAVING count(*) > 30
ORDER BY 2
shared SQL문들 중에서 literal SQL문들을 찾아내어 bind variable을
사용할 수 있는 경우 bind variable로 전환하도록 한다.
ORACLE cost based optimizer는 bind variable 보다 literal value를
사용하는 SQL에 대하여 보다 최적화된 execution plan을 결정하게 된다.
하지만 과도한 literal SQL문들을 사용하게 되면 hard parsing 이
빈번하게 되고 library cache와 dictionary cache의 사용율을 높이게 된다.
2. Library cahe hit ratio
SELECT to_char(trunc(sum(reloads)/sum(pins)*100, 5),99.99999)||
'%(less than 1%)' "Library Cache MISS RATIO"
FROM v$librarycache
만일 miss ratio가 1%보다 큰 경우 library cache miss를 줄이는 노력이
필요하다. 예를 들어 적절한 크기의 shared pool을 사용하거나 dynamic SQL
(literal SQL) 사용을 줄이도록 한다.
3. Checking hash chain lengths
SELECT hash_value, count(*)
FROM v$sqlarea
GROUP BY hash_value
HAVING count(*) > 5
위 query에 대한 결과가 없어야 한다. 만일 동일한 HASH_VALUE를 갖는
sql 수가 많다면 다음의 query를 이용하여 이 hach chain에 의하여 관리되는
sql 들을 확인하여 본다.
대부분 literal sql문들에 의하여 이런 문제가 발생하는 경우가 많다.
SELECT sql_text FROM v$sqlarea WHERE hash_value= <XXX>;
4. Checking for high version counts
SELECT address, hash_value,
version_count ,
users_opening ,
users_executing
sql_text
FROM v$sqlarea
WHERE version_count > 10
SQL의 version은 문장 상으로 완벽히 일치하지만 참조 object가 틀리는
SQL문들을 의미한다. 만일 이해할 수 없을 정도의 version count를 갖는
row가 있다면 한국 오라클 기술지원팀으로 문의하도록 한다.
5. Finding statement/s which use lots of shared pool memory
SELECT substr(sql_text,1,40) "Stmt", count(*),
sum(sharable_mem) "Mem",
sum(users_opening) "Open",
sum(executions) "Exec"
FROM v$sql
GROUP BY substr(sql_text,1,40)
HAVING sum(sharable_mem) > <MEMSIZE>
6. Allocations causing shared pool memory to be 'aged' out
SELECT *
FROM sys.x$ksmlru
WHERE ksmlrnum>0
x$ksmlru는 shared pool의 object에 대한 list로 object 할당 시 age out된
object 수에 정보를 담고 있어 age out으로 인한 응답율 저하나 latch
병합들의 원인을 추적하는 데 유용하다.
이 table은 8i부터 sys user로만 조회가 가능하며 한번 조회되면 reset된다.
(x$ksmlru.ksmlrnum : Number of items flushed from the shared pool)
Example
Reference Documents
------------------- -
Oracle RAC 10.2.0.3 increasing shared pool KQR L PO
Hi,
I've got ORA-04031 on my 4 node 10.2.0.3 Linux RAC.
The top 3 shared pool occupants are:
SQL> r
1 select * from (
2 select * from v$sgastat where pool = 'shared pool' order by 3 desc)
3 where
4* rownum <= 3
POOL NAME BYTES
shared pool KQR L PO 714319616
shared pool sql area 326563888
shared pool free memory 220592728Any idea what is KQR L PO responsible for ?
Regards.
GregHi,
CauseThe shared pool is stressed and memory need to be freed for the new cursors. As a consequence, the dictionary cache is reduced in size by the LCK process causing a temporal hang of the instance since the LCK can't do other activity during that time. Since the dictionary cache is a memory area protected clusterwide in RAC, the LCK is responsible to free it in collaboration with the dictionary cache users (the sessions using cursors referenced in the dictionary cache). This process can be time consuming when the dictionary cache is big.
Solutiona. reduce the stress on the shared pool
=> by increasing it above the automatically reached value with dynamic sga, e.g.
when sga_target is set to 16G and the shared_pool_size was 6G during the hang time, set it to e.g. 8G.
=> by reducing the number of big cursors entering the shared pool, e.g. cursors using more than 1M sharable_mem e.g. via binding
select sql_text from v$sqlarea where sharable_mem > 1M;
b. reduce the dictionary cache usage in order to reduce the size of the dictionary cache, e.g.
=> when dc_histogram_defs is too high, it can point towards histograms calculations on all columns
of the tables. histograms should only be calculated on indexed columns
=> when dc_segments is high compared to dc_object_ids, it can point towards excessive partitioning usage. Reducing the partitions/subpartition usage will help reduce the dictionary cache usage to manage it.
c. set enableshared_pool_durations = false to avoid that one duration (a memory area in the shared pool used for a specific usage) need to give all space required for that usage, i.e. in case the duration containing the dictionary cache need to free memory, then that duration is extra stressed since no other type of memory from other durations can be used. Setting it to false make that any type of memory can be used to free space (i.e. any type of memory in the subpool). As a consequence, the number of subpools will be reduced by the factor of the number of durations (4 in 10gR2). Hence tuning the kghdsidxcount is advisable, e.g. increasing it to have manageable subpool sizes (see note:396940.1).
d. check patch:8666117 has been applied. This patch speedup the processing to free memory
Best regards,
Rafi.
http://rafioracledba.blogspot.com/
Maybe you are looking for
-
Mail app stopped downloading attachments
All of a sudden I can't open pdf, doc, etc. attachments in my mail app on either my iphone or ipad. This only occurs in the Mail app. I downloaded the gmail app to get around this, but it's inconvenient. The mail app is so much better - when it works
-
Certification of Oracle Identity Manager 9.1.0.1
Hi, My query is: The Oracle Identity Manager version 9.1.0.1 is supported for: 1. Oracle WebLogic Server 11g (10.3.5) without Cluster ...? 2. Oracle Database 11g R2 (11.2.0.1) without RAC ...? 3. The latest versions of JRockit JDK and ...? thanks
-
ECC 6.0 Purchase Order Smartforms
Dear all, I know the standard PO smartform and print program are: Smartforms: /SMB40/MMPO_L Print Program: /SMB40/FM06P But i can't find them in my ECC 6.0 system. Any suggestion?? Regards, Kit
-
How do you get the Event folder date to match the media dates in FCPX
Modifying the clip date/time with the Modify command works fine ... but the Event itself still has the date the event was created, not the date of the media that it contains. If tried using Touch on the Event folder but FCPX ignores it. Any ideas on
-
How do I get a blank note to disappear and release my iBooks book?
I changed orientation before typing my note and can't change page, can't close book. Even after quitting iBooks with home button and restarting iBooks the book is still locked with the blank note displayed. When I changed orientation to landscape the