* Re: VM balancing problems under 2.4.2-ac1
@ 2001-02-24 8:12 Benjamin Redelings I
2001-02-24 14:51 ` Rik van Riel
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Redelings I @ 2001-02-24 8:12 UTC (permalink / raw)
To: linux-kernel, linux-mm
Content-Type: text/plain; charset=big5
Content-Transfer-Encoding: 7bit
Rik van Riel wrote:
> In 2.4.1-pre<something> the kernel swaps out cache 32 times more
> agressively than it scans pages in processes. Until we find a way
> to auto-balance these things, expect them to be wrong for at least
> some workloads ;(
and elsewhere,
> That's because your problem requires a change to the
> balancing between swap_out() and refill_inactive_scan()
> in refill_inactive()...
Rik, can you explain why we still need to "balance" things, instead of
just swapping out the least used pages? Is this only a problem with the
2.4 implementation (e.g. will refill_inactive_scan eventually do
swap_out in 2.5, or something?), or is it a generic VM issue that has to
be solved?
I'm not quite sure what is going on, but is there perhaps some way that
we can get better information about recent use for pages? Or do we have
to treat age pages of different type differently based on their usage
pattern, which depends on the type of workload?
Regarding better information on recent page accesses, one thing that
seems strange to me is aging pages down to 0 before making them
inactive. In order to have the most amount of information in the page
ages, we don't want more than 1/PAGE_AGE_MAX pages to have the same
age. (Well, there are problems to that view, ) If we only consider
pages with age 0 to be inactive, then if we want a lot of inactive
pages, we make all those pages age zero. Instead, it seems like a good
thing to do, would be to have a variable "inactive_level", so that a
page is inactive if the age is less than inactive_level. If we want
more pages to be inactive, we increase inactive_level. I guess I can
thing of some problems for this approach, but maybe it can be rescued.
In any case, is there a file in /proc/ that displays the number of pages
at each age? It could be interesting to calculate Shannon Entropy from
this and see how many bits of information we get - a better entropy
could indicate a better aging algorithm. I guess "6" is the best we
could get right now.
Also, somebody posted a paper reference to linux-mm a few months ago,
about how the optimal page aging strategy aged pages according to how
rapidly referenced bits were being set. I guess the background page
aging tries to do something like this. I don't know how well it
succeeds though...
Thanks for any response/explanation!
-BenRI
--
"...assisted of course by pride, for we teach them to describe the
Creeping Death, as Good Sense, or Maturity, or Experience."
- "The Screwtape Letters"
Benjamin Redelings I <>< http://www.bol.ucla.edu/~bredelin/
--
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: VM balancing problems under 2.4.2-ac1
2001-02-24 8:12 VM balancing problems under 2.4.2-ac1 Benjamin Redelings I
@ 2001-02-24 14:51 ` Rik van Riel
0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2001-02-24 14:51 UTC (permalink / raw)
To: Benjamin Redelings I; +Cc: linux-kernel, linux-mm
On Sat, 24 Feb 2001, Benjamin Redelings I wrote:
> Rik van Riel wrote:
> > In 2.4.1-pre<something> the kernel swaps out cache 32 times more
> > agressively than it scans pages in processes. Until we find a way
> > to auto-balance these things, expect them to be wrong for at least
> > some workloads ;(
>
> and elsewhere,
>
> > That's because your problem requires a change to the
> > balancing between swap_out() and refill_inactive_scan()
> > in refill_inactive()...
>
> Rik, can you explain why we still need to "balance" things,
> instead of just swapping out the least used pages? Is this only
> a problem with the 2.4 implementation (e.g. will
> refill_inactive_scan eventually do swap_out in 2.5, or
> something?), or is it a generic VM issue that has to be solved?
The problem is that we scan processes by _virtual address_
and the cache by physical page. Furthermore, there are LOTS
of pages which are present in both the cache AND in processes.
Say, for example, that on a 64MB system you have 32MB cache but
half of that cache is cached executable text and swap cache (which
is also mapped into processes).
Now how would you adjust the scanning rate of processes and cache
to make sure we age each page in the system at approximately the
same rate ?
regards,
Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...
http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/
--
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:[~2001-02-24 14:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-24 8:12 VM balancing problems under 2.4.2-ac1 Benjamin Redelings I
2001-02-24 14:51 ` Rik van Riel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox