From: ebiederm@xmission.com (Eric W. Biederman)
To: "Kevin Krieser" <kkrieser_list@footballmail.com>
Cc: "Linux Kernel List" <linux-kernel@vger.kernel.org>
Subject: Re: Swap size for a machine with 2GB of memory
Date: 20 Aug 2001 11:42:38 -0600 [thread overview]
Message-ID: <m1ofpamxv5.fsf@frodo.biederman.org> (raw)
In-Reply-To: <NDBBLFLJADKDMBPPNBALEEKBFCAA.kkrieser_list@footballmail.com>
In-Reply-To: <NDBBLFLJADKDMBPPNBALEEKBFCAA.kkrieser_list@footballmail.com>
"Kevin Krieser" <kkrieser_list@footballmail.com> writes:
> I was just experimenting on my personal Linux computer this weekend, which
> has 512MB of RAM and 700MB of swap. I also have an unpatched 2.4.8 kernel
> installed.
>
> I wrote a program that allocated 700MB of RAM and touched every page, then
> read it back in. When finished, there remained 250+ meg of swap in use, but
> no corresponding free space in RAM, compared to before running my test
> program. The expected behavior of the 2.4 kernels seemed to be followed,
> where many programs retained space in both RAM and swap.
This was even the behavior in 2.0, and 2.2. 2.4 can simply be more
aggressive about it. What this sounds like is that, your program
pushed 250MB of other programs into swap. The programs were the
reread into memory when it was done, and their location in swap was
remembered so that if they were ever pushed into swap again they could
just be dropped from memory, and not need to be written out.
As long as you don't have problems where you can't run your program
multiple times in a row, 2.4 sounds like is is behaving correctly and
sanely.
> However, since my normal behavior is for swap to not be used, I will wait a
> little bit for some of the VM updates to be tested.
Are you saying something is wrong?
> I don't have 2X RAM because when I installed my system, I only had 256MB of
> RAM.
This is not a requirement but is a requirement to have swap > mem if
you are swapping heavily and want good performance.
Eric
next prev parent reply other threads:[~2001-08-20 17:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-19 6:42 Swap size for a machine with 2GB of memory Eric S. Raymond
2001-08-19 8:25 ` Andrzej Krzysztofowicz
2001-08-19 9:46 ` Ignacio Vazquez-Abrams
2001-08-19 16:15 ` Ingo Oeser
2001-08-19 14:08 ` Alan Cox
2001-08-19 16:48 ` Eric S. Raymond
2001-08-19 14:39 ` Steven Cole
2001-08-19 17:29 ` Luigi Genoni
2001-08-19 15:52 ` Steven Cole
2001-08-19 22:16 ` Luigi Genoni
2001-08-19 20:49 ` Eric W. Biederman
2001-08-19 21:15 ` Eric S. Raymond
2001-08-20 0:05 ` Kevin Krieser
2001-08-20 17:42 ` Eric W. Biederman [this message]
2001-08-20 23:09 ` Kevin Krieser
-- strict thread matches above, loose matches on Subject: below --
2001-08-20 0:08 Andries.Brouwer
2001-08-21 23:14 ` Kurt Garloff
2001-08-24 12:45 ` Rogier Wolff
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=m1ofpamxv5.fsf@frodo.biederman.org \
--to=ebiederm@xmission.com \
--cc=kkrieser_list@footballmail.com \
--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