Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 1999 09:35:03 -0700 (PDT)
From:      Alfred Perlstein <bright@wintelcom.net>
To:        "Daniel C. Sobral" <dcs@newsguy.com>
Cc:        Ivan <Ivan.Djelic@prism.uvsq.fr>, Matthew Dillon <dillon@apollo.backplane.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Out of swap handling and X lockups in 3.2R
Message-ID:  <Pine.BSF.4.05.9909220928400.6368-100000@fw.wintelcom.net>
In-Reply-To: <37E8F645.7437D0D9@newsguy.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Thu, 23 Sep 1999, Daniel C. Sobral wrote:

> First, let me warn you that this is a often recurring thread. It has
> already showed up two or three times this year alone.
> 
> Ivan wrote:
> > 
> > I had a look at vm_pageout.c and noticed that situations may occur where
> > no process can be killed. I guess that in such situations memory
> > allocation requests are simply rejected ( e.g. malloc returning NULL ) .
> 
> Err... no. Malloc() does not "call" these functions. By the time a
> pageout is requested, the malloc() has already finished. The pageout
> is being requested because a program is trying to use the memory
> that was allocated to it.
> 
> > Is there a reason why this isn't the default behavior in FreeBSD ? i.e.
> > why does the system always try to kill a process ?
> 
> If no process can be killed, the system will panic (or deadlock).
>
> > Indeed, the 'biggest' process is SIGKILLed without any prior notice. Would
> > it be possible to send him a nicer signal first, to let him a chance to
> > quit before being killed ?
> 
> I'd very much like to see swap space being taking into account in
> addition to RSS. A runaway program is more likely to have a low RSS
> and a large swap than a large RSS.
> 
> Anyway, some Unix systems do send a signal in low memory conditions.
> In AIX (the one I'm most familiar with) it is called SIGDANGER, and
> it's handler defaults to SIG_IGN.
> 
> One reason why we do not do this is the lack of support for more
> than 32 signals. Alas, I think we now support more than 32 signals,
> don't we? If that's the case, I'd think it shouldn't be too
> difficult to make the swapper send SIGDANGER to all processes when
> it reaches a certain threshold (x% full? xMb left?).

Terry Lambert brought up an interesting thought from AIX (I think),
instead of killing a process, it just sleeps the requesting process
until the situation alleviates itself.  Of course this can wind up
wedging an entire system, it would probably be advisable to then
revert to killing when more than a threshold of processes go into
a vmwait sleep.

As far as signals go, I'm pretty sure it's not committed yet, but I
really hope it goes in soon, it would be extremely helpful.

-Alfred



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9909220928400.6368-100000>