Subject: Re: Minimum swap size
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 05/19/2003 19:17:37
David Laight wrote:
> Although disks are also cheap, it is quite possible that netbsd
> is sharing the disk with other OS (especially on i386).
For big (modern?) systems:
> I was considering changing the default swap size to the larger of:
> - 1/10th the size of the disk/netbsd partition
This is way too large IMHO for modern systems. With 120+GB disks
available, I don't think the average user will want 12+G of swap.
Maybe 1/50th or 1/100th, modifiable by the following two values.
> - the amount of RAM (so that you can dump to swap)
> - the smaller of 4 * RAM and 128MB
These two seem more reasonable, although the last will be almost
moot on most modern systems.
For older, smaller systems:
> 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 think we'd want at least a minimum of say 64MB of swap for any system
that is low on RAM - gcc/g++ can be a pig. I've got 150MB of swap on a
8MB system here, 48MB wasn't enough to do a native build. I'd almost
say:
Maximum of:
- 2 * RAM
- 128MB
but possibly limited by total disk space (maybe _maximum_ of 1/10th disk
space).
> 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'm using 4GB / + 4GB /var + 2GB swap + 128MB mfs /tmp on an 80G disk
on a system with 512MB of RAM. This seems about right for me; lots
of spare space, but doesn't seem overly wasteful. For example, I
installed the linux openoffice not long ago. It's over 300MB including
dependancies, but my root fs is still only 40% full.
For the machine with 8MB of RAM, I'm using 400MB / + 400MB /var +
150MB swap across 3GB of disk.
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD Support and Service: http://www.wasabisystems.com/