Subject: Re: userid partitioned swap spaces.
To: None <tech-kern@netbsd.org>
From: Ian Dall <Ian.Dall@dsto.defence.gov.au>
List: tech-kern
Date: 12/21/1998 11:50:50
woods@most.weird.com (Greg A. Woods) writes:

  > [ On Fri, December 18, 1998 at 09:11:49 (+0200), Lucio de Re wrote: ]
  >> Subject: Re: userid partitioned swap spaces. 
  >> 
  >> If one _could_ have something like kibitz reach out and page you, the 
  >> 400km are no longer a big deal :-)  That is not entirely out of the 
  >> question, with some careful thinking.

  > The system should be more robust than relying on an external operator to
  > intervene in these kinds of situations.

I suggest non-root processes merely become blocked if they need swap
above the high water mark. Processes which don't need swap continue to
run and if they exit and free up space, then the blocked processes
become runnable again. Of course, it is possible, even likely that the
system could wedge with all processes are either "permanant" daemons
or blocked waiting for swap. That requires either human intervention
or an "intelligent" process to handle the situation.

The (euid=0) low swap handler can be simple or sophisticated. It
could, for example impliment some sort of per user quota and enter
into a dialog with users who are over their quota regarding which of
their processes they want to kill. Such a scheme would allow users to
fix the problem themselves. I acknowledge, however, that this is not
an all singing all dancing solution.  It would be impossible for
example, to implement a policy allowing users below quota to continue
unaffected while waiting for someone over quota to take action.

Systems with no users at all such as file servers, gateways etc I
would have thought would be quite predicatable regarding how much swap
they use and could be fairly easilly configured appropriately.

Ian