From owner-freebsd-questions@FreeBSD.ORG Fri Aug 17 17:29:05 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44EAE16A41A for ; Fri, 17 Aug 2007 17:29:05 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 3052713C478 for ; Fri, 17 Aug 2007 17:29:05 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from rot26.obsecurity.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id B39191A3C1A; Fri, 17 Aug 2007 10:27:28 -0700 (PDT) Received: by rot26.obsecurity.org (Postfix, from userid 1001) id 19A72C0EF; Fri, 17 Aug 2007 13:29:04 -0400 (EDT) Date: Fri, 17 Aug 2007 13:29:02 -0400 From: Kris Kennaway To: Andy Greenwood Message-ID: <20070817172901.GA29187@rot26.obsecurity.org> References: <098C8817-8D41-4D94-96E2-97D4310B0BAE@gmail.com> <20070817145551.GA27837@gizmo.acns.msu.edu> <46C5B9A2.3020305@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline In-Reply-To: <46C5B9A2.3020305@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: Jerry McAllister , Nicholas Wieland , freebsd-questions@freebsd.org Subject: Re: Swap size X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2007 17:29:05 -0000 --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--