Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 May 2020 10:59:01 +0100
From:      Steve O'Hara-Smith <steve@sohara.org>
To:        Nikita Stepanov <nikitastepanov113@yandex.kz>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Does swap increase freebsd performance?
Message-ID:  <20200505105901.4306c0f7aa0aec652e2cc65a@sohara.org>
In-Reply-To: <3971481588671556@myt2-8316c2cade1b.qloud-c.yandex.net>
References:  <3971481588671556@myt2-8316c2cade1b.qloud-c.yandex.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 05 May 2020 15:39:16 +0600
Nikita Stepanov <nikitastepanov113@yandex.kz> wrote:

	We seem to be getting a rash of bodyless messages with the question
in the subject. Please type a body with your question even if it is a
repeat of the subject.

	Swap can increase performance by making more of the memory
available for active use. Many programs have memory allocated that is very
rarely used or even only used at startup, pushing this out to swap frees
physical memory for more active use such as caching.

	Whether this makes a difference to performance or not depends
greatly on the workload, or more importantly the memory pressure the
workload produces.

	If there is plenty of memory then swap won't help and there is
overhead involved in writing pages out to swap so it will reduce
performance very slightly.

	If there is just about enough memory then swap will make it more
useful and increase performance. This 'sweet spot' is in reality often quite
wide depending on the benefits of caching on workload and so forth.

	If there is insufficient memory then swap will keep things working
but performance will suffer badly. This can be very important in the face
of an unusual load spike.

-- 
Steve O'Hara-Smith <steve@sohara.org>



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