*BSD News Article 92055


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news.sprintlink.net!news-peer.sprintlink.net!uunet!in3.uu.net!199.232.240.7!kayrad.ziplink.net!rtfm.ziplink.net!mi
From: mi@rtfm.ziplink.net (Mikhail Teterin)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Swap and Memory Problems
Date: 27 Mar 1997 04:08:40 GMT
Organization: Aldan at Newton Upper Falls
Lines: 69
Message-ID: <5hcrs8$vt0$1@kayrad.ziplink.net>
References: <3339BF91.167EB0E7@silas.cc.monash.edu.au>
Reply-To: mi@ALDAN.ziplink.net..remove-after-`net'
NNTP-Posting-Host: 199.232.255.52
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:37830

Honorable Chooka
      wrote on 27 Mar (in article <3339BF91.167EB0E7@silas.cc.monash.edu.au>):

=How can I add more swap space to overcome this problem ?
=I've tried vnconfig and swapon...but I can't figure it out ?

This is sad, I found their manpages to be quite easy... Here is
the only line in my /etc/vntab :
	/dev/vn0        /c/pagefile.sys swap
The command, that initializes this looks like this:
	root@aldan:squid/work/squid-1.1.8 (369) vnconfig -a -e -v
	/dev/vn0: 36700160 bytes on /c/pagefile.sys
	/dev/vn0: swapping enabled

All you need is a file as big as you need (instead of my /c/pagefile.sys)
and a vnode (cd /dev; ./MAKEDEV vn0). Make sure, you enabled the vnodes
in your kernel.

(As you guessed, I use the WinNT's swap file from the ``C:'' disk.)

=Is it possible that there is a memory leak somewhere ?

Netscape is very memory consuming. Especially, the 4beta2, do not
run it, it is very likely, that it has huge memory leaks.

=Worse part is sometimes xdm will simply restart itself....

It is not xdm. When there is no memory, any application wich can
not get it's memory may get killed (do not ask me why, it is
complicated).  The other memory consuming program running on your
machine is X-server -- it may get killed. The xdm will then start
a new one...

You can check for the amount of swap you have left with swapinfo:

	mi@aldan:squid/work/squid-1.1.8 (370) swapinfo 
	Device      1K-blocks     Used    Avail Capacity  Type
	/dev/sd0s3b     16384     5552    10768    34%    Interleaved
	/dev/sd1s2b     16128     5512    10552    34%    Interleaved
	/dev/vn0        35840        0    35776     0%    Interleaved
	Total           68160    11064    57096    16%
	(notice the just added vn0 has nothing on it stil).

You can even set up a little cron job, to check for the amount of
free swap left, and bring up a little warning-dialog, like WinNT
does.

``ps -axl'' or top can tell you, who is the offender, so can
kill/restart the program (Netscape), before your other program(s)
(X-server) die. This can also be automated, of course.

Performance-wise, it is a good idea to have swaping areas on
different disks (and _not_ use the vnodes for that, use ``native''
swap-partitions if possible).

It is not (yet, hopefully), possible to neither prioritize the swap
areas (in my case, I'd prefer the vn0 to only be used after others
are exhausted, as it is slower) nor to stop swaping on a particular
partition without reboot.

This, BTW, is perfectly possible on the beaten here IRIX (5.3 for
sure, may be even 5.2).

Wishing you success,

	-mi

-- 
	"Windows for dummies"