Subject: How to add swap file -- Re: Network slowness
To: None <port-pmax@NetBSD.ORG>
From: Toru Nishimura <nisimura@is.aist-nara.ac.jp>
List: port-pmax
Date: 01/13/1998 09:54:47
In article<199801120425.XAA23727@ren.globecomm.net>
afritz@iname.com wrote

>> Sounds very odd.  I've been using NetBSD/pmax with my MAXINE since
>> 1996 Summer and never experienced such a trouble.  Are you definitely
>> sure about your network configuration?  How about other machines in
>> the same wire? 
>> 
> Does the X server work reliably on it?  The whole system acts quite odd
> whenever X is running.  
> 
>  [ ... your problem persists ... ]
>
> BTW, I haven't used a BSD machine in a while... How do you know how much
> swap space you gave yourself?  Is there a good way to temporarily add more
> without adding another drive?  I can't seem to get a perl compile through
> even a make depend without bsd reseting with a 'panic: vm_fork: no more
> kernel virtual memory' !!! I've got 24mb physical and however much swap
> sysinst set for me on a "standard /usr with X" install.  Is there no way to
> add temp swap files on a non-dedicated partition?  

How much did you reserve swap space?  MIPS architecture requires much
RAM than loosy CISC decendent.  NetBSD allows you to add swap space as
a large file by vnd(4) interface.  You have to understand swapctl(8) to
add swap space as a file.   Steps would be;
	
    1. make a large tempolary file;
	
	dd if=/dev/zero of=<YOUR_TEMP_SWAP> seek=10240 bs=1k count=8 

    This example reserves 10MB+ temporary space.

    2. add it as an addtional swap;
    
     	/sbin/swapctl -a -p 5 <YOUR_TEMP_SWAP>
	
    3. check to see it's done well;
    
    	/sbin/swapctl -l -k
	
    This should produce lines like;

	Device      1K-blocks     Used    Avail Capacity  Priority
	/dev/rz0b       37296        4    37292     0%    0
	/dev/??         10248        0    10248     0%    5
	Total           47544        4    47540     0%
	
    (I donno why /dev/?? is shown here)

FYI, my MAXINE has 40MB RAM and 36MB+ dedicated swap space and I
routinely use it for NetBSD kernel build with 4 parallel make (make -j 4).
It seldom uses swap space, and runs as CPU/RAM speed. 

Hope this info help you.

Tohru Nishimura
Nara Institute of Science and Technology