Re: Buffers and LRU.
Posted in 2004
Topics: General Discussion
Madison, the standard interpretation of LRU is Least Recently Used. The standard usage of such a queue is as follows: Each queue has an MRU (Most Recently Used) end and an LRU end. When a buffer is touched (either read or written) it is moved to the MRU end of the queue. When a new page has to be created or a page not in cache is needed to be read into the Buffer Cache the buffer at the LRU end of one of the clean LRU queues is overwritten with the new page. Over time buffers that are no longer needed will tend to migrate to the LRU end as buffers closed to that end are reused or accessed again. Other than terminology, and unless IDS is doing something different, your explanation is good. Art S. Kagel Madison Pruet wrote: > The buffer pool is the page cache of the engine. > > The LRUs are simply a means of chaining the buffers together. > > There are two chains per LRU - the free and the dirty. (Actually a free > buffer has a page in it, but it is not dirty.) > > There are multiple LRUs so that if a thread tries to access one of the > chains to find a free buffer and that chain is currently locked, then it > will try one of the other chains. So it is basically a means of creating a > hash array of the buffer pool so that the page access is partitioned. > > LRU stands for Last Recently Used. As a page is referenced, it is removed > from it's chain and placed at the head of the last recently used chain. > When a free buffer is needed, the tail buffer of an LRU is used. Therefor, > we tend to reuse a page buffer that is not being used a lot rather than a > page buffer that is highly referenced. This is a fairly common technique > used by most queue management systems for caching. > > > "T.K" <gp@tf.de> wrote in message news:bvrslu$67h$1@inews.gazeta.pl... > >>Hello. >> I'm beginner in use Informix. >> Where can I find what are the main difference between >> buffers and LRU queue. >> >> Thanks for your help >> >> T.K >> >> > > >
ok The terminology may not have been the best. Guess that comes with working with LRUs all the time and not trying to explain them. ;-) "Art S. Kagel" <kagel@erols.com> wrote in message news:4026B6A9.8060006@erols.com... > Madison, the standard interpretation of LRU is Least Recently Used. > The standard usage of such a queue is as follows: Each queue has an > MRU (Most Recently Used) end and an LRU end. When a buffer is touched > (either read or written) it is moved to the MRU end of the queue. > When a new page has to be created or a page not in cache is needed to > be read into the Buffer Cache the buffer at the LRU end of one of the > clean LRU queues is overwritten with the new page. Over time buffers > that are no longer needed will tend to migrate to the LRU end as > buffers closed to that end are reused or accessed again. > > Other than terminology, and unless IDS is doing something different, > your explanation is good. > > Art S. Kagel > > Madison Pruet wrote: > > > The buffer pool is the page cache of the engine. > > > > The LRUs are simply a means of chaining the buffers together. > > > > There are two chains per LRU - the free and the dirty. (Actually a free > > buffer has a page in it, but it is not dirty.) > > > > There are multiple LRUs so that if a thread tries to access one of the > > chains to find a free buffer and that chain is currently locked, then it > > will try one of the other chains. So it is basically a means of creating a > > hash array of the buffer pool so that the page access is partitioned. > > > > LRU stands for Last Recently Used. As a page is referenced, it is removed > > from it's chain and placed at the head of the last recently used chain. > > When a free buffer is needed, the tail buffer of an LRU is used. Therefor, > > we tend to reuse a page buffer that is not being used a lot rather than a > > page buffer that is highly referenced. This is a fairly common technique > > used by most queue management systems for caching. > > > > > > "T.K" <gp@tf.de> wrote in message news:bvrslu$67h$1@inews.gazeta.pl... > > > >>Hello. > >> I'm beginner in use Informix. > >> Where can I find what are the main difference between > >> buffers and LRU queue. > >> > >> Thanks for your help > >> > >> T.K > >> > >> > > > > > > >