From owner-freebsd-stable@FreeBSD.ORG Sat Mar 4 14:08:15 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 CA7CC16A420 for ; Sat, 4 Mar 2006 14:08:15 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from postman.atlantis.dp.ua (postman.atlantis.dp.ua [193.108.47.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id E12CB43D49 for ; Sat, 4 Mar 2006 14:08:14 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by postman.atlantis.dp.ua (8.13.1/8.13.1) with ESMTP id k24E84U7041701; Sat, 4 Mar 2006 16:08:04 +0200 (EET) (envelope-from dmitry@atlantis.dp.ua) Date: Sat, 4 Mar 2006 16:08:04 +0200 (EET) From: Dmitry Pryanishnikov To: Peter Jeremy In-Reply-To: <20060304065138.GD692@turion.vk2pj.dyndns.org> Message-ID: <20060304155525.F37687@atlantis.atlantis.dp.ua> 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> <20060304065138.GD692@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 14:08:15 -0000 Hello! On Sat, 4 Mar 2006, Peter Jeremy wrote: > 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 Oh, I see. > >> ... 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. I haven't included "options UFS_DIRHASH" in my kernel's config. >> 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. ... but this is what actually happens. >> 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. Now I wander how to tune swapless FreeBSD (say, 4.x, although this part of the vm subsystem seems to be similar even in CURRENT) to insure that it won't kill important processes during low memory condition (short of removing process kill code from vm_pageout_scan())? If I define NO_SWAPPING in system's config file, it removes too much code (e.g., vm_daemon-related) so I fear that it'll actually make things worse. Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE