From owner-freebsd-questions@freebsd.org Mon Sep 10 09:08:35 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 701A51089358 for ; Mon, 10 Sep 2018 09:08:35 +0000 (UTC) (envelope-from phascolarctos@protonmail.ch) Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch [185.70.40.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.protonmail.ch", Issuer "QuoVadis Global SSL ICA G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07AB877404 for ; Mon, 10 Sep 2018 09:08:34 +0000 (UTC) (envelope-from phascolarctos@protonmail.ch) Date: Mon, 10 Sep 2018 09:08:20 +0000 To: FreeBSD Questions From: Lorenzo Salvadore Reply-To: Lorenzo Salvadore Subject: Re: swap config Message-ID: In-Reply-To: <20180910005743.3bf5df59@gumby.homeunix.com> References: <10538979.gLySxXtyIk@chameleon.friedrich.org> <20180910005743.3bf5df59@gumby.homeunix.com> Feedback-ID: X6az_D2smWSR8MT5MHqXnWF0upxehDyHia7Id1cbayHNBUkRu3CIeusDsZHiivIIjmaKB1_OofpALrRUYjNz3w==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.1 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.protonmail.ch X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2018 09:08:35 -0000 > I have 16GB or ram and 24GB of swap. I used swap for two reason. The > first is to mitigate any slow memory leaks, the second is to back tmpfs. > Neither of these rely on anything being particularly fast. Thanks for giving examples of why one might need such big swap space (well, big from my point of view). I will give an example why I use only ve= ry little swap to help OP decide which case is more similar to his situation. I deal with mathematical software which has to do very fast computations on huge amount of data. If this amount is less than the RAM available, then one of my computations can take 21 hours: this only depends on CPU speed and RAM access speed. If on the contrary the amount of data does not fit in RAM and swap is used, since those computations consist of loops involving all of the data for most of the time, the problem becomes impossibile do de= al with (I have not waited enough to know how much time would be needed, surely days, probably weeks and maybe even months). In such a situation, swap is definitely not an option: you must add RAM instead. And if you cannot add RAM, you must wait very long (and hope that you did not make any mistake in what you asked the computer to do!). I would be curious to know if you actually use the swap space you reserved: in particular, do you ever fill the whole 16 GB of RAM? Do you happen to us= e an application with slow memory leaks in it as far as you know? If yes, whi= ch one? Thanks.