Subject: Re: managing process memory limits on the fly?
To: Jeff Rizzo <riz@NetBSD.org>
From: Carl Brewer <carl@bl.echidna.id.au>
List: netbsd-users
Date: 02/22/2007 12:52:07
Jeff Rizzo wrote:
> Carl Brewer wrote:
>> ok, thanks. I tried this on a jammed up zope process, and saw the
>> following :
>>
>> rollcage2# sysctl proc.23242.rlimit.datasize.hard
>> proc.23242.rlimit.datasize.hard = 1073741824
>> rollcage2# sysctl -w proc.23242.rlimit.datasize.hard=2147483648
>> proc.23242.rlimit.datasize.hard: 1073741824 -> 2147483648
>> rollcage2# sysctl proc.23242.rlimit.datasize.hard
>> proc.23242.rlimit.datasize.hard = 1073741824
>>
>>
>> so it didn't actually do anything. Did I do something wrong?
>
> You can't raise the "hard" limit - it's the soft limit you want to change.
ahha, I've just doubled the soft limit to 256MB, and will see how it
goes.
Thankyou.
Is it possible to do this for a particular account only? I
have a 'zope' user that I want to be able to use a lot of memory
and it would be handy if I could let it do that? I assume
sysctl or limit|ulimit will let me change soft limits as that
user in a login script or startup script or something?, or is it more
elegant/correct to do it elsewhere?