All of lore.kernel.org
 help / color / mirror / Atom feed
* VM balancing problems under 2.4.2-ac1
@ 2001-02-23 20:00 Adam Sampson
  2001-02-24  2:22 ` Rik van Riel
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Sampson @ 2001-02-23 20:00 UTC (permalink / raw)
  To: linux-kernel


Hiya.

The VM balancing updates in the recent ac kernels seem to have caused
some interesting performance problems on my desktop machine. I've got
160Mb of RAM, and 2.4.2-ac1 appears to be using excessively large
amounts of it for buffers and cache while pushing stuff out to
swap. This means that Mozilla, for instance, runs significantly worse
than under 2.4.0, since bits of it are being swapped in and out.

After the machine had been sitting for a while not doing very much:
   procs                      memory    swap          io     system
     cpu
 r  b  w   swpd   free   buff  cache  si  so    bi    bo   in   cs
us  sy  id
 1  0  0  97184   2116  12844 111768   5   6    15    11  154  791
29   4  67

After some heavy reiserfs disk IO (deleting lots of small files):
   procs                      memory    swap          io     system
     cpu
 r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs
us  sy  id
 1  0  0 102620   1796  85836  43880 100   0    25     0  190   587
12   3  85

-- 

Adam Sampson
azz@gnu.org

^ permalink raw reply	[flat|nested] 10+ messages in thread
* 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; 10+ 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] 10+ messages in thread

end of thread, other threads:[~2001-03-05  7:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-23 20:00 VM balancing problems under 2.4.2-ac1 Adam Sampson
2001-02-24  2:22 ` Rik van Riel
2001-02-24 10:33   ` Joseph Bueno
2001-02-24 14:37     ` Rik van Riel
2001-02-26 16:33   ` Mike Galbraith
2001-03-03  0:03   ` Adrian Bunk
2001-03-04 17:26     ` Ingo Oeser
2001-03-05  7:05       ` Mike Galbraith
  -- strict thread matches above, loose matches on Subject: below --
2001-02-24  8:12 Benjamin Redelings I
2001-02-24 14:51 ` Rik van Riel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.