Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 May 2020 10:59:01 +0100
From:      Steve O'Hara-Smith <>
To:        Nikita Stepanov <>
Subject:   Re: Does swap increase freebsd performance?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Tue, 05 May 2020 15:39:16 +0600
Nikita Stepanov <> 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 <>

Want to link to this message? Use this URL: <>