Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2013 13:57:22 +0200
From:      Fred Morcos <fred.morcos@gmail.com>
To:        jb <jb.1234abcd@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: "swap" partition leads to instability?
Message-ID:  <CAH3a3KVfxFnUOV4vjSpHwyU9Sd7Oc40Ct3DUSz0kZfnhCjyg9w@mail.gmail.com>
In-Reply-To: <loom.20130529T131753-79@post.gmane.org>
References:  <1369558712.96152.YahooMailNeo@web165006.mail.bf1.yahoo.com> <loom.20130526T143506-872@post.gmane.org> <1369644392.92027.YahooMailNeo@web165003.mail.bf1.yahoo.com> <loom.20130527T115233-867@post.gmane.org> <loom.20130528T204022-196@post.gmane.org> <CAH3a3KU%2BZe2SRe0DQVGw=rV1XhCL1z4mZu2Mdv_c_NnAD9pyAw@mail.gmail.com> <loom.20130529T131753-79@post.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 29, 2013 at 1:19 PM, jb <jb.1234abcd@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe@freebsd.org"
>



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