linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: linux@horizon.com
To: riel@conectiva.com.br
Subject: Heard about the 2Q algorithm?
Date: 8 Jun 2000 17:56:32 -0000	[thread overview]
Message-ID: <20000608175632.19821.qmail@science.horizon.com> (raw)

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/

             reply	other threads:[~2000-06-08 18:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-08 17:56 linux [this message]
2000-06-08 19:04 ` Stephen C. Tweedie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000608175632.19821.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=riel@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox