From: Rik van Riel <H.H.vanRiel@phys.uu.nl>
To: Zlatko Calusic <Zlatko.Calusic@CARNet.hr>
Cc: "Stephen C. Tweedie" <sct@redhat.com>, Linux MM <linux-mm@kvack.org>
Subject: Re: [PATCH] swapin readahead
Date: Tue, 1 Dec 1998 19:32:52 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.3.96.981201192554.4046A-100000@mirkwood.dummy.home> (raw)
In-Reply-To: <87vhjvkccu.fsf@atlas.CARNet.hr>
On 1 Dec 1998, Zlatko Calusic wrote:
> Rik van Riel <H.H.vanRiel@phys.uu.nl> writes:
>
> > In my experience allocations aren't the big problem but
> > deallocations. I guess we lose some memory there :(
>
> Yes. something like that. Since nobody asked pages to swap in (we
> decided to swap them in) it looks like nobody frees them. :)
> So we should free them somewhere, probably.
I took the bet that shrink_mmap() would take care of that, but
aperrantly not always :(
> > > Also, looking at the patch source, it looks like the comment there is
> > > completely misleading, as the for() loop is not doing anything, at
> + read_swap_cache_async(SWP_ENTRY(SWP_TYPE(entry), offset),
> +0);
> + break;
> + } ^^^^^^
>
> Last break in the for() loop, exits the loop after the very first
> pass. Why don't you get get rid of the loop, then:
Whoops, this break was left there from a previous editing
round and is removed now. I completely oversaw that one,
I guess that means I should go over the code with a comb
now... :)
> I wish you luck with the swapin readahed. I'm also very interested
> in the impact it could made, since my tests revealed that swapping
> in adjacent pages from swap is quite common operation, so in some
> workloads it could be a big win (hogmem, for instance, would
> probably be much faster :)).
For the pure readahead cache system we'd only need a 10%
hit rate to increase performance twofold (Rogier Wolff and
I calculated this once on the transfer/seek ratio of disks).
Of course a 10% hit ratio means we swap out 90% of stuff
that'd otherwise stay in memory, so it's not a clear picture
at all.
We probably want to increase the readahead when we satisfy
more than 20% of all page faults (that involve a swap area)
from the cache and decrease it when we go below 10%.
Then, of course, we'd also need to weigh average over a minute
or 300 swapins, whichever takes longer. And we need to take
memory and I/O pressure into account so we don't fill up memory
and I/O bandwidth with useless work...
cheers,
Rik -- now completely used to dvorak kbd layout...
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
next prev parent reply other threads:[~1998-12-01 19:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-26 23:23 Rik van Riel
1998-12-01 15:13 ` Stephen C. Tweedie
1998-12-01 15:41 ` Rik van Riel
1998-12-01 15:51 ` Zlatko Calusic
1998-12-01 16:42 ` Rik van Riel
1998-12-01 17:20 ` Zlatko Calusic
1998-12-01 18:32 ` Rik van Riel [this message]
1998-12-02 17:35 ` Stephen C. Tweedie
1998-12-02 21:18 ` Zlatko Calusic
1998-12-03 5:25 ` Eric W. Biederman
1998-12-03 8:55 ` Zlatko Calusic
1998-12-03 15:39 ` Eric W. Biederman
1998-12-03 10:07 ` Rik van Riel
1998-12-02 17:33 ` Stephen C. Tweedie
1998-12-03 14:44 ` Rik van Riel
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=Pine.LNX.3.96.981201192554.4046A-100000@mirkwood.dummy.home \
--to=h.h.vanriel@phys.uu.nl \
--cc=Zlatko.Calusic@CARNet.hr \
--cc=linux-mm@kvack.org \
--cc=sct@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