Subject: Re: userid partitioned swap spaces.
To: Guenther Grau , Todd Whitesel <toddpw@best.com>
From: Jukka Marin <jmarin@pyy.jmp.fi>
List: tech-kern
Date: 12/15/1998 13:13:12
On Tue, Dec 15, 1998 at 11:53:51AM +0100, Guenther Grau wrote:
> I agree that this is still a problem that needs to be dealt with.
> Limiting the amount of user processes and the amount of memory these
> processes can use is possible already.

The problem with these limits is that you can't limit the _total_ memory
usage by a user which is what I would like to see.  The current limits are
good, but not very useful:

You have to let the users run a reasonable amount of processes.. something
like 20. even when not using X.

Also, the processes need a reasonable amount of memory.  Pine, for example,
seems to need about 25 MB to open a 10 MB mailbox.  Fine.

Now 20 processes * 25 MB/process = 500 MB.

500 MB * 10 users = 5000 MB.  Oops.

IMHO, there should be a common limit for all resources allocated by a _user_
(not only by a process).  This way, you could let Pine eat 25 MB, but still
limit the total user memory use to, say, 50 MB.

Also, the system _should_ be able to survive even if all users are allocating
all the memory they can.  My wife's 1.3.2 system has to be rebooted every now
and then because X and Netscape eat up all RAM and swap and the machine just
locks up and blinks the HD LED for hours when that happens.  UVM may help
with this, but AFAIK, it is still possible to make the system unusable by
allocating all swap.

I know there isn't a simple a perfect solution to this, but I would rather
have a Netscape process killed by the system than have the whole server die
or lock up.  I guess this isn't much of a problem on a single-user machine
with 256 MB of RAM and 4 GB of swap.. but it seems to be a problem on a
smallish single-user system already, not to mention public shell systems.

Adding the per-user swap file system might help a bit here, but I don't
like swap files that much (lower performance.. and who knows what happens
on a system with 30000 users and 30000 separate swap files?).

Just my 0.0001 FIM.

  -jm