From owner-freebsd-stable@FreeBSD.ORG Sat Mar 4 06:51:49 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org 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 E20AD16A420 for ; Sat, 4 Mar 2006 06:51:49 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B11343D45 for ; Sat, 4 Mar 2006 06:51:48 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail03.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k246pfLw010216 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 4 Mar 2006 17:51:42 +1100 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.4/8.13.4) with ESMTP id k246peQP004852; Sat, 4 Mar 2006 17:51:40 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.4/8.13.4/Submit) id k246pdbT004851; Sat, 4 Mar 2006 17:51:39 +1100 (EST) (envelope-from peter) Date: Sat, 4 Mar 2006 17:51:38 +1100 From: Peter Jeremy To: Dmitry Pryanishnikov Message-ID: <20060304065138.GD692@turion.vk2pj.dyndns.org> References: <20060302181625.I3905@atlantis.atlantis.dp.ua> <76FAD2DB-CD18-42D4-95C8-F016CFB17B00@segpub.com.au> <20060303110936.R86586@atlantis.atlantis.dp.ua> <20060303185157.GB692@turion.vk2pj.dyndns.org> <20060304001224.G356@atlantis.atlantis.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060304001224.G356@atlantis.atlantis.dp.ua> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: freebsd-stable@freebsd.org Subject: Re: RELENG_4 on flash disk and swap X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Mar 2006 06:51:50 -0000 On Sat, 2006-Mar-04 00:25:01 +0200, Dmitry Pryanishnikov wrote: >On Sat, 4 Mar 2006, Peter Jeremy wrote: >>swap space for a process and failed. The kernel tries to recover by >>killing the largest process (which should also be syslog'd). I'm > > In my case, not a single process has been killed. And I suppose >that I know why... Once swap_pager_full is set (which it has been in your case), the kernel will kill processes if it thinks it's short of memory, defined as (the following are all sysctl names): vm.stats.vm.v_free_reserved + vm.stats.vm.v_cache_min > vm.stats.vm.v_free_count + vm.stats.vm.v_cache_count >... because I think it wasn't a process which requested a page - it >apparently was a softupdates code. Or possibly the dirhash code - it also needs RAM. > Do you really believe that RELENG_4 >lacks real memory for "make buildworld" on i386 with 256Mb RAM? No. It seems fairly unlikely but it's been a long while (probably pre 4.x) since I've tried building world in a limited memory environment. g++ can eat lots of memory and I know ld used to. It seemed less likely that rm would fill up your memory. > My diagnostics (swap_pager_getswapspace: >failed) occurs only once per OS run (it doesn't repeat until I reboot by >box), and even with vm.swap_enabled=0! My reading of the code suggests that swap_pager_full (which triggers the message) will not be reset unless you have some swap so this would be expected. > So I think it's harmless, I just >want to confirm it w/o digging OS vm code. Once you've received this message, the OS is free to kill your processes until it frees up some swap (which it can't do if you don't have any). I suggest you have a quick look through vm/swap_pager.c and vm/vm_pageout.c, looking at swap_pager_full and swap_pager_almost_full. -- Peter Jeremy