Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: One for the Oracle Gods - db buffers questions
In article <35F7E46C.C7CC9BE1_at_sphinxcst.co.uk>,
chris adams <cadams_at_sphinxcst.co.uk> wrote:
> All,
>
> I've got a few questions about the db buffers cache :-
>
> What is a _db_block_hash_bucket and what's it comprised of?
> (Are they roups of db buffer blocks?)
This controls the number of hashed chain lists. I think the hashed chain lists are used as references to the LRU lists (Least Recently Used). Probably not something you really want to be screwing around with. I believe you are close in noting that they are groups of buffer blocks.
> When do rollback block buffers get written to the rollback segment(s)
> and who's responsibility is it to do this?
> (DBWR?)
As with all the buffers in the buffer cache, rbs block buffers are written to
disk at a database checkpoint by DBWR.
>
> Do data block buffers and rollback buffers both live on the LRU list?
> And do they both get stuck on the dirty blocks list?
Yes and yes.
>
> (Is it at this point that 'dirty' rollback buffers get written to the
> rollback segments?)
As mentioned above, the buffers are written to disk at a checkpoint.
> How does a user process check to see if a db block is in the buffered
> cache?
> (All I know is it uses some kind of hash calculation to find the
> (memory?) address of the buffer.)
As you noted, it uses some hashing mechanism which and searches the hash chained list to determine if the block is in memory.
The server process checks a list to see if the block is in memory.
> Also, how does a process work out if the buffer has been modified by
> another process or is clean?
> (Some kind of flag? Can we see these from any of the dynamic or X$
> tables?)
The block is marked as dirty, and eventually ends up on the dirty list of buffers. You are probably correct in assuming a flag is used. I think there are X$ tables that pertain to the dirtly lists. I believe the manuals from the Oracle Education Tuning class actually provides two X$ tables that can be queried when using the DB_BLOCK_LRU_STATISTICS and/or DB_BLOCK_LRU_EXTENDED_STATISTICS. You will need to refer to the docs on that, because I can't remember offhand.
> After modifying a block, how does a process find a free block in the
> redo buffers cache?
> (Is it a cylic list that gets flushed?)
Changes are written serially to the redo buffer cache. I think it only writes
blocks to the redo log buffer while in hot backup mode; however, I could be
wrong about this. The redo log buffer is flushed when one of the following
occur:
redo log buffer is 1/3 full
a commit is issued
every 3 seconds
> When checking the LRU list for free buffers, if it comes across a dirty
> one it will supposedly moves it to the dirty list.
> Does it actually move the block or just a pointer?
Yes, it moves the block to the dirty list, and I believe it is just changing the pointer from the LRU to the dirty list.
>
> Regards,
> Jason.
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Sat Sep 12 1998 - 00:00:00 CDT
![]() |
![]() |