Subject: Re: Swap overcommit (was Re: Replacement for grep(1) (part 2))
To: Garance A Drosihn <drosih@rpi.edu>
From: Daniel C. Sobral <dcs@newsguy.com>
List: tech-userlevel
Date: 07/15/1999 02:40:13
Garance A Drosihn wrote:
> 
> At 12:20 AM +0900 7/15/99, Daniel C. Sobral wrote:
> > In which case the program that consumed all memory will be killed.
> > The program killed is +NOT+ the one demanding memory, it's the one
> > with most of it.
> 
> But that isn't always the best process to have killed off...

Sure it is. :-) Let's see...

> One of my main freebsd machines is mainly here to run one
> process, which is a pretty good-sized process (>40meg).  If
> I did get into a memory-shortage problem, I do *not* want
> that process killed, I'd want some other processes killed.

Just size your swap so that it becomes unlikely that you run out of
memory before a process exceeds 40Mb.

And I mean it.

I once described in excruciatingly painful details why a number of
other techniques would end up being more difficult to implement than
the above. If you really want to know, check the archives. The very,
*very* least anyone with *real* interest in this thread can do is
read the archives on this subject for the past six or seven years.

> It would be nice to have a way to indicate that, a la SIGDANGER.

Ok, everybody is avoiding this, so I'll comment. Yes, this would be
interesting, and a good implementation will very probably be
committed. *BUT*, this is not as useful as it seems. Since the
correct solution is buy more memory/increase swap (correct solution
for our target markets, anyway), there is little incentive to
implement it.

So, I think people who can answer the above is thinking like "Well,
it is useful, but it's not useful enough for me to spend my time on
it, and I'm sure as hell don't want to write mini-papers on why it's
not that useful".

And, for that matter, neither do I. 

--
Daniel C. Sobral			(8-DCS)
dcs@newsguy.com
dcs@freebsd.org

	"Would you like to go out with me?"
	"I'd love to."
	"Oh, well, n... err... would you?... ahh... huh... what do I do
next?"