From owner-freebsd-questions@FreeBSD.ORG Tue Jul 22 16:23:33 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB0EBFC5 for ; Tue, 22 Jul 2014 16:23:33 +0000 (UTC) Received: from a0i308.smtpcorp.com (a0i308.smtpcorp.com [216.22.15.140]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92C2F28C1 for ; Tue, 22 Jul 2014 16:23:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=a0_1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=JfnegKCLSI90+jaW16sn8Y3oQFHNtFNdvQGpM3RbPx0=; b=NiEChlrpr5/XsiEiLl1x0d96Z8PopvFA2WSY3OpurU2frXznsp+MNUlnEUfTYUw9ILxHtRQy9lD47l2P43LhO0HpipjR/61lXqmBNQ9tPJasszkRxrKvFQW0RN9hwDL9z7p52KNFqIByknQfCLfsLxBN8mbj61D50Z6rTV32QYY=; From: Daniel Corbe To: Arthur Chance Subject: Re: How much swap space for a 32 GB RAM system? References: <53CE8BB8.7030303@qeng-ho.org> Date: Tue, 22 Jul 2014 12:23:05 -0400 In-Reply-To: <53CE8BB8.7030303@qeng-ho.org> (Arthur Chance's message of "Tue, 22 Jul 2014 17:05:12 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Smtpcorp-Track: 1b9cqP4gfKuMm_.zoB8ehLy- 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 16:23:33 -0000 Arthur Chance writes: > 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? The rule of thumb is 1.5x physical RAM but that's an antiquated notion. With that much RAM in your system, you shouldn't ever need swap. But you want to build in a "I need to add more RAM to this system" buffer so that you don't run out of memory and crash your application if your size requirements happen to change. So here's what I do: 2GB of swap. Then I set my monitoring system to alert as soon as I get below 97% available swap space. 97% is a good number because some things will end up in swap no matter how you tune your system. Also make sure kern.ipc.shm_use_phys=1. -Daniel