Subject: Re: Any HD size limitations on boot disk?
To: NetBSD Bob <nbsdbob@weedcon1.cropsci.ncsu.edu>
From: David Brownlee <abs@netbsd.org>
List: port-pmax
Date: 01/10/2000 15:35:06
On Mon, 10 Jan 2000, NetBSD Bob wrote:
> Also, on swap partition sizes, my DS5000/200 has 96mb mem. I was a
> bit concerned about it trying to run over 200mb for a swap partition.
> What is the need of such a large swap partition if you have lots of
> memory. I thought the idea of the swap partition was to optimize
> speed on small memory systems? If you have lots of memory, you did
> not need so much swap. Can someone clarify that situation? The
> 5000/200 is basically a small ftp/boot/archive server in a low-traffic
> environment with few users (like mostly me only). It won't run X, or
> if it does, it will only be a minor usage. It may serve some minor
> web pages. Currently I am running a 32M swap on it, because of HD
> size constraints. If I load up some larger drives, that won't be
> any particular problem. But, I am curious about sizes vs needs in
> swap space.
>
I've just added a swap entry to the NetBSD FAQ:
On older unix systems it was recommended to have twice as much
swap space as RAM. This was because active pages in RAM had to
have pages allocated in swap, effectively limiting the total
virtual memory to the size of the swap space. On NetBSD this is
no longer true, so total virtual memory is approximately swap +
RAM.
Under NetBSD there are three primary uses for swap space:
+ Additional virtual memory - less active pages containing
modified data can be migrated to swap space allowing virtual
memory to be larger than physical memory.
+ An area for kernel core dumps - which is then read by
savecore(8), on boot. For this to work the primary swap
partition must be slightly larger than the total RAM.
+ For mfs(8) filesystems - classically mounted on /tmp in order
to speed up any programs using /tmp, by adding the following
to the fstab(5) file:
swap /tmp mfs rw,-ssize 0 0
where size is in 512byte blocks. The space required
is taken from the swap space as the filesystem is used.
The 'correct' value for swap is dependent on the usage of the
system, but a general rule might be the larger of RAM or 32MB.
Another good rule is to always try to split swap across as many
disk as possible to increase the available swap bandwidth.
David/absolute