Subject: Re: Recommended swap (from install notes)
To: Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu>
From: Greg Hudson <email@example.com>
Date: 08/11/1996 19:16:10
> Most of the ports' install notes recommend a swapspace of 2*ram.
> On a 4mb machine this would give <12Mb of virtual memory, which
> seems very tight.
> It's worth noting that I _do_ think that ~12M of virtual memory is
> not unreasonable for a 4M machine (remember, text pages don't count
> against that).
I'd like to point out that, assuming what people have told me is true,
you don't get 12MB of virtual memory out of that setup. Apart from
the fact that the kernel and any resident text pages come out of the
4MB of physical memory, once a swap page is allocated for a given vm
object, it's never deallocated until the object goes away. Therefore,
your safe VM size is only the amount of swap space you have allocated,
or 8MB. If at any point you have more than 8MB of pages that could
potentially be swapped out, you can run out of swap space as soon as
every such page is swapped out once. And we all know how gracefully
NetBSD deals with running out of swap space.
Of course, if all your processes are short-lived, you may be fairly
safe under the current scheme using a bit over 8MB of memory.
If the swap allocator could deallocate swap pages for resident pages
when you run out of swap space, your "safe" VM size could include a
significant chunk of physical memory even if you have long-running