Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Feb 2007 18:07:55 +1100
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Aloha Guy <alohaguy123@yahoo.com>
Cc:        Scott Long <scottl@samsco.org>, questions@freebsd.org, current@freebsd.org
Subject:   Re: swap file vs swap partition
Message-ID:  <20070205070755.GA818@turion.vk2pj.dyndns.org>
In-Reply-To: <20070204232439.2952.qmail@web53602.mail.yahoo.com>
References:  <20070204232439.2952.qmail@web53602.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Please wrap your lines and don't top-post.

On Sun, 2007-Feb-04 15:24:39 -0800, Aloha Guy wrote: What I actually
>meant was, I know in the old days, if you had 128MB, you want a 256MB
>swap but with 2GB RAM, isn't 4GB going to be overkill for a swap or
>are you saying that a 2GB swap will work?  I'm still lost on the
>ratio since I thought the 2x was only if you had like small amounts
>of RAM.

2:1 was a very old rule of thumb.  A better approach is to consider
your workload:  Your working set needs to fit in RAM and the total
virtual size needs to fit into RAM+swap.  If you tend to leave lots
of large processes lying around not doing anything, you might be
able to usefully use much more swap than if you religiously kill
processes that you aren't using - particularly if you don't have
massive amounts of RAM.  My desktop at work typically runs with
swap utilisation about twice RAM (but it only has ~160MB RAM).

Keep in mind that you can use multiple swap partitions so it can
be useful to have an active swap on each disk.  (The VM system
stripes across available swaps).

--=20
Peter Jeremy

--PEIAKu/WMn1b1Hv9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFFxtfL/opHv/APuIcRAjouAKCktxzjlKVzrRIGw2ts2vScGtRT8wCfRtY0
p0GhFoAy8LBmnfHFo38kSv8=
=9RXL
-----END PGP SIGNATURE-----

--PEIAKu/WMn1b1Hv9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070205070755.GA818>