[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Managing memory usage per *user* (or group) not per *process*?



On Wednesday, 08.03.2006 at 09:25 -0600, Steve Block wrote:

> On Wed, Mar 08, 2006 at 03:19:50PM +0000, Dave Ewart wrote:
> >I have a system which I manage which has many users.  Now and again,
> >during busy periods, if many users are working at once the machine
> >starts swapping and performance goes through the floor.  This is
> >because the main purpose of the machine is to run statistical
> >analyses of large datasets which results in heavy RAM usage.
> >
> >I'd like to impose resource limits on RAM usage.
> >
> >The standard approach to this appears to be to use ulimit/setrlimit,
> >which allows one to set process limits for various things.  But, the
> >underlying flaw with this approach is that the limits operate per
> >*process*, not per user.
> >
> >This means that if there is a process limit of 1GB RAM, there is
> >nothing stopping a user running many processes each of which are
> >'only' 900MB, for example.
> >
> >Is there a way to impose resource limits (spec. RAM usage) per user?
> >Or, even better, per system group (so I could say "all users in group
> >'staff' are limited to a total memory usage at any one time of 4GB
> >RAM" or similar)?
> >
> >Any suggestions and ideas most welcome!
> 
> I think /etc/security/limits.conf may be what you're looking for.

Thanks Steve.  In my experience testing this out just now,
/etc/security/limits.conf still sets limits per process, but these
limits can be set differently for each user or for each group.

It is still possible to run many processes that are just "under the
radar", as it were, so this doesn't solve my problem unfortunately.

Dave.
-- 
Please don't CC me on list messages!
...
Dave Ewart - davee@sungate.co.uk - jabber: davee@jabber.org
All email from me is now digitally signed, key from http://www.sungate.co.uk/
Fingerprint: AEC5 9360 0A35 7F66 66E9 82E4 9E10 6769 CD28 DA92

Attachment: signature.asc
Description: Digital signature


Reply to: