From: Andrea Arcangeli <andrea@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: piggin@cyberone.com.au, riel@redhat.com,
marcelo.tosatti@cyclades.com, j-nomura@ce.jp.nec.com,
linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: [2.4] heavy-load under swap space shortage
Date: Mon, 15 Mar 2004 22:55:32 +0100 [thread overview]
Message-ID: <20040315215532.GJ30940@dualathlon.random> (raw)
In-Reply-To: <20040315110240.24ae4bad.akpm@osdl.org>
On Mon, Mar 15, 2004 at 11:02:40AM -0800, Andrew Morton wrote:
> Andrea Arcangeli <andrea@suse.de> wrote:
> >
> > The effect is that you can do stuff like 'cvs up' and you will end up
> > caching just 1G instead of 2G. Or do I miss something? If I would own a
> > 2G box I would hate to be able to cache just 1 G (yeah, the cache is 2G
> > but half of that cache is pinned and it sits there with years old data,
> > so effectively you lose 50% of the ram in the box in terms of cache
> > utilization).
>
> Nope, we fill all zones with pagecache and once they've all reached
> pages_low we scan all zones in proportion to their size. So the
> probability of a page being scanned is independent of its zone.
>
> It took a bit of diddling, but it seems to work OK now. Here are the
> relevant bits of /proc/vmstat from a 1G machine, running 2.6.4-rc1-mm1 with
> 13 days uptime:
>
> pgalloc_high 65658111
> pgalloc_normal 384294820
> pgalloc_dma 617780
>
> pgrefill_high 5980273
> pgrefill_normal 11873490
> pgrefill_dma 69861
>
> pgsteal_high 2377905
> pgsteal_normal 10504356
> pgsteal_dma 4756
>
> pgscan_kswapd_high 3621882
> pgscan_kswapd_normal 15652593
> pgscan_kswapd_dma 99
>
> pgscan_direct_high 54120
> pgscan_direct_normal 162353
> pgscan_direct_dma 69377
>
> These are approximately balanced wrt the zone sizes, with a bias towards
> ZONE_NORMAL because of non-highmem allocations. It's not perfect, but we
> did fix a few things up after 2.6.4-rc1-mm1.
as far as you don't always start from the highmem zone (so you need a
per-classzone variable to keep track of the last zone scanned and to
start shrinking from zone-normal and zone-dma if needed), the above
should avoid the problem I mentioned for the 2G setup.
next prev parent reply other threads:[~2004-03-15 21:56 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-02 10:12 [2.4] heavy-load under swap space shortage j-nomura
2004-02-02 13:29 ` Hugh Dickins
2004-02-03 7:53 ` j-nomura
2004-02-03 17:19 ` Hugh Dickins
2004-02-04 11:40 ` j-nomura
2004-02-05 18:42 ` Hugh Dickins
2004-02-06 9:03 ` j-nomura
2004-03-10 10:57 ` j-nomura
2004-03-14 19:47 ` Marcelo Tosatti
2004-03-14 19:54 ` Rik van Riel
2004-03-14 20:15 ` Andrew Morton
[not found] ` <20040314230138.GV30940@dualathlon.random>
2004-03-14 23:22 ` Andrew Morton
2004-03-15 0:14 ` Andrea Arcangeli
2004-03-15 4:38 ` Nick Piggin
2004-03-15 11:49 ` Andrea Arcangeli
2004-03-15 13:23 ` Rik van Riel
2004-03-15 14:37 ` Nick Piggin
2004-03-15 14:50 ` Andrea Arcangeli
2004-03-15 18:35 ` Andrew Morton
2004-03-15 18:51 ` Andrea Arcangeli
2004-03-15 19:02 ` Andrew Morton
2004-03-15 21:55 ` Andrea Arcangeli [this message]
2004-03-15 22:05 ` Nick Piggin
2004-03-15 22:24 ` Andrea Arcangeli
2004-03-15 22:41 ` Nick Piggin
2004-03-15 22:44 ` Andrea Arcangeli
2004-03-15 22:41 ` Rik van Riel
2004-03-15 23:32 ` Andrea Arcangeli
2004-03-16 6:27 ` Nick Piggin
2004-03-16 7:25 ` Marcelo Tosatti
2004-03-16 6:31 ` Marcelo Tosatti
2004-03-16 13:47 ` Andrea Arcangeli
2004-03-16 16:59 ` Marcelo Tosatti
2004-11-22 15:01 ` Lazily add anonymous pages to LRU on v2.4? was " Marcelo Tosatti
2004-11-22 19:49 ` Andrea Arcangeli
2004-11-22 15:58 ` Marcelo Tosatti
2004-05-26 12:41 ` Marcelo Tosatti
2004-05-26 18:24 ` Marc-Christian Petersen
2004-05-27 11:16 ` Marcelo Tosatti
2004-05-26 19:06 ` Hugh Dickins
2004-05-26 22:23 ` Andrea Arcangeli
2004-05-28 2:55 ` j-nomura
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=20040315215532.GJ30940@dualathlon.random \
--to=andrea@suse.de \
--cc=akpm@osdl.org \
--cc=j-nomura@ce.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=piggin@cyberone.com.au \
--cc=riel@redhat.com \
--cc=torvalds@osdl.org \
/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 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.