Subject: making swap *smaller* than memory can be painful
To: None <current-users@netbsd.org>
From: George Michaelson <ggm@apnic.net>
List: current-users
Date: 01/27/2004 11:00:06
I decided the "2x memory for swap" rule probably didn't apply any more,
and made my system have 128mb swap for 256mb memory. Until today, that is.

last night, moving a 1.5Gb ghost image in via ssh, with some local folder
activity in email and a browser, I had ls processes crap out with:

Jan 26 18:50:00 dhcppc1 /netbsd: UVM: pid 1424 (ls), uid 101 killed:
	 out of swap

indeed top showed that the Swap utilization was extreme.

Is this a side-effect of the UVM? I assumed that it would 'know' there was
less swap space to back its buffer, and dtrt. (actually, killing the ls
probably WAS the right thing. better that, than the scp!)

I added a file in the fs, and did swapctl, so its now covered (I guess
that means doing a vnconfig and mapping it in via fstab at some stage too,
rather than a manual swapctl command)

I think 1:1 swap to memory may be a bit safer.

cheers
	-george