First of all, thanks for your remarkable and valuable thoughts.
Could you please clear my doubts related to your respond.
"data blocks are not really kept in an LRU list"
So, canb we say DBAs are kept in an LRU list?
"they are managed by a touch count these days - but that touch count algorithm is very much like an LRU so you can think of it that way."
I thought touch count algorith works on LRU list?
"there are many lists, when a buffer cache block is empty"
Could you please elaborate above quote? As far as I know, there is two list in the buffer cache, one is write list and the other is LRU list?
January 15, 2014 - 8:29 pm UTC
DBAs (data block addresses) are just that - data block addresses. They are not something "kept in a list", they have a definition.
A database block is managed in a set of lists in the SGA. This list is managed using a touch count algorithm. It is not a true "LRU" list. HOWEVER, that said, a touch count process is very similar to a LRU process - so from a conceptual perspective - thinking of the buffer cache being managed as an LRU is convenient.
technically, it is not a LRU list, it is a list of blocks where the blocks are inserted in the mid-point and move out to the ends based on a touch count. However, when just talking about the buffer cache - it is very convenient to think in terms of an LRU from a concepts perspective, and it is more than sufficient for our understanding of how things work.
You are mincing terms. LRU is an "algorithm". touch count is an "algorithm". they are just processes, methods, ways, implementations to manage a cache: http://en.wikipedia.org/wiki/Cache_algorithms
... Could you please elaborate above quote? As far as I know, there is two list in
the buffer cache, one is write list and the other is LRU list? ...
there are lists of lists of lists of lists
there is a list of totally empty buffers
there is a dirty list of buffers
there is a list of the buffers in the cache
there are lists of blocks to be cleaned out on commit
there are lists of ......
a database block may be on more than one list. a list is just a list. There is way more than one list in the buffer cache.