Re: swapfile query

From: Stefan Esser <se_at_freebsd.org>
Date: Sun, 20 Aug 2017 22:08:00 +0200
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
Received on Sun Aug 20 2017 - 18:17:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:12 UTC