Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2007 13:29:02 -0400
From:      Kris Kennaway <kris@obsecurity.org>
To:        Andy Greenwood <greenwood.andy@gmail.com>
Cc:        Jerry McAllister <jerrymc@msu.edu>, Nicholas Wieland <nicholas.wieland@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: Swap size
Message-ID:  <20070817172901.GA29187@rot26.obsecurity.org>
In-Reply-To: <46C5B9A2.3020305@gmail.com>
References:  <098C8817-8D41-4D94-96E2-97D4310B0BAE@gmail.com> <20070817145551.GA27837@gizmo.acns.msu.edu> <46C5B9A2.3020305@gmail.com>

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

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

On Fri, Aug 17, 2007 at 11:07:14AM -0400, Andy Greenwood wrote:

> My understanding was that you should estimate swap size based on the=20
> sizes of the programs which might be paged out. However, when I first=20
> set up my system, I didn't know this and created 1G swap slices (one on=
=20
> each disk) but I am not convinced that this was the best thing to do,=20
> since my system almost never uses a noticible percentage of the swap=20
> space. right now, I've got
>=20
> [andy@zeus fusefs-sshfs]$ swapinfo
> Device          1K-blocks     Used    Avail Capacity
> /dev/ad0s1b.eli   1048576     1148  1047428     0%
> /dev/ad1s1b.eli   1048576     1096  1047480     0%
> Total             2097152     2244  2094908     0%
>=20
> And the system is under normal load. This system has 1G of RAM. Is there=
=20
> any sense in having this much swap space when it's not being used?

swap is there to guard against overload conditions, not for normal
load.

If you are paging during normal operations your system performance
will be terrible, so you want to make sure you have enough RAM that
this does not happen.  However, when a transient load spike comes in,
would you prefer your system to slow down but keep working, or to kill
off all your processes?  Think of it as memory space insurance.

Kris

--M9NhX3UHpAaciwkO
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFGxdrZWry0BWjoQKURAtWmAJ4lvmN9XzDjwpMLSH5y6AqJQghVtwCgkWyg
KB6gdIVa2FJqoHcZL3k9xFA=
=jAWY
-----END PGP SIGNATURE-----

--M9NhX3UHpAaciwkO--



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