From owner-freebsd-questions@FreeBSD.ORG Tue Jul 22 17:15:53 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 A444C797 for ; Tue, 22 Jul 2014 17:15:53 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 654372DDD for ; Tue, 22 Jul 2014 17:15:52 +0000 (UTC) Received: from r56.edvax.de (port-92-195-69-249.dynamic.qsc.de [92.195.69.249]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id A35942768F; Tue, 22 Jul 2014 19:15:49 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s6MHFmKC002835; Tue, 22 Jul 2014 19:15:49 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 22 Jul 2014 19:15:48 +0200 From: Polytropon To: Arthur Chance Subject: Re: How much swap space for a 32 GB RAM system? Message-Id: <20140722191548.e3945a1e.freebsd@edvax.de> In-Reply-To: <53CE8BB8.7030303@qeng-ho.org> References: <53CE8BB8.7030303@qeng-ho.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD-Questions 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:15:53 -0000 On Tue, 22 Jul 2014 17:05:12 +0100, 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? Need? Probably not, but you _never_ know... So preparing a file-backed swap could be a nice solution: you do not have to dedicate a fixed size partition for swap, and depending on your disk setup (maybe SSD?) the speed (_if_ it gets in use) will be good enough. In order to do this, you use dd to create a sparse file, configure it as a memory disk, and enable it with swapctl. The disk space will only be used if the swap actually is written to, so when it's not in use, no disk occupation will appear. However, the question of if you _need_ swap or not is not directly related to the amount of RAM installed, but to the programs you're running. Remember that a malicious program can easily fill 32 GB, and if that happens, the system will be happy about some swap to perform a halfway decent crash. ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...