"swap" partition leads to instability?

Fred Morcos fred.morcos at gmail.com
Wed May 29 11:57:53 UTC 2013

On Wed, May 29, 2013 at 1:19 PM, jb <jb.1234abcd at gmail.com> wrote:

> Fred Morcos <fred.morcos <at> gmail.com> writes:
> > ..
> > The improvement effect can be
> > noticed on large inputs. These algorithms will most probably perform
> quite
> > badly on small inputs.
> I think your concern has been addressed in review of various algos where
> base
> case identification helped to avoid overhead cost in small problem sizes
> relative to cache.
> http://erikdemaine.org/papers/BRICS2002/paper.pdf

I will check the paper out after work, but for clarification: "Also,
properly written cache-oblivious algorithms tend to recursively decompose
the problem until it is small enough to fit in a cache and solve each part
iteratively." <-- refers to the base case. The issue is when the input is
small enough to be solved faster iteratively but too large to fit in the
cache. Also note that this is extremely machine and cache-dependent. Still,
I will check the paper out :) thanks.

> In light of available but not implemented better VMM algos, perhaps *BSD
> and
> Linux could eliminate or reduce the need for:
> - swap space

I run Archlinux without any swap space on a workstation laptop without
problems. I occasionally fallocate a swapfile when I need to build GHC
(usually in /tmp to make use of tmpfs).

> - swapping out RAM even if there is no lack of it

Linux has a sysctl variable vm.swappiness which you can set to 0 or 1 out
of 100. Not sure how to achieve the same on FreeBSD, maybe one or more
combinations of the following?

vm.swap_idle_threshold2: 10
vm.swap_idle_threshold1: 2
vm.stats.vm.v_swappgsout: 236969
vm.stats.vm.v_swappgsin: 28411
vm.stats.vm.v_swapout: 92607
vm.stats.vm.v_swapin: 28285
vm.disable_swapspace_pageouts: 0
vm.defer_swapspace_pageouts: 0
vm.swap_idle_enabled: 0

> - overcommitment of memory (a bluff asking to be punished by OOM killer)
> - OOM killer
> Besides, they allow sloppy/dangerous programming.
> jb
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe at freebsd.org"

More information about the freebsd-questions mailing list