Subject: Re: page replacement
To: None <chuq@chuq.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 12/15/2005 22:21:00
> interesting... it looks like clrref=0 sometimes does better than clrref=1
> with the balancing stuff turned on.  so the interesting comparison would be
> clrref=0 with balancing on vs. clrref=1 with balancing off.

as ftp://ftp.netbsd.org/pub/NetBSD/misc/yamt/1/* and
ftp://ftp.netbsd.org/pub/NetBSD/misc/yamt/2/* were done on almost
the same environment.  you can compare them.

i made unified graphs and put them under
ftp://ftp.netbsd.org/pub/NetBSD/misc/yamt/3/.
("p8" is 1/* and "p10" is 2/*.)

> (I'd really like to get rid of the balancing stuff if we can,
> it's a horrible interface for tuning the system.)

i completely agree.

> yea.  so it would likely be even better to maintain more than 2 bits of
> access history info.  the current system has 4 states (the cross product
> of active vs. inactive and referenced vs. not), and clrref=1 reduces this
> to 3 states (active, inactive and referenced, inactive and not referenced).
> various people have previously played around with the idea of having more
> states that would reflect a page having reached the inactive-and-referenced
> state more than once.  this would give such often-referenced pages an even
> greater lifetime, with less interference from once-referenced pages.
> you might try to construct a framework that would allow for experimentation
> with different ways to use this additional access history information to
> give preference to old pages.

i'm not sure if having more state bits is a win.
extremely it ends up with LFU replacement, which is known to be very bad
for general purposes.

if i found some spare time, i'd re-evaluate fbsdbalance.diff which
i posted to this list some time ago.
its intent was exactly having more states.

YAMAMOTO Takashi