[Beowulf] Re: Memory limit enforcement

David Mathog mathog at caltech.edu
Wed Oct 10 12:18:54 PDT 2007


David Kewley <kewley at gps.caltech.edu> wrote:


> But the kernel doesn't really enforce anything useful.

I agree, the kernel should be able to enforce these sorts of limits
on all processes of a user at once.

Write Linus or whichever kernel developer you think is most likely to
know now to implement this and request it as a new feature, and explain
the situation.

I'm thinking that it shouldn't be too difficult (but what do
I know about kernel hacking?) to allow a process to request:

1. for any child processes that may be created after the request
2. for any malloc() type operation
3. have the child share the parent's memory statistics/limits
   as maintained by the kernel.  (Not the complete memory map, just
   the sum of physical and virtual memory allocated.)

The end result would be malloc/calloc failing in some
child process once the parent process's counters hit up against
the set limit(s).  This would happen no matter which child ate all the
memory, which is the desired behavior.

Regards,

David Mathog
mathog at caltech.edu
Manager, Sequence Analysis Facility, Biology Division, Caltech



More information about the Beowulf mailing list