Fwd: per user memory limit and LSM module
Date: Fri May 29 2009 - 09:15:49 EST
---------- Forwarded message ----------
From: Iliya <vnsavage@xxxxxxxxx>
Date: Fri, May 29, 2009 at 4:11 PM
Subject: Re: per user memory limit and LSM module
To: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
On Fri, May 29, 2009 at 3:57 PM, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
>> Any suggestions on how can I quickly get or maintain a list of all the
>> running tasks per user(or just the memory usage), without patching the
>> kernel would be greatly appreciated.
> Even if you could what would you do with it, large parts of memory don't
> have a single owner and even if they did you would have to traverse tens
> of thousands of objects so it would be incredibly slow.
Thank you for your reply.
If I can quickly sum, let's say the tsk->mm->total_vm (although this
would not count the overcommiting) for all tasks owned by a user, I
can limit that.
What I really need is to make sure that none of the users would eat
all the memory or get the system in OOM state.
> Take a look at the containers work and OpenVZ as I suspect that is what
> you need to work from.
The containers will probably do the job but the module is
multi-purpose and I would rather have everything at one place if
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/