Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: steffen@manta.latrade.com (Steffen Ullrich)
Subject: Re: out of swap -> killing inetd
Date: 1996/07/12	[thread overview]
Message-ID: <4s5n9v$bt9@xensei3.xensei.com> (raw)
In-Reply-To: 4rteld$2tb@route1.france3.fr


In article <4rtqbf$dp9@news.iastate.edu>,
	john@iastate.edu (John Hascall) writes:
> Boyd Roberts <boyd@france3.fr> wrote:
> }steffen@latrade.com says...
> }>A while ago I run a really big process (user process - no root!) on an 
> }>DEC UNIX 3.2C machine with 64MByte so that the machine run out of swap
> }>space. Instead of killing the process which caused this problem it
> }>randomly killed other processes - among them the inetd.
> 
> }Process killing based on memory/swap resource problems was always a
> }bad idea.  It's next to impossible to determine what to kill and a worst
> }case scenario is that everything is killed before the offending process is.
> 
> }At least with Digital UNIX you can choose a swap policy to be eager or lazy.
> }I'd make it eager and then the chance of this scenario is lessened.
> 
>    Well, they give you the choice between two not real pleasent choices.
>      a) lazy mode = take your chances, but save swap space
>      b) eager mode = offending process gets it, but need LOTS of swap
> 
>    What would be nice (I think) is:
>      1) per-process control of lazy/eager
>      2) ability to mark a process non-swappable
>      3) a wait/die per-process flag for what to do when no swap available.
>    all of which can be set external to a process (e.g., no need to
>    have source/recompile).  For example:
> 
>          # swapctl -noswap `cat /etc/inetd.pid`
>          # swapctl -lazy 34 47 59


I think the problem is a bit harder to solve.
First it makes IMO no sense to force the system not to swap inetd. In this way
we loose some of the RAM, even if its nearly never used by the process. Then we
still can get the situation that all RAM+swap is used but somebody needs to
remote login. In this case inetd would maybe need to allocate more memory which
it could not because there is no more memory available. And even if there is a tiny
piece of memory available inetd needs to fork+exec the in.rlogind to actually
respond to the request on the port. So we must guarantee that not only inetd gets
enough mem but also some other processes which gets spawned by inetd. 

That means that we need to assign memory priorities by process image and not
by PID and that other processes with less priority needs to be killed if necessary.
And if the processes with the highest mem priority cannot get more memory,
e.g. if all memory is used by this high priority processes than we know that
something went completly wrong and the system better reboots itself immediatly.

And again, I don't think that this problem has anything to do with the swap 
mode you use.



  parent reply	other threads:[~1996-07-12  4:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-08  4:00 out of swap -> killing inetd Steffen Ullrich
1996-07-09  4:00 ` Bob Vickers
1996-07-09  4:00   ` Peter da Silva
     [not found]     ` <ufivbxlzpc.fsf@microl6.microlise.uucp>
1996-07-10  4:00       ` Peter da Silva
1996-07-11  4:00     ` Patrick O'Rourke USG
1996-07-10  4:00   ` Andrew Gierth
1996-07-10  4:00   ` Jim Reid
1996-07-10  4:00   ` Patrick O'Rourke USG
1996-07-09  4:00 ` Randy Kaelber
1996-07-10  4:00   ` Steffen Ullrich
1996-07-09  4:00 ` Boyd Roberts
1996-07-09  4:00   ` John Hascall
1996-07-12  4:00   ` Steffen Ullrich [this message]
1996-07-23  4:00 ` Brian James O'Connor
  -- strict thread matches above, loose matches on Subject: below --
1996-07-13  4:00 Steffen Ullrich
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox