Subject: Re: Minimum swap size
To: David Laight <email@example.com>
From: Sean Davis <firstname.lastname@example.org>
Date: 05/19/2003 04:35:44
On Mon, May 19, 2003 at 09:00:07AM +0100, David Laight wrote:
> (posting to tech-kern so the right people read it!)
> I'm looking at the install scripts, currently they default swap
> to 4 times systems RAM. This is a historical figure - I think based
> on the fact that big systems are likely to have more RAM.
> The actual figures are that you need enough swap to be able to
> run your workload, and enough RAM to stop it thrashing.
> However these days RAM is cheap, so it isn't unusual for someone
> to install netbsd on a system with over 1Gb of RAM even though
> the system will never have a working set anywhere near that big.
> Adding 4Gb of swap is getting silly for a single user desktop!
> Although disks are also cheap, it is quite possible that netbsd
> is sharing the disk with other OS (especially on i386).
> I was considering changing the default swap size to the larger of:
> - 1/10th the size of the disk/netbsd partition
> - the amount of RAM (so that you can dump to swap)
> - the smaller of 4 * RAM and 128MB
As far as dumping goes, my understanding is that we dump to the end of the
dumpdev, right? (so if dumping to swap, and we have 32MB of ram and 64MB of
swap, the dump will be written to the last 32MB) correct me if i'm wrong,
but if that is the case, then swap should (at least on systems with small
amounts of ram) be big enough so that the system can boot up and not
overwrite the dump if it ends up swapping during the boot process, because swap
is activated before savecore is run. Just my two cents.
> I was also considering making '/' at least 1/10th of the disk.
> That will give some space for /var and /tmp - I've had too much trouble
> with vi running out of space in /var/tmp when editing file of only a few
> 10's of MB...
I agree with this - our default for '/' seems too small, to me. Especially
if you let things accumulate in /var.
> The 1/10th is a random fraction - but sharing the space out a bit does
> seem sensible to me....
/~\ The ASCII
\ / Ribbon Campaign Sean Davis
X Against HTML aka dive
/ \ Email!