All of lore.kernel.org
 help / color / mirror / Atom feed
* memory limit/quota per user
@ 2010-06-08 10:27 Tharindu Rukshan Bamunuarachchi
  2010-06-09  1:18 ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 7+ messages in thread
From: Tharindu Rukshan Bamunuarachchi @ 2010-06-08 10:27 UTC (permalink / raw)
  To: linux-mm

Hello All,

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.

thankx a lot.
tharindu.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* memory limit/quota per user
@ 2010-06-08 10:32 Tharindu Rukshan Bamunuarachchi
  2010-06-08 11:51 ` Michal Nazarewicz
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tharindu Rukshan Bamunuarachchi @ 2010-06-08 10:32 UTC (permalink / raw)
  To: linux-admin

Hello All,

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.

thankx a lot.
tharindu.


"those that can, do. Those that can’t, complain." -- Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: memory limit/quota per user
  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-18 14:34 ` Alex Brandt
  2 siblings, 0 replies; 7+ messages in thread
From: Michal Nazarewicz @ 2010-06-08 11:51 UTC (permalink / raw)
  To: Tharindu Rukshan Bamunuarachchi; +Cc: linux-admin

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

Tharindu Rukshan Bamunuarachchi <btharindu@gmail.com> writes:
> 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.

Unless something has changed recently, not with standard utilities.
Maybe SELinux or similar allows for something like that but otherwise
it's impossible.

-- 
Best regards,                                         _     _
 .o. | Liege of Serenly Enlightened Majesty of      o' \,=./ `o
 ..o | Computer Science,  Michal "mina86" Nazarewicz   (o o)
 ooo +--<mina86-tlen.pl>--<jid:mina86-jabber.org>--ooO--(_)--Ooo--

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: memory limit/quota per user
       [not found] ` <AANLkTimp6NZgSXfyrwB5GSOFxom6lLYsMBxdENCgqzUI@mail.gmail.com>
@ 2010-06-08 12:41   ` Tharindu Rukshan Bamunuarachchi
  0 siblings, 0 replies; 7+ messages in thread
From: Tharindu Rukshan Bamunuarachchi @ 2010-06-08 12:41 UTC (permalink / raw)
  To: Ezra Taylor; +Cc: linux-admin

but that is for lock memory per process, not per user ?


__
tharindu.info

"those that can, do. Those that can’t, complain." -- Linus



On Tue, Jun 8, 2010 at 1:20 PM, Ezra Taylor <ezra.taylor@gmail.com> wrote:
> Tharindu:
>
>                    Check out /etc/security/limits.conf.  The variable to
> modify or add is memlock.  You can set hard and soft limits on this.
> On Tue, Jun 8, 2010 at 6:32 AM, Tharindu Rukshan Bamunuarachchi
> <btharindu@gmail.com> wrote:
>>
>> Hello All,
>>
>> 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.
>>
>> thankx a lot.
>> tharindu.
>>
>>
>> "those that can, do. Those that can’t, complain." -- Linus
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>
> --
> Ezra Taylor
>
--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: memory limit/quota per user
  2010-06-08 10:27 Tharindu Rukshan Bamunuarachchi
@ 2010-06-09  1:18 ` KAMEZAWA Hiroyuki
  0 siblings, 0 replies; 7+ messages in thread
From: KAMEZAWA Hiroyuki @ 2010-06-09  1:18 UTC (permalink / raw)
  To: Tharindu Rukshan Bamunuarachchi; +Cc: linux-mm

On Tue, 8 Jun 2010 11:27:10 +0100
Tharindu Rukshan Bamunuarachchi <btharindu@gmail.com> wrote:

> Hello All,
> 
> 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.
> 

please check memory cgroup and libcgroup.
(memory cgroup is for limiting memory usage per a group of processes,
 libcgroup provides automatic grouping method.)

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: memory limit/quota per user
  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-18 14:34 ` Alex Brandt
  2010-06-18 18:56   ` Glynn Clements
  2 siblings, 1 reply; 7+ messages in thread
From: Alex Brandt @ 2010-06-18 14:34 UTC (permalink / raw)
  To: Tharindu Rukshan Bamunuarachchi; +Cc: linux-admin

[-- Attachment #1: Type: Text/Plain, Size: 911 bytes --]

On Tuesday 08 June 2010 5:32:46 am Tharindu Rukshan Bamunuarachchi wrote:
> Hello All,
> 
> 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.
> 
> thankx a lot.
> tharindu.
> 
> 
> "those that can, do. Those that can’t, complain." -- Linus
> --
> To unsubscribe from this list: send the line "unsubscribe linux-admin" 
in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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>

Regards,

Alex Brandt

-- 
Linux Administrator
http://www.alunduil.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: memory limit/quota per user
  2010-06-18 14:34 ` Alex Brandt
@ 2010-06-18 18:56   ` Glynn Clements
  0 siblings, 0 replies; 7+ messages in thread
From: Glynn Clements @ 2010-06-18 18:56 UTC (permalink / raw)
  To: Alex Brandt; +Cc: Tharindu Rukshan Bamunuarachchi, linux-admin


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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-18 18:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2010-06-08 10:27 Tharindu Rukshan Bamunuarachchi
2010-06-09  1:18 ` KAMEZAWA Hiroyuki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.