Subject: Re: making swap *smaller* than memory can be painful
To: None <roberto@redix.it>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: current-users
Date: 01/29/2004 20:15:27
On Thu, Jan 29, 2004 at 05:21:58PM +0100, roberto@redix.it wrote:
> 
> > On Tue, Jan 27, 2004 at 11:00:06AM +1000, George Michaelson wrote:
> >> 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.
> >
> > What did it report for memory ? especially the Exec, File and Free fields
> > ?
> > You may need to adjust some uvm parameters for your workload ...
> >
> 
> Like George, on my notebook I've configured swap at about 1/2 of actual
> RAM (only for space saving):
>  total RAM= 512 MB
>  swap 256 MB (instead of 1GB)
> 
> Please, could you explain to me the meanings of the memory fields you
> mention? how to interpret them?

"Exec" is the memory used by executable pages, "File" the memory used for the
buffer cache. Both can be reclaimed for other usage, so if a process gets
killed because the system is "out of swap" while a lot of memory is allocated
to one of these types, there's something which needs to be tuned, or something
broken in the VM system.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--