Re: RLIMIT_RSS

Chris Evans (chris@ferret.lmh.ox.ac.uk)
Sat, 8 Nov 1997 20:26:32 +0000 (GMT)


On Fri, 7 Nov 1997, Greg Alexander wrote:

> On Thu, 6 Nov 1997, Chris Evans wrote:
>
> > Do I read correctly that RLIMIT_RSS isn't enforced in the kernel? If so
>
> Hrm. I'm thinking, based on minimal knowledge, that it would require
> changes to kswapd to swap out a specific user's data when low on
> memory...overall, I don't see it as being very worthwhile. The RLIMIT_*
> stuff is useless, by default, anyways, as it's usually per-process, not
> per-user...I have a small patch to change RLIMIT_DATA to be per-user, but it
> wouldn't be really compatable.

I must disagree about the RLIMIT_ stuff being useless. The following
simple scenario will clarify this:

non-malicious user types "pico <very_big_file>". Where very_big only needs
to be ~8Mb, maybe, to bring a 64Mb system to its knees. Very effectively.

If the resident size of any given process were limited, this situation
would not be as severe.

On another note, per user limits would be _very_ cool. Traditionally (I
believe) UNIX does not cater for these, perhaps we should draw up a
standard??

Cheers
Chris