*BSD News Article 37413


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!uwm.edu!lll-winken.llnl.gov!trib.apple.com!amd!amdahl.com!amdahl!amdahl.uts.amdahl.com!agc
From: agc@uts.amdahl.com (Alistair G. Crooks)
Subject: Re: virtual memory limits in NetBSD
Message-ID: <1994Nov2.100228.21692@uts.amdahl.com>
Organization: Amdahl Corporation, Sunnyvale CA
References: <3960t9$nfq@dns1.NMSU.Edu>
Date: Wed, 2 Nov 1994 10:02:28 GMT
Lines: 57

In article <3960t9$nfq@dns1.NMSU.Edu> astrand@nmsu.edu (Allan E. Strand) writes:
>Hi all,
>
>I am trying to run a program which consumes large quantites of memory.  The
>problem comes when the amount of memory consumed exceeds the size of the
>actual memory available to the system.  What I would like to do is raise the
>virtual memory limit to an amount greater than the amount of RAM installed on
>the system. 
>
>Currently, we are running NetBSD 0.9 on a 486 machine with 32M of RAM, the
>kernel is compiled with MAXDSIZE = (64*1024*1024) and MAXTSIZE =
>(64*1024*1024)
>
>When (running csh) I try to change the hard limits for program data size to a
>number above 32M, I am not able to.  Does anyone have any suggestions? 

Were you the superuser when you tried to change the hard limits?
To quote from the csh(1) man page, in the limits section:

"...  If the -h flag is given, the hard limits are used instead of the
current limits.  The hard limits impose a ceiling on the value of the
current limits.  Only the super-user may raise the hard limits, but a
user may lower or raise the current limits within the legal range."

and:

root@rumpy:/root(5)% id
uid=0(root) gid=0(wheel) groups=0(wheel), 2(kmem), 3(sys), 4(tty), 5(operator), 20 (staff), 31(guest)
root@rumpy:/root(6)% limit
cputime         unlimited
filesize        unlimited
datasize	262144 kbytes
stacksize	8192 kbytes
coredumpsize	unlimited
memoryuse	13712 kbytes
memorylocked	4572 kbytes
maxproc		40
openfiles	64
root@rumpy:/root(7)% grep limit ~/.cshrc
unlimit datasize
unlimit stacksize
unlimit -h datasize
unlimit -h stacksize
root@rumpy:/root(8)% 

And I know it's possible to have processes larger than physical
memory, as I built Sather 1.0.1 yesterday (whilst in XFree86 3.1), and
watched the processes go by with top.  The size of the process rose to
34 Meg, and the resident size varied up to 12 Meg.  All this on a
machine with 16 Meg, and about 40 Meg swap space.  Definitely
thrashing at times, but it did make it.

Alistair
--
Alistair G. Crooks (agc@uts.amdahl.com)			   +44 125 234 6377
Amdahl European HQ, Dogmersfield Park, Hartley Wintney, Hants RG27 8TE, UK.
[These are only my opinions, and certainly not those of Amdahl Corporation]