Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Mar 2006 13:57:50 +0200 (EET)
From:      Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
To:        Michael Proto <mike@jellydonut.org>
Cc:        Peter Jeremy <peterjeremy@optushome.com.au>, freebsd-stable@freebsd.org
Subject:   Re: RELENG_4 on flash disk and swap
Message-ID:  <20060310121758.S80837@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!

> Date:      Fri, 3 Mar 2006 08:04:55 -0500 
> From:      Michael Proto <mike@jellydonut.org>
> To:        freebsd-stable@freebsd.org
> Subject:   Re: RELENG_4 on flash disk and swap
>
> I'm running FreeBSD in 64Mb with no swap and it works fine. A few
> sysctls that I've found helpful for running without swap:
> 
> vm.swap_enabled=0
> vm.disable_swapspace_pageouts=1
> kern.ipc.shm_use_phys=1

   Thank you very much! These settings (rather vm.disable_swapspace_pageouts, 
because I've already had vm.swap_enabled=0, and IMHO kern.ipc.shm_use_phys
matters for specific applications only) have taken my dreadful

swap_pager_getswapspace: failed

messages away! Now I can run "make buildworld/buildkernel" and build some 
other ports simultaneously, and swap_pager doesn't complain. I think that
this piece of wisdom (sysctl settings for swapless FreeBSD) is definitely 
worth being mentioned in tuning(7).

   Actually 'top' shows on my swapless machine with 256Mb RAM that there are
always a lot of usable pages (Inact + Free almost always > 150Mb). So swap
attempts before turning vm.disable_swapspace_pageouts on had an artifical 
nature (wasn't necessary at all)?

On Sat, 4 Mar 2006, Peter Jeremy wrote:
> 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.

  This is still a concern for me. IMHO it would be useful to have the ability
to disable process killing due to the lack of swap, because having this
enabled on e.g. transit router can lead to very unpleasant scenario. Imagine 
someone DoS-attacks it's sshd, and kernel kills the process with the largest 
RSS - it could e.g. be a vital part of the routing software (zebra/ripd/bgpd), 
and killing this process will render our router unreachable and unusable!

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?20060310121758.S80837>