From owner-freebsd-questions@FreeBSD.ORG Tue Jul 22 17:36:05 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3485BF3D for ; Tue, 22 Jul 2014 17:36:05 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3F032FC7 for ; Tue, 22 Jul 2014 17:36:04 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X9dyp-0004qY-2Y for freebsd-questions@freebsd.org; Tue, 22 Jul 2014 19:35:59 +0200 Received: from pool-173-79-82-127.washdc.fios.verizon.net ([173.79.82.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jul 2014 19:35:59 +0200 Received: from nightrecon by pool-173-79-82-127.washdc.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jul 2014 19:35:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Michael Powell Subject: Re: How much swap space for a 32 GB RAM system? Date: Tue, 22 Jul 2014 13:35:41 -0400 Lines: 38 Message-ID: References: <53CE8BB8.7030303@qeng-ho.org> <53CE8F62.8090701@tysdomain.com> Reply-To: nightrecon@hotmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-173-79-82-127.washdc.fios.verizon.net X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2014 17:36:05 -0000 Littlefield, Tyler wrote: > On 7/22/2014 12:05 PM, Arthur Chance wrote: >> I'm getting a new machine with 32 GB of memory. The old "twice >> physical memory" sizing seems ridiculous, so how big should I make >> swap? Do I even need swap with this much memory? >> > That number was always weird and never made much sense. What swap > ultimately comes down to though is you, the user. If you foresee needing > more than 32 gb ram, feel free to add more swap space. If you don't, > maybe 8 gb or so just to be on the safe side. If you really need 32 gb > swap space, I'd recommend just getting more ram, as that will be much, > much faster than thrashing. > HTH, The other consideration is crash dump. I run my servers without symbols, NO_PROFILE, and no kernel debugging stuff. Of course, should you actually run into a situation where you need to assist the devs troubleshooting you won't be able to do much. I use RELEASE branch(s), and only apply security updates so have an expected stability which I have seen in practice. From my viewpoint, if it works 100% when you initially setup a piece of hardware it will continue to work fine throughout the life cycle. Since I don't use such things (me sysadmin - not a coder) I'm not as knowledgeable, but I seem to recall that a crash dump needs a swap that is as large as physical memory. I think there is also a mini crash dump which does not. I would investigate the mini crash dump requirements to see if you can correlate some magic number from that - e.g., a box with 32G ram needs an 8G swap in order to do a mini crash dump kind of thing. At any rate having _some_ swap available is a Good Thing for a "just in case" scenario. It will buy you time to investigate and mitigate a runaway process. Other list members know more about this topic than I do, just wanted to point out the crash dump scenario. -Mike