linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glynn Clements <glynn@gclements.plus.com>
To: Alex Brandt <alunduil@alunduil.com>
Cc: Tharindu Rukshan Bamunuarachchi <btharindu@gmail.com>,
	linux-admin@vger.kernel.org
Subject: Re: memory limit/quota per user
Date: Fri, 18 Jun 2010 19:56:50 +0100	[thread overview]
Message-ID: <19483.49522.71124.816721@cerise.gclements.plus.com> (raw)
In-Reply-To: <201006180934.25657.alunduil@alunduil.com>


Alex Brandt wrote:

> > Is it possible to limit memory quota per user (like disk quota) in 
> linux ?
> > 
> > AFAIK, RLIMIT_* (i.e. RSS, DATA) are applicable per process not per 
> user.

> You can use the pam security limits feature.
> 
> Simply check that the module is being loaded in pam.d:
> 
> /etc/pam.d/system-auth:session          required        pam_limits.so 
> 
> Then use the /etc/security/limits.conf file:
> <user> soft|hard memlock <value>

Memory limits are per-process, not per-user (and "memlock" controls
the amount of memory which can be mlock()d, which has little bearing
on memory usage overall).

The only per-user resource limit is the total number of processes.

-- 
Glynn Clements <glynn@gclements.plus.com>

      reply	other threads:[~2010-06-18 18:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 10:32 memory limit/quota per user Tharindu Rukshan Bamunuarachchi
2010-06-08 11:51 ` Michal Nazarewicz
     [not found] ` <AANLkTimp6NZgSXfyrwB5GSOFxom6lLYsMBxdENCgqzUI@mail.gmail.com>
2010-06-08 12:41   ` Tharindu Rukshan Bamunuarachchi
2010-06-18 14:34 ` Alex Brandt
2010-06-18 18:56   ` Glynn Clements [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19483.49522.71124.816721@cerise.gclements.plus.com \
    --to=glynn@gclements.plus.com \
    --cc=alunduil@alunduil.com \
    --cc=btharindu@gmail.com \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).