Hi gang,

We have a processes spawner to which users can submit their own
code to be run as a job. The spawner forks a number of processes
to execute their code in parallel, and returns the results to them
after their job has finished. All of that is working well and good.

Except when a user's code wants to eat all the RAM on the machine.
RHEL 4 and 5 don't seem to handle this too gracefully, the oom_kill
feature is a little... unpredictable.

I think I know what I want to do, but I don't know how to do it,
and I'm probably wrong anyways. I'll search the web and look for a
book that explains this better.

What I think I want is a way to spawn a process group with an
associated ulimit, so that any processes forked within that group
are held to the same limits _total_. Ie, if I say a group is limited
to 4GB of RAM, all of the processes share that same 4GB, not that
each process gets 4GB each.

Am I dreaming? Is there a way to do this? As I said, I am posting
in parallel to doing my own research because as always, this is an
urgent issue, so any help would be welcome!

__________________________________________________ _____________________
Marco E. Nicosia | http://www.escape.org/~marco/ | marco@escape.org