From owner-freebsd-stable@FreeBSD.ORG Tue Apr 12 14:06:47 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E579916A4CE for ; Tue, 12 Apr 2005 14:06:47 +0000 (GMT) Received: from raven.ravenbrook.com (raven.ravenbrook.com [193.82.131.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D61A43D41 for ; Tue, 12 Apr 2005 14:06:45 +0000 (GMT) (envelope-from nb@ravenbrook.com) Received: from thrush.ravenbrook.com (thrush.ravenbrook.com [193.112.141.145]) j3CE6fU7060532; Tue, 12 Apr 2005 15:06:41 +0100 (BST) (envelope-from nb@ravenbrook.com) Received: from thrush.ravenbrook.com (localhost [127.0.0.1]) j3CE6fHs051435; Tue, 12 Apr 2005 15:06:41 +0100 (BST) (envelope-from nb@thrush.ravenbrook.com) From: Nick Barnes To: Vivek Khera In-Reply-To: <0c9a92c2eb7461f25aa924322407f950@khera.org> from Vivek Khera of "Tue, 12 Apr 2005 09:52:59 -0400" Date: Tue, 12 Apr 2005 15:06:41 +0100 Message-ID: <51434.1113314801@thrush.ravenbrook.com> Sender: nb@ravenbrook.com cc: freebsd-stable@freebsd.org Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 14:06:48 -0000 At 2005-04-12 13:52:59+0000, Vivek Khera writes: > > of swap? Which leads to the question would it not be more sensible to > > kill off the largest process first as its more than likely that it is > > responsible > > for the problem? > > > > so when this largest process is your production database server for > your e-commerce site, what will you change your recommendation to be? > > basically, there is no "right" choice of process to kill. a machine > that is out of resources is just a bad situation, and the right thing > is to try to avoid getting there with careful monitoring and planning. The right choice is for mmap() to return ENOMEM, and then for malloc() to return NULL, but almost no operating systems make this choice any more. Nick B