Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Mar 2006 16:08:04 +0200 (EET)
From:      Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
To:        Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: RELENG_4 on flash disk and swap
Message-ID:  <20060304155525.F37687@atlantis.atlantis.dp.ua>
In-Reply-To: <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> <20060304065138.GD692@turion.vk2pj.dyndns.org>

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060304155525.F37687>