Swap on SSD

Frank Leonhardt frank2 at fjl.co.uk
Thu Feb 8 17:59:03 UTC 2018


On 2018-02-08 07:57, Steve O'Hara-Smith wrote:
> On Thu, 8 Feb 2018 00:38:02 -0700
> LuKreme <kremels at kreme.com> wrote:
> 
>> On Feb 7, 2018, at 08:18, Frank Leonhardt <frank2 at fjl.co.uk> wrote:
>> > Swap areas have been replaced by page areas on disk, but the name stuck.
>> 
>> Should the installer then be creating a dedicated swap partition? It
>> seems not.
> 
> 	Yes of course it should, it's the place where pages that aren't
> backed by storage can be written to when needed.

Possibly not as true today as it once was. You used to have a drive for 
swapping and/or paging, not a partition. It could be small and fast 
while the FS was on a large and slow drive. Using a partition instead of 
a drive doesn't give the same advantage.

When it was swapping the variable length process could be written 
sequentially to a slot on the swap file. Not so much with pages; they 
get fragmented whatever you put them on (file or partition). At least 
with a dedicated partition the head movements are short stroked - except 
when they're interleaved with FS accesses because it's all the same head 
anyway.

So why not use a page file instead? Or better still multiple page files 
spread across all available physical disks?

Some people might not know that you can add and remove multiple paging 
spaces even while the system is running. More here:

http://blog.frankleonhardt.com/2011/large-swap-files-on-freebsd-die-with-mystery-killed-howto-add-lots-of-swap-space/





More information about the freebsd-questions mailing list