Date: Sun, 20 Aug 2017 22:08:00 +0200 From: Stefan Esser <se@freebsd.org> To: Greg 'groggy' Lehey <grog@FreeBSD.org>, tech-lists <tech-lists@zyxst.net> Cc: freebsd-current@freebsd.org Subject: Re: swapfile query Message-ID: <5de1cb15-0147-e17b-d5f9-3feca87ec4ff@freebsd.org> In-Reply-To: <20170819233919.GD91313@eureka.lemis.com> References: <77fdd002-2873-eb67-c851-0127ae3141b6@zyxst.net> <20170819233919.GD91313@eureka.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Am 20.08.17 um 01:39 schrieb Greg 'groggy' Lehey: >> 3. should total swap be 1x 2x or some other multiple of RAM these days? > > It never needed to be. The only issue is that if you want processor > dumps, you once needed a swap partition (and not a swap file) at least > marginally larger than memory. With compressed dumps, that > requirement is relaxed, but I suspect that a 4 GB partition could be > too small. Well, no, it (2x RAM) used to be needed at a time ... ;-) The VAX supported paging, but did not use a multi-level page table as most CPUs do today. There was a linear list of page addresses per process, and new page allocations could lead to a situation, where there was no free space in this list. This required a kind of garbage collection run, which was implemented by swapping out all processes and starting with a clean state. This required 2 times RAM configured as swap, to prevent a dead-lock (when a new page needed to be allocated to complete the swap-out). This MMU was used in at least all VAX 11-7xx, the µVAX 2 and µVAX 3 and thus in many of the machines used to run BSD back in the 80s ... And thus, swap of at least 2 times RAM used to be not just a best practice, but a strict requirement for stable operation of these machines. Regards, STefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5de1cb15-0147-e17b-d5f9-3feca87ec4ff>