It is LRU or FIFO
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: It is LRU or FIFO

  1. #1
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322

    It is LRU or FIFO

    I have one serious doubt abt checkpointing and aging out of buffers from buffer cache for a very long time. Oracle books always say it is on LRU basis but it doesnt seem so to me.

    This is what Oracle book says:
    During the normal running of the database, buffers that get modified (dirty buffers) are added to end of the checkpoint queue. The checkpoint queue is a linked list of all dirty buffers, ordered by when they were first modified; therefore a dirty buffer is only listed once in the checkpoint queue. The first entry in the checkpoint queue is always the buffer that has been dirty for the longest time. Buffers are removed from the checkpoint queue after DBWn writes them to disk.
    Each record in the redo log is assigned a redo byte address (RBA). When a block is first modified it is entered in the checkpoint queue. The RBA of the redo record recording that change is also included. All buffers that were modified prior to the first buffer in the checkpoint queue will already have been written to the data files.
    Every three seconds the CKPT process records, in the control file, the RBA from the first entry in the checkpoint queue. In the event of instance failure this RBA will give the location in the redo logs at which to start recovery. This RBA is referred to as the checkpoint position. At a log switch the database will, in addition, update the checkpoint information in the header block of each data file. This log switch does not force a write of any data to the data files.


    This always suggests to me that the buffers are aged out on First In First Out basis. Isn't it?
    lucky

  2. #2
    Join Date
    Nov 2002
    Location
    Mooresville, NC
    Posts
    349
    That's LRU not FIFO. Why do u think it's FIFO?
    http://www.perf-engg.com
    A performance engineering forum

  3. #3
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322
    Because:
    The checkpoint queue is a linked list of all dirty buffers, ordered by when they were first modified; therefore a dirty buffer is only listed once in the checkpoint queue. The first entry in the checkpoint queue is always the buffer that has been dirty for the longest time.

    In this way, the buffer that get dirtied first will be the first one that will be aged out. N if this buffer is again modified, then irrespective of this fact, this buffer's position is not changed on checkpointing queue as a dirty buffer is listed only once in the checkpointing queue.

    This is wat Oracle's book content suggests to me..What do u think? How do u perceive it?
    Last edited by mahajanakhil198; 04-16-2009 at 04:04 AM.
    lucky

  4. #4
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322
    oops i got it now...i missed to take into account LRU list n thought it is only checkpointing queue that decides aging out factor....
    lucky

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width