Continously changing data blocks [message #488613] |
Mon, 10 January 2011 04:13 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sekar52
Messages: 141 Registered: May 2010 Location: Mumbai
|
Senior Member |
|
|
Hi
If the data blocks in the buffer continously get updated such that they never reach the Least used list of LRU,then when will they be written to disk?
|
|
|
|
Re: Continously changing data blocks [message #488615 is a reply to message #488614] |
Mon, 10 January 2011 04:20 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sekar52
Messages: 141 Registered: May 2010 Location: Mumbai
|
Senior Member |
|
|
So when I use a 'ALTER SYSTEM CHECKPOINT' or checkpoint occurs after 3 seconds ,are all the dirty buffers are written to disk even if they are at the most recently used end of LRU???
|
|
|
|
|
Re: Continously changing data blocks [message #488618 is a reply to message #488616] |
Mon, 10 January 2011 04:28 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sekar52
Messages: 141 Registered: May 2010 Location: Mumbai
|
Senior Member |
|
|
so do u mean in 10g incremental checkpoint is followed????So a block may remain in cache say for 1 hour without being written to disk if it is continuosly updated(Only redo will be generated)??????
|
|
|
Re: Continously changing data blocks [message #488619 is a reply to message #488618] |
Mon, 10 January 2011 04:33 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68675 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
No, I didn't mean anything like that.
The main point is that there is NO relation between LRU list and checkpoint or flush onto disk.
There are many lists in buffer cache: LRU lists, dirty buffer lists, segment lists...
DBWR checkpoint uses dirty buffer kind list to flush out the buffers as it handles the modified buffers, NOT the LRU lists which handles the accessed (any kind of access including read only) buffers.
Regards
Michel
[Updated on: Mon, 10 January 2011 04:34] Report message to a moderator
|
|
|
|
|
|
|
Re: Continously changing data blocks [message #488627 is a reply to message #488624] |
Mon, 10 January 2011 04:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
knight
Messages: 111 Registered: January 2009
|
Senior Member |
|
|
LGWR should have flushed corresponding redo to disk,,,,this is the necessary and sufficient condition for DBWR to write.
and it does so whenever told by CKPT.
as you only pointed out
Quote:For the redo log to be used again ,should all the data blocks protected by the redo be flushed to disk(Even if they are updated)?/
"data blocks protected by redo"
|
|
|
|
Re: Continously changing data blocks [message #488665 is a reply to message #488613] |
Mon, 10 January 2011 07:30 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
knight
Messages: 111 Registered: January 2009
|
Senior Member |
|
|
when checkpoint occurs oracle updates all the datafiles,controlfiles to record the "checkpoint".
the DBWR is hence implicitly rushed ,to write,so as to match/catch-up upto this "checkpoint".
yea,CKPT does not actually "call" DBWR.
it does knowingly/unknowingly cause the DBWR to write.
please suggest if this understanging of mine is correct.
Quote:Sufficient but NOT necessary.
can you please elaborate
below does suggest that it is necessary
Quote:Before DBWn can write a modified buffer, all redo records associated with the changes to the buffer must be written to disk (the write-ahead protocol). If DBWn finds that some redo records have not been written, it signals LGWR to write the redo records to disk and waits for LGWR to complete writing the redo log buffer before it can write out the data buffers.
|
|
|
Re: Continously changing data blocks [message #488667 is a reply to message #488665] |
Mon, 10 January 2011 07:44 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68675 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Quote:when checkpoint occurs oracle updates all the datafiles,controlfiles to record the "checkpoint".
the DBWR is hence implicitly rushed ,to write,so as to match/catch-up upto this "checkpoint".
Checkpoint is executed by DBWR, you cannot say that the checkpoint "rushes" DBWR to write up to this checkpoint as this is DBWR that makes/generates/... the checkpoint. Then DBWR asks CKPT to write the current SCN as the checkpoint SCN into file headers and does it itself for the control file.
Quote:Quote:Sufficient but NOT necessary.
can you please elaborate
Checkpoints can occur in other circonstances than log switch, so log switch is not necessary to have a checkpoint.
(Note that I assume that you mean log switch when you say "LGWR should have flushed corresponding redo to disk" which is not the same and is obviously wrong (hopefully) that checkpoint occurs at each flush of log buffer into log file on disk.)
Quote:below does suggest that it is necessary
No, it explain another case.
You can have:
- log switch, LGWR call DBWR to make a checkpoint
- DBWR make a checkpoint (for instance based on time) and need some redo data to be flush, so call LGWR.
Regards
Michel
|
|
|
Re: Continously changing data blocks [message #488675 is a reply to message #488667] |
Mon, 10 January 2011 08:19 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
knight
Messages: 111 Registered: January 2009
|
Senior Member |
|
|
no,,,,i was never referring to a log switch !!!!
i was refering to LGWR writing from redo log buffer to online redo log files
-every 3 secs
-when buffer 1/3rd full
-when asked by DBWR
"before the data is written to disk by DBWR ,it is necessary that LGWR has written corresponding redo records from redo log buffer into online redo log files"
i guess we can conclude on that
and never suggested "checkpoint occurs at each flush of log buffer into log file on disk" !
Quote:you cannot say that the checkpoint "rushes" DBWR to write up to this checkpoint as this is DBWR that makes/generates/... the checkpoint
sorry,my bad,,,,
Quote:Then DBWR asks CKPT to write the current SCN as the checkpoint SCN into file headers and does it itself for the control file.
dbwr writes to controlfile??!!!!
|
|
|
|
|
|
|