Subject: Minimum swap size
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 05/19/2003 09:00:07
(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

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...

The 1/10th is a random fraction - but sharing the space out a bit does
seem sensible to me....

	David

-- 
David Laight: david@l8s.co.uk