Tuning top wait events
hi,
why does the following wait event occurs.how to tune these wait events
control file parallel write and direct path load
With Regards
Boo
"control file parallel write" event occurs while the session is writing physical blocks to all control files.
This happens when:
* The session starts a control file transaction (to make sure that the control files
are up to date in case the session crashes before committing the control file
transaction)
* The session commits a transaction to a control file
* Changing a generic entry in the control file, the new value is being written to all
control files
The wait time is the time it takes to finish all writes to all control files
To reduce this wait event, you can decrease the number of your control files (if this number too high) or place your control files to faster disks.
"direct path load" event occurs when a session waits for completion of direct load operations to database files. For example, if you are using SQL*Loader direct path load operation or import dump file made in direct mode.
To reduce this wait event, you can also place your control files to faster disks.
Similar Messages
-
Oracle RAC 9i LMD library cache lock top wait event
We are experiencing the library cache lock as our top wait event. Even thought the box is currently idle, The Global Enqueue Service Daemon (LMD) is taking up CPU cycles. The background process is also logging to trace "skgxpdocon: warning outstanding accept handle count has reached new high water mark 245000".
Any help would be appreciated.
ThanksThere is a new patch for this - check out p4673610 on metalink. We have also experience the problem in 9.2.0.8.
-
Top Wait Events Query is needed
Hi,
I hope I'm asking this question in right place.
I need a script and its output should give me the top 5 wait events in last 1 hour for an instance.986330 wrote:
Hi,
I hope I'm asking this question in right place.
I need a script and its output should give me the top 5 wait events in last 1 hour for an instance.
which Top 5? Top number of Waits? Top Total time Waited? Top Avg Wait Time?
why don't you just run AWR report? -
hi,
We are using 11.2.0.3.0 on solaris 10 facing slow performance, following are the Wait Events in AWR report, need assistance to overcome it. Also if any specific document to analyze AWR report and to pin point the performance bottleneck.
Foreground Wait Events
Avg
%Time Total Wait
wait
Waits % DB
Event
Waits -outs Time (s)
(ms)
/txn time
direct path read
308,729
0
21,191
69
58.0 39.5
db file sequential read
208,754
0
3,742
18
39.2
7.0
cursor: pin S
19,541,899
0
2,561
0 3,668.5
4.8
Background Wait Events
Avg
%Time Total Wait
wait
Waits % bg
Event
Waits -outs Time (s)
(ms)
/txn time
log file parallel write
26,479
0
942
36
5.0 40.3
db file parallel write
216,823
0
809
4
40.7 34.6
control file sequential re
11,673
0
56
5
2.2
2.4
control file parallel writ
6,280
0
35
6
1.2
1.5
direct path read
534
0
26
49
0.1
1.1You need to identify if you are excessively running Parallel Query -- too many queries being parallelised and doing direct path reads bypassing the buffer cache.
In 11gR2, you might also find full table scans of large tables becoming direct path reads.
See this thread : https://forums.oracle.com/thread/2552571
Hemant K Chitale -
hi gurus,
3 node rac 10.2.0.4 serving a packaged application.
Top 5 timed events in awr shown as
Event=CPU time
Waits=
Time(s)=1,950
Avg Wait(ms)
% Total Call Time=45.3
Wait Class
Event=gc cr multi block request
Waits= 6,551,055
Time(s)= 1,396
Avg Wait(ms)=0
% Total Call Time=38.9
Wait Class= Cluster
Event=db file scattered read
Waits= 186,295
Time(s)= 719
Avg Wait(ms)=4
% Total Call Time=18.2
Wait Class= User I/O
Event=db file parallel read
Waits= 43,383
Time(s)= 241
Avg Wait(ms)=6
% Total Call Time= 5.9
Wait Class= User I/O
Event= log file sync
Waits= 71,064
Time(s)= 83
Avg Wait(ms)=1
% Total Call Time= 3.1
Wait Class= Commit
db_block_size=8KB
db_file_multiblock_read_count = default setting of 128
question:
are the high wait values of gc cr multi block request and db file scattered read are due to db_file_multiblock_read_count?
if that's the case, is there a way to find optimum value for db_file_multiblock_read_count?
or any other findings please?
experts, appreciate your valuable help
thanks in advance,
charlesuser570138 wrote:
there are queries going for the full table scan with outer joins (milliion of records). those are the same sqls at the top of "sql order by cluster time"in awr with high CPU utilization.
any way to fine tune the instance to reduce the "gc cr multi block request"
apart from changing the code as the code belongs to a package based application please?
Do you have a performance problem ?
You are doing some large tablescans; these are (probably) the root cause of the gc cr multiblock read, the db file scattered reads, and the CPU, but if the queries are necessary and the execution paths are the best that can be done then maybe you just have to recognise that the resource you're using is reasonable for the queries you have to run.
Otherwise
<ul>
(a) can you find a more efficient access path for any of these queries
(b) can you make sure that all these queries run on the same node so that you get some benefit from node-affinity (possibly the object(s) will be remasted to that single node) and reduce the interconnect traffic.
</ul>
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
"Science is more than a body of knowledge; it is a way of thinking"
Carl Sagan -
I need some guidance on my AWR 5 top wait events
I have 10gR2 on Solaris 9.
The top 5 events in my AWR (ran hourly) always contain the following: (not necessary in order)
CPU time
control file parallel write
dbfile parallel write
log file parallel write
log file sync.
Is this an indication of an undersized log buffer ?
My value for log buffer is 14,258,176
I have 4 CPUs
I'd appreciate any helpHi!
I do have the same problem and trying to figure it out
Top 5 Timed Events Avg %Total
~~~~~~~~~~~~~~~~~~ wait Call
Event Waits Time (s) (ms) Time Wait Class
CPU time 932 71.3
reliable message 2,828 509 180 38.9 Other
control file parallel write 8,759 300 34 23.0 System I/O
db file parallel write 19,813 238 12 18.2 System I/O
control file sequential read 65,435 193 3 14.7 System I/O
share with me, your thoughts
Ravi -
How do I the interpret "Disk file operations I/O" wait event?
I have a large and very busy batch database. All of a sudden the "Disk file operations I/O" wait event is in the top 5 in AWR.
The manual page isn't very helpful:
http://download.oracle.com/docs/cd/E11882_01/server.112/e17110/waitevents003.htm#insertedID40
Disk file operations I/O
This event is used to wait for disk file operations (for example, open, close, seek, and resize). It is also used for miscellaneous I/O operations such as block dumps and password file accesses.
So here is my question: What exactly is going on when I see this wait event? Why doesn't it show up as one of the other I/O events? Can I make it go away? Should I make it go away?
DRsb92075 wrote:
All of a sudden the "Disk file operations I/O" wait event is in the top 5 in AWR.Top wait event
In EVERY Top Wait Event list, one wait event will ALWAYS be on top as #1; by definition of the list.
Simply because any item, even #1, appears on this list does not mean this is a problem & needs to be fixed.
If the Top Wait Event accounts for only 5 seconds out of a 1 hour sample,
then reducing it to ZERO won't measurably improve overall application performance.
The actual Time Waited is required to determine if it is a problem or not.It's taking 20% of time in a 15 minute sample. Anything that takes 20% of deserves to be understood....So: What actually causes it?
DR -
What is ges reusing os pid wait event
What is wait event "ges reusing os pid". In our RAC environment it is one of the top wait events. How to minimze it.
This is a wait event in Oracle 10g for Global Enqueue Services (ges) waiting on an operating system process id (os pid).
How to resolve this issue? I checked the bug list on Metalink and there is a patch set for the issue that may help.
Question: what version and patch release are you running for Oracle RAC?
Also, you probably want to tune your public network and private interconnects between the nodes in your Oracle RAC cluster.
Regards,
Ben Prusinski
http://oracle-magician.blogspot.com/ -
Hi,
I am facing wait event CXPACKET in top wait events. we are using SQL Server 2012. the DOP is set to 1.
Please suggest how to resolve this
REgardsHi,
I am facing wait event CXPACKET in top wait events. we are using SQL Server 2012. the DOP is set to 1.
Any reaosn why DOP is set to 1.Have you tested this scenario.Instaed of first moving for resolving CXPACKET wait which is not a acctual reason it is just a symptom .It happens when various parallel threads are waiting to synchronize after doing the
task.What is other major wait stats you can see.Can you paste output of below query here
--By Jnathan Kehayias
SELECT TOP 10
wait_type ,
max_wait_time_ms wait_time_ms ,
signal_wait_time_ms ,
wait_time_ms - signal_wait_time_ms AS resource_wait_time_ms ,
100.0 * wait_time_ms / SUM(wait_time_ms) OVER ( )
AS percent_total_waits ,
100.0 * signal_wait_time_ms / SUM(signal_wait_time_ms) OVER ( )
AS percent_total_signal_waits ,
100.0 * ( wait_time_ms - signal_wait_time_ms )
/ SUM(wait_time_ms) OVER ( ) AS percent_total_resource_waits
FROM sys.dm_os_wait_stats
WHERE wait_time_ms > 0 -- remove zero wait_time
AND wait_type NOT IN -- filter out additional irrelevant waits
( 'SLEEP_TASK', 'BROKER_TASK_STOP', 'BROKER_TO_FLUSH',
'SQLTRACE_BUFFER_FLUSH','CLR_AUTO_EVENT', 'CLR_MANUAL_EVENT',
'LAZYWRITER_SLEEP', 'SLEEP_SYSTEMTASK', 'SLEEP_BPOOL_FLUSH',
'BROKER_EVENTHANDLER', 'XE_DISPATCHER_WAIT', 'FT_IFTSHC_MUTEX',
'CHECKPOINT_QUEUE', 'FT_IFTS_SCHEDULER_IDLE_WAIT',
'BROKER_TRANSMITTER', 'FT_IFTSHC_MUTEX', 'KSOURCE_WAKEUP',
'LOGMGR_QUEUE', 'ONDEMAND_TASK_QUEUE',
'REQUEST_FOR_DEADLOCK_SEARCH', 'XE_TIMER_EVENT', 'BAD_PAGE_PROCESS',
'DBMIRROR_EVENTS_QUEUE', 'BROKER_RECEIVE_WAITFOR',
'PREEMPTIVE_OS_GETPROCADDRESS', 'PREEMPTIVE_OS_AUTHENTICATIONOPS',
'WAITFOR', 'DISPATCHER_QUEUE_SEMAPHORE', 'XE_DISPATCHER_JOIN',
'RESOURCE_QUEUE' )
ORDER BY wait_time_ms DESC
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Tuning row lock contention wait events
Hello everyone,
Working on 10g/windows
Top 5 events
EVENT TOTAL_WAITS TIME_WAITED AVG_MS PERCENT
CPU 9462339 48
enq: TX - row lock contention 12531 3660728 2921.34 18
control file parallel write 1300731 3088079 23.74 16
log file parallel write 1510503 1264080 8.37 6
log file sync 1072553 968007 9.03 5
Distribution of row lock wait during the last 4 days in the database server
END_INTERVAL_TIME TOTAL_WAITS TIME_WAITED_MICRO AVG_WAIT_MS
2008-04-01 16:00:58 909 2721008230 2993.41
2008-04-01 15:00:27 50 149941140 2998.82
2008-03-31 12:00:42 193 575595397 2982.36
2008-03-29 23:00:13 172 513058700 2982.9
2008-03-29 22:00:37 164 483940046 2950.85
2008-03-27 22:00:35 565 1667120838 2950.66
2008-03-26 18:00:59 348 1042918982 2996.89
My analysis:
It's obvious that the row lock contention wait time is huge, and this direct me to find out SQL stmt, causing this.
all the SQL statement was SELECT ....... FOR UPDATE stmt.
I was also able to find out locked tables.
My tuning idea:
1. I'm thinking to reorganize hot tables as well as their indexes, but by instinct it seems to not give so much value to avoid the huge row lock wait time.
2. I'm also seeing if I can reduce the number of rows per block, by increasing PCTFREE and diminishing PCTUSED, so the contention will spread over many blocks instead of one heavy block.
Question
As SQL stmt related to those locked tables are select ... for update, how could I tune this kind of stmt?
Does someone have other idea to come up with this row lock contention?
Tanks for your effort and helpTaking another look at your suggested function based index, it depends on the data type of the DEV.POS_FOLIO_ID.POS_FOLIO_ID column. If the column is defined as a number, and it is a primary key, there will already be a usable index on that column.
Yesterday, I wrote this: "Once I understood why or how the sessions were trying to insert duplicate primary key values, I would try to determine why the average number of seconds for the wait event is almost 3 seconds (maybe a timeout)."
After fixing the formatting of the top 5 wait events (total duration unknown):
EVENT TOTAL_WAITS TIME_WAITED AVG_MS PERCENT
CPU 94,623.39 48
enq: TX - row lock contention 12,531 36,607.28 2921.34 18
control file parallel write 1,300,731 30,880.79 23.74 16
log file parallel write 1,510,503 12,640.80 8.37 6
log file sync 1,072,553 9,680.07 9.03 512,531 * 3 second time out = 37,593 seconds = 10.44 hours.
What if the reason for the 3 second average wait time is due to a timeout. I performed a little experiment... I changed a row in a test table and then made a pot of coffee.
In session 1:
CREATE TABLE T1 (
C1 NUMBER(10),
C2 NUMBER(10),
PRIMARY KEY (C1));
INSERT INTO T1
SELECT
ROWNUM,
ROWNUM*10
FROM
DUAL
CONNECT BY
LEVEL<=1000000;
COMMIT;I now have a test table with 1,000,000 rows. I start monitoring the changes in the wait events roughly every 60 seconds, and V$SESSION_WAIT and V$LOCK roughly 4 times per second.
Back in session 1:
UPDATE
T1
SET
C1=-C1
WHERE
C1<=100;I have now modified the first 100 rows that were inserted into the table, time to make the pot of coffee.
In session 2, I try to insert a row with a primary key value of -10:
INSERT INTO T1 VALUES (
-10,
10);Session 2 hangs.
If I take the third 60 second snap of the system wide wait events as the zero point, and the 11th snap as the end point. There were 149 waits on ENQ: TX - ROW LOCK CONTENTION, 148 time outs, 446.62 seconds of total time in the wait event, with an average wait time of 2.997450 seconds.
Rolling down to the session level wait events, SID 208 (my session 2) had 149 waits on ENQ: TX - ROW LOCK CONTENTION, for a total time of 446.61 seconds with an average wait time of 2.997383 seconds. All of the 149 waits and the wait time was in this one session that was locked up for the full duration of this time period because session 1 was making a pot of coffee.
Rolling down to V$SESSION_WAIT (sampled roughly 4 times per second): At the start of the third time interval, SID 208 has been in the ENQ: TX - ROW LOCK CONTENTION wait event for 39 seconds and is actively waiting trying to execute SQL with a hash value of 1001532423, the wait object is -1, wait file is 0, wait block is 0, wait row is 0, P1 is 1415053316, P2 is 196646, P3 is 4754.
At the end of the 11th time interval: , SID 208 has been in the ENQ: TX - ROW LOCK CONTENTION wait event for 483 seconds and is actively waiting trying to execute SQL with a hash value of 1001532423, the wait object is -1, wait file is 0, wait block is 0, wait row is 0, P1 is 1415053316, P2 is 196646, P3 is 4754.
Rolling down to V$LOCK (sampled roughly 4 times per second): I see that SID 214 (session 1) is blocking SID 208 (session 2). SID 214 has a TX lock in mode 6 with ID1 of 196646 and ID2 of 4754. SID 208 is requesting a TX lock in mode 4 with ID1 of 196646 and ID2 of 4754.
So, it seems that I need a faster coffee pot rather than an additional index on my table. It could be that the above process would have found that the application associated with SID 214 was abandoned or crashed and for some reason the lock was not released for a long period of time, a little less than 10.44 hours in your case.
Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
Top 5 wait events in AWR Repprt
Hi,
The following is top 5 wait event in my AWR reports...
Whenever I take reports this are always top 5 events
Top 5 Timed Events
=============================================================================================================
Event
CPU time
Waits 4,717
% Total Call Time 62.0
log file sync
Waits 64,963
Time(s) 1,362
Avg Wait(ms) 21
% Total Call Time 17.9
Wait Class Commit
log file parallel write
Waits 63,485
Time(s) 1,004
Avg Wait(ms) 16
% Total Call Time 13.2
Wait Class System I/O
enq: TX - row lock contention
Waits 348
Time(s) 984
Avg Wait(ms) 2,828
% Total Call Time 12.9
Wait Class Application
db file parallel write
Waits 29,305
Time(s) 561
Avg Wait(ms) 19
% Total Call Time 7.4
Wait Class System I/O
------------------------------------------------------------------------------------------------------------Start with Performance Tuning Guide
10.2.3 Table of Wait Events and Potential Causes -
Can you please tell me how to find top 10 wait events
Hi
Can you please tell me how to find top 10 wait events and what actions need to be taken when there is a wait?
Thanks
Regards,
RJ.hi,
suggest you to use statspack !!!!!!! for the all tuning..else use the views
* v$session_event
* v$session_wait
* v$system_event
go through this for tuning tips
http://www.dba-oracle.com/art_dbazine_waits.htm
Thanks
--Raman -
Enq: TX - row lock contention in TOP 5 wait event
DB version:11.1.0.7.0
I am having enq: TX - row lock contention in top 5 wait event.
AWR analyze period - 9-10(pm). During this time only one sql loader is running to insert the data. No other job are running. So there is no chance of other session blocking this session. is there any chance of row lock contention happen by same session.
SQL> SELECT INDEX_NAME,INDEX_TYPE,UNIQUENESS FROM DBA_INDEXES WHERE TABLE_NAME='DATA_DATA';
INDEX_NAME INDEX_TYPE UNIQUENES
CIDX BITMAP NONUNIQUE
VIDX BITMAP NONUNIQUE
Thanks.SQL> SELECT INDEX_NAME,INDEX_TYPE,UNIQUENESS FROM DBA_INDEXES WHERE TABLE_NAME='DATA_DATA';
INDEX_NAME INDEX_TYPE UNIQUENES
CIDX BITMAP NONUNIQUE
VIDX BITMAP NONUNIQUEYou have bitmap indexes here on a table being inserted into. Bitmap Indexes are another source of lock(and deadlock) in OLTP application. You said that the SQLloader was the unique active program but may be you are also triggering another procedure after the load. Procedure in which you might be using also automomous transactions and so on...
Check first if your table is subject to DML operation in a a multi-user concurrent accesss and in which case you have to get rid of those bitmap indexes
http://hourim.wordpress.com/2011/03/14/deadlock-%e2%80%93-part-1-bitmap-index/
Best regards
Mohamed Houri
www.hourim.wordpress.com -
Dear Support,
I run the AWR report. It show the top 5 event is class slave wait 70second then follow by CPU time. May i know what is class slave wait event. Thanks
Regard
William10g is a marketing label not a version number.
SELECT * FROM v$version;Don't describe the AWR report part your are seeing ... Ctrl-C then Ctrl-V ... and post it between tags so we can read it. -
Hello SAP Community,
I start by mentioning a few details about the system I'll be talking about in this subject:
- SAP NetWeaver 7.0
- Oracle Database 10.2g
I was reading the following Note: "Note 618868 - FAQ: Oracle performance", in order to try to understand what's causing the oracle database to have slow performance.
While reading section 3 "How can I determine whether the general database performance can be optimized?" I found out that the ratio of "Busy wait time to CPU time" is away above the recommended 60:40 value. I'm getting a 94:6 ratio. This value was calculated using the query:
SELECT
ROUND((STM1.VALUE - STM2.VALUE) / 1000000) "BUSY WAIT TIME (S)",
ROUND(STM2.VALUE / 1000000) "CPU TIME (S)",
ROUND((STM1.VALUE - STM2.VALUE) / STM1.VALUE * 100) || ' : ' ||
ROUND(STM2.VALUE / STM1.VALUE * 100) RATIO
FROM V$SYS_TIME_MODEL STM1, V$SYS_TIME_MODEL STM2
WHERE STM1.STAT_NAME = 'DB time' AND STM2.STAT_NAME = 'DB CPU';
With such high values, SAP recommends to improve system performance doing some "wait event tuning".
Can someone give me some directions about this subject? Some guides specific to this subject would be nice. Any further information about my system you may require, please ask me.
Thanks in advance.
Best regards,
Daniel GarridoHello again,
Before I did any changes to the Oracle's parameters I checked the Note 619188 - FAQ: Oracle wait events, to understand what could be causing such high event wait time.
With the query:
SELECT EVENT, TOTAL_WAITS, TIME_WAITED, AVG_MS,
ROUND(RATIO_TO_REPORT(TIME_WAITED) OVER () * 100) PERCENT
FROM (SELECT SUBSTR(EVENT, 1, 30) EVENT, TOTAL_WAITS, TIME_WAITED,
ROUND(TIME_WAITED_MICRO / TOTAL_WAITS / 1000, 2) AVG_MS
FROM V$SYSTEM_EVENT
WHERE WAIT_CLASS NOT IN ('Idle', 'System I/O')
UNION
SELECT 'CPU' EVENT, NULL, VALUE, NULL
FROM V$SYSSTAT
WHERE STATISTIC# = 12
ORDER BY 3 DESC)
WHERE ROWNUM <=10;
I got the non-idle events that took more time in my system and the result was:
Result of the SELECT statement
EVENT
TOTAL_WAITS
TIME_WAITED
AVG_MS
PERCENT
log file switch (archiving nee
578.686
57.850.863
999.69
80
buffer busy waits
712.163
6.420.932
90.16
9
CPU
0
2.791.238
4
db file sequential read
4.005.546
1.746.442
4.36
2
log file sync
10.176.490
1.577.177
1.55
2
enq: TX - row lock contention
854.451
642.955
7.52
1
db file scattered read
1.055.533
621.332
5.89
1
enq: CF - contention
210.085
246.910
11.75
0
read by other session
561.558
119.910
2.14
0
log file switch completion
10.777
85.843
79.65
0
So most of the TIME_WAITED for wait events was because of the "log file switch (archiving needed)", after reading what could cause such wait event, I understood this was related with a problem I previously had in the server, where the archiving folder was with no space left. (Meanwhile the backup of the archives is being done and so the folder is being cleaned on a daily basis).
Thank you all for your help!
Maybe you are looking for
-
HP Color LaserJet CP1210 photoprints creating shadows
HP Color LaserJet CP1210 print I have a problem on the CP 1210. On the self test / configuration page the left hand 90 degree corner with the black dot on the inside corner is not regular compared to the same graphic on the right side of the page. A
-
With the release of Apple TV software 6.2 I tried updating the Apple TV. When I start the update the the progress bar underneath the picture of the AppleTV on the screen shows up and it says "estimating time remaining." But nothing changes. I waited
-
Vox usb2.0 tv box compatibility
Am thinking of buy a vox usb2.0 tv box. My PC only contains usb 1.1 interfaces. Does the usb2.0 tv box work properly with that interface or does it require usb2.0?
-
WHAT IS BEST STRATEGY FOR RMAN BACKUP CONFIGURATION
Hi all, my database size is 50GB I want TAKe WEEKLY FULL BACKUP AND INCREMENTAL BACKUP WITHOUT RECOVERY CATALOG.by follwing commands weekly full database backup run backup as compressed backupset incremental level=0 device type disk tag "weekly_datab
-
Call a number of servlets with the same session
Hi, for a purpose of performance testing I need to write a servlet that will call a number of servlets in a existing web application. It will measure a average execution time of each servlet. The sequence of servlet names and arguments is stored in a