Subject: Re: Out of swap
To: Rajnish Madan <rajnishm@delhi.tcs.co.in>
From: Kevin P. Neal <kpneal@pobox.com>
List: netbsd-help
Date: 02/19/2001 01:17:56
On Mon, Feb 19, 2001 at 09:40:11AM +0530, Rajnish Madan wrote:
>    Hi,
>    
>    I am trying to run a process which forks its child.
>    The number of childs forked are 40. I ran the system for
>    48 hrs.
>    
>    After that i noticed that certain childs got killed, throwing
>    "out of swap" error in the /var/log/messages.
>    
>    What could be the reason for this. Any pointers
>    to this will be very much appreciated.

NetBSD uses "virtual memory" to simulate having more memory than
is actually installed in the computer. The data that will not
fit into memory and is not currently being used this instant (or so)
gets saved out to disk into the "swap space". 

Use the "swapctl -l" command to see how much swap space is configured. 
If you need more swap space then you can add another disk with partition
"b"'s "fstype" set to "swap" (in the disklabel), and you would need to
add the new partition to the /etc/fstab file. 

See the man pages for swapctl, disklabel, and fstab. Also, I'd guess
that this would be covered in a FAQ online or an intro to Unix administration
book, although I'd don't have a reference handy (especially at this hour).
-- 
Kevin P. Neal                                http://www.pobox.com/~kpn/
      'Concerns about "rights" and "ownership" of domains are inappropriate.  
 It is appropriate to be concerned about "responsibilities" and "service" 
 to the community.' -- RFC 1591, page 4: March 1994