linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Heard about the 2Q algorithm?
@ 2000-06-08 17:56 linux
  2000-06-08 19:04 ` Stephen C. Tweedie
  0 siblings, 1 reply; 2+ messages in thread
From: linux @ 2000-06-08 17:56 UTC (permalink / raw)
  To: riel

That's a page-aging algorithm that claims better than LRU performance.

There are two tunable knobs.

You divide memory into two sections: a FIFO section and an LRU section.
Pages first loaded go into the FIFO section.  The size of this section is
one of the knobs.

Somewhere in the middle of the LRU section (exactly where is the second knob),
we start looking for additional accesses to the page.  If we get any, it
goes into the LRU section.  If not, it eventually gets pushed out of the
FIFO section.

A third knob that's available is to extend the FIFO queue "beyond memory"
into backing store.  Pages that have been pushed out but get referenced
can go straight into the LRU pool rather than taking another pass through
the FIFO.


The idea is that the FIFO absorbs sequential scans and filters out the
initial burst of accesses.  Only if access to the page is *prolonged*
do we consider it for longer-term cacheing.


I haven't implemented it, but the idea is fairly straightforward and makes
sense, and has a reasonable but not excessive number of tuning knobs to
play with.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Heard about the 2Q algorithm?
  2000-06-08 17:56 Heard about the 2Q algorithm? linux
@ 2000-06-08 19:04 ` Stephen C. Tweedie
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen C. Tweedie @ 2000-06-08 19:04 UTC (permalink / raw)
  To: linux; +Cc: riel, linux-mm

Hi,

On Thu, Jun 08, 2000 at 05:56:32PM -0000, linux@horizon.com wrote:
> 
> 
> The idea is that the FIFO absorbs sequential scans and filters out the
> initial burst of accesses.  Only if access to the page is *prolonged*
> do we consider it for longer-term cacheing.

Page aging does that.  The initial age of a page will be fairly low,
relative to pages which are constantly being accessed, and so will 
be evicted from the cache before they can accumulate a high age if we
have a sequential access pattern.

--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-06-08 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-08 17:56 Heard about the 2Q algorithm? linux
2000-06-08 19:04 ` Stephen C. Tweedie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox