[clug] nice.... but for memory?

Martin Pool mbp at samba.org
Wed Jan 21 07:05:38 GMT 2004


On 21 Jan 2004, Peter Barker <pbarker at barker.dropbear.id.au> wrote:
> On Wed, 21 Jan 2004, Martin Pool wrote:
> 
> > > >          Is it possible to limit the amount of memory a program (and its
> > > > child processes) are allowed to use? (is there a wrapper that can be used?)
> 
> > ulimit is applied per-process, not for a whole group.
> 
> Good as a clarification, but I assumed he meant "each individual process"
> rather than limitting the sum of the memory usages of the group :)

Oh, possibly.  That does mean that the process can use up arbitrarily
large amounts of memory just by forking, which kind of limits the
usefulness.

I don't think you will necessarily be toast; when it reaches the limit
things like brk() will just start to return ENOMEM, which libc should
handle.  Of course most programs have probably not been tested in this
domain and so will die.

-- 
Martin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20040121/68fd391b/attachment.bin


More information about the linux mailing list