From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: Rik van Riel <riel@redhat.com>
Cc: Christoph Lameter <clameter@sgi.com>,
akpm@linux-foundation.org, linux-mm@kvack.org,
Nick Piggin <nickpiggin@yahoo.com.au>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
"Martin J. Bligh" <mbligh@mbligh.org>,
Larry Woodman <lwoodman@redhat.com>
Subject: Re: [RFC] Remove unswappable anonymous pages off the LRU
Date: Thu, 15 Feb 2007 18:20:58 -0500 [thread overview]
Message-ID: <1171581658.5114.76.camel@localhost> (raw)
In-Reply-To: <45D4E3B6.8050009@redhat.com>
On Thu, 2007-02-15 at 17:50 -0500, Rik van Riel wrote:
> Christoph Lameter wrote:
> > On Thu, 15 Feb 2007, Rik van Riel wrote:
> >
> >> Running out of swap is a temporary condition.
> >> You need to have some way for those pages to
> >> make it back onto the LRU list when swap
> >> becomes available.
> >
> > Yup any ideas how?
>
> Not really.
>
> >> For example, we could try to reclaim the swap
> >> space of every page that we scan on the active
> >> list - when swap space starts getting tight.
> >
> > Good idea.
>
> I suspect this will be a better approach. That way
> the least used pages can cycle into swap space, and
> the more used pages can be in RAM.
>
> The only reason pages are unswappable when we run
> out of swap is that we don't free up the swap space
> used by pages that are in memory.
Many large memory systems [e.g., 64G-128G x86_64] running large database
servers run with little [~2G] to no swap. Most of physical memory is
allocated to large shared memory areas which are never expected to swap
out [even tho' some db apps may not lock the shmem down :-(]. In these
systems, removing the shared memory pages from reclaim consideration may
alleviate some nasty lockups we've seen when one of these systems gets
pushed into reclaim because, e.g., someone ran a backup that filled the
page cache. We find all of the cpus walking the LRU list [millions of
pages] to find eligible reclaim candidates. [Almost] none of the shmem
pages are reclaimable because of insufficient swap, and we don't want
them swapped anyway.
Now one could argue that this is an application error, because it
doesn't lock the shared memory regions that it doesn't want swapped
anyway. This doesn't help the customers in the short term. They're
looking for a way to take control outside of the application and make
their needs known to the system. Needs like, never push out shmem [and
maybe even anon] memory to make room for page cache pages. This, I
believe, is the motivation behind the "limit the page cache"
patches/requests that we keep seeing.
An idea for handling these:
With the addition of Christoph's patch to move mlock()ed pages out of
the LRU, we could add a mechanism to automagically lock shared memory
regions that either exceed some tunable threshold or that exceed the
available amount of swap.
Larry Woodman at Red Hat has been experimenting with patches to move
shmem [and anon?] pages in excess of swap to a separate "wired list".
This has alleviated part of the problems [apparent system hangs]. There
are other issues, some that have been discussed on the mailing lists
recently, with page cache pages messing up the LRU-ness of the active
and inactive lists; vmscan not being proactive enough in keeping
available memory [limits too low for large systems]; etc. Those issues
are exacerbated by a long active list with a high fraction of
unreclaimable pages.
Lee
--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-02-15 23:20 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-15 21:05 [RFC] Remove unswappable anonymous pages off the LRU Christoph Lameter
2007-02-15 22:31 ` Rik van Riel
2007-02-15 22:41 ` Christoph Lameter
2007-02-15 22:50 ` Rik van Riel
2007-02-15 22:53 ` Christoph Lameter
2007-02-15 23:19 ` Andrew Morton
2007-02-15 23:20 ` Lee Schermerhorn [this message]
2007-02-16 0:15 ` Andrew Morton
2007-02-16 1:13 ` Andrew Morton
2007-02-16 1:24 ` KAMEZAWA Hiroyuki
2007-02-16 1:40 ` Martin Bligh
2007-02-16 1:49 ` Andrew Morton
2007-02-16 2:21 ` Martin Bligh
2007-02-16 2:34 ` Christoph Lameter
2007-02-16 2:48 ` Andrew Morton
2007-02-16 2:50 ` Christoph Lameter
2007-02-16 3:18 ` Andrew Morton
2007-02-16 3:36 ` Christoph Lameter
2007-02-16 3:42 ` Andrew Morton
2007-02-16 3:50 ` Christoph Lameter
2007-02-16 4:02 ` Andrew Morton
2007-02-16 4:07 ` Christoph Lameter
2007-02-16 4:03 ` Andrew Morton
2007-02-16 4:14 ` Rik van Riel
2007-02-16 4:15 ` Christoph Lameter
2007-02-16 4:57 ` KAMEZAWA Hiroyuki
2007-02-16 5:16 ` Andrew Morton
2007-02-16 5:25 ` Christoph Lameter
2007-02-16 5:41 ` Andrew Morton
2007-02-16 5:19 ` Christoph Lameter
2007-02-16 4:24 ` Andrew Morton
2007-02-16 8:15 ` Peter Zijlstra
2007-02-16 9:11 ` Rafael J. Wysocki
2007-02-16 9:19 ` Peter Zijlstra
2007-02-16 10:10 ` Christoph Lameter
2007-02-16 10:17 ` Peter Zijlstra
2007-02-16 11:04 ` Rafael J. Wysocki
2007-02-16 2:16 ` Christoph Lameter
2007-02-16 3:17 ` Martin Bligh
2007-02-16 3:29 ` Christoph Lameter
2007-02-16 8:10 ` Peter Zijlstra
2007-02-16 2:15 ` Christoph Lameter
2007-02-16 2:55 ` Christoph Lameter
2007-02-16 5:02 ` Christoph Lameter
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=1171581658.5114.76.camel@localhost \
--to=lee.schermerhorn@hp.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=lwoodman@redhat.com \
--cc=mbligh@mbligh.org \
--cc=nickpiggin@yahoo.com.au \
--cc=riel@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).