Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> LGWR writes
Greetings,
Last week we discussed about various issues related to LGWR and one of them was the debate over the 1/3rd full event writes. Although it has been re-verified that the code does indicate - MIN(1 Mb., log_buffer/3), the working of the 1/3 event is still in question.
After further detailed checking, discussing with the concerened individuals and performing some tests, here is what we have. Attached is the information.
Best Regards,
Gaja
I finally got a consensus on the copy latches as shown below. We do take out "a redo copy latch" to write the log buffer to the log file.
In versions prior to 8i, LGWR had to get and release all redo copy latches (in wait mode) to ensure no foreground processes were changing redo buffers it was about to write.
In 8i, it still has to check if any foreground processes are copying redo into buffers it wants to write, but it does it in the following way:
The code does show MIN - my mistake when I wrote the note to you. But I think that this one-third full does not work as advertised.
I created a 3 meg log buffer - note from the dump below that it is using 512 byte blocks so my redo buffer contains 6144 blocks. My logfiles are 6 meg in size. I set event 10046 level 12 for the LGWR process and looked for the number of blocks written at one time (this is wait event 'log file parallel write' and the number of blocks written is shown in p2) and found that it wrote anywhere from a few blocks up to 4133 (which is two thirds of the redo buffer) blocks at a time.
There were no commits in the test and there was significant redo generated within 3 sec intervals.
LOGFILE DUMP
Mon Dec 18 15:23:33 2000
ORACLE V8.1.6.0.0 - Production vsnsta=0
vsnsql=e vsnxtr=3
Windows NT Version 4.0 Service Pack 5, CPU type 586
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
Windows NT Version 4.0 Service Pack 5, CPU type 586
Instance name: d816
Redo thread mounted by this instance: 1
Oracle process number: 14
Windows thread id: 299, image: ORACLE.EXE
File Number=6, Blksiz=512, File Type=2 LOG <<--Note for Blksiz
descrip:"Thread 0001, Seq# 0000001266, SCN
0x000000234800-0xffffffffffff"
thread: 1 nab: 0xffffffff seq: 0x4f2 eot: 1 dis: 0
reset logs count: 0x1781bb48 Reset scn: 0x0000.00000001
Low scn: 0x0000.00234800 12/18/2000 15:22:53
Next scn: 0xffff.ffffffff 01/01/1988 00:00:00
END OF REDO DUMP
The following trace file on LGWR has been edited to remove all
idle-events such as rdbms ipc message.
TRACE FILE FOR LGWR USING EVENT 10046 LEVEL 12
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=2076 p3=2
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=16 p3=1
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=748 p3=1
WAIT #0: nam='latch free' ela= 0 p1=19827448 p2=74 p3=0
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=1329 p3=1
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=748 p3=1
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=1327 p3=2
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=750 p3=1
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=1318 p3=1
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=754 p3=1
...
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=364 p3=1
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=1718 p3=1
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=581 p3=1
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=1503 p3=2
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=1499 p3=1
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=4337 p3=3
Note the "wait for the redo copy latch" below when the system switched logfiles:
WAIT #0: nam='log file single write' ela= 0 p1=0 p2=1 p3=1 WAIT #0: nam='control file sequential read' ela= 0 p1=0 p2=7 p3=1
WAIT #0: nam='log file sequential read' ela= 0 p1=0 p2=1 p3=1 WAIT #0: nam='log file single write' ela= 0 p1=0 p2=1 p3=1 WAIT #0: nam='control file parallel write' ela= 0 p1=3 p2=3 p3=3
WAIT #0: nam='control file sequential read' ela= 0 p1=0 p2=85
p3=1
WAIT #0: nam='control file parallel write' ela= 0 p1=3 p2=3 p3=3
WAIT #0: nam='control file sequential read' ela= 0 p1=0 p2=6
p3=1
WAIT #0: nam='control file parallel write' ela= 0 p1=3 p2=3 p3=3
WAIT #0: nam='control file parallel write' ela= 0 p1=3 p2=3 p3=3
WAIT #0: nam='control file sequential read' ela= 0 p1=0 p2=8
p3=1
WAIT #0: nam='control file sequential read' ela= 0 p1=0 p2=23
p3=1
WAIT #0: nam='file identify' ela= 0 p1=0 p2=0 p3=0
WAIT #0: nam='file open' ela= 0 p1=0 p2=0 p3=0
WAIT #0: nam='LGWR wait for redo copy' ela= 0 p1=0 p2=0 p3=0
WAIT #0: nam='log file parallel write' ela= 0 p1=1 p2=326 p3=1
Author:Oracle Performance Tuning 101 by Osborne McGraw-Hill "Opinions and views expressed are my own and not of Quest" Received on Tue Dec 19 2000 - 00:03:38 CST
![]() |
![]() |