Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In Debian 6, how can I limit the total amount of memory (both resident set size and total virtual memory) that a user has access to?

I have tried setting limits via ulimit, but if a process spawns subprocesses, the subprocesses do not have their memory limited.

I have also tried setting limits via /etc/security/limits.conf, but these limits do not seem to apply to processes spawned from non-login shells, or to subprocesses.

share|improve this question
add comment

1 Answer

Squeeze supports cgroups if you install cgroups-bin. I've done this to limit memory for users, groups of users, and individual applications (e.g. emacs cannot go over 1G)

q.v. https://hydra.geht.net/tino/english/faq/debian/squeeze/cgroups/

share|improve this answer
    
Thanks for the reply. The default kernel provided with Squeeze doesn't support memory cgroups - should I pull in the kernel from Wheezy or would that cause problems? –  robinjam Jun 21 '11 at 13:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.