public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Egger <degger@fhm.edu>
To: Helge Hafting <helgehaf@aitel.hist.no>
Cc: linux-kernel@vger.kernel.org
Subject: Re: mmapping large files hits swap in 2.4?
Date: 12 Aug 2002 13:41:56 +0200	[thread overview]
Message-ID: <1029152517.27391.20.camel@sonja.de.interearth.com> (raw)
In-Reply-To: <3D577BC3.5BD0DE4@aitel.hist.no>

Am Mon, 2002-08-12 um 11.11 schrieb Helge Hafting:
 
> In short - memory used to cache your big mmapped file don't merely 
> compete with memory used for caching other parts of that file.
> It competes with all other swappable (or discardable) memory
> in the system, and some of that might go to the swap device.

That's what I though.

> Maybe you only need a little of that big file at a time - but
> the VM system cannot know that.  It simply looks at _all_
> memory, considers "what is recently used, and what is _not_"
> and goes on to swap/writeback the latter parts.

Actually I need 95% and the file will grow on demand so it's pretty
hefty in use; I really need to invent some hack to avoid touching
the memory as much as we do now without any need.

> You have enough RAM, but was all of it _free_ according to free?
> Lots of it will usually be in use as cache, so something must be
> evicted.  Cache are freed sometimes, swapping happens at
> other times.

Interestingly the behaviour seems to be quite different on PPC vs.
i386. On my PPC machine with 256 MB RAM I have constant use swap and
all of the "free" memory is used as cache. On a i386 maschine with
512MB RAM the kernel never touched a single byte of swap and around
150MB are always free. Both machines always have a load > 1 and are
used for big compile jobs like gcc, OpenOffice and alike.
 
-- 
Servus,
       Daniel


  reply	other threads:[~2002-08-12 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.33.0208101437380.838-100000@coffee.psychology.mcmaster.ca>
2002-08-10 22:19 ` mmapping large files hits swap in 2.4? Daniel Egger
2002-08-12  9:11   ` Helge Hafting
2002-08-12 11:41     ` Daniel Egger [this message]
2002-08-09 17:26 Daniel Egger
2002-08-10 12:12 ` Richard Zidlicky
2002-08-10 16:17   ` Daniel Egger
2002-08-10 23:13     ` Richard Zidlicky

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=1029152517.27391.20.camel@sonja.de.interearth.com \
    --to=degger@fhm.edu \
    --cc=helgehaf@aitel.hist.no \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox