[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Swap space choice on a SSD <- Current best practice on?



On 2/13/19 5:41 AM, deb wrote:
Again -- fussing with a full (not from a live .iso) 9.7 install; the
Debian GUI installer is suggesting a Swap partition on a Kingston
SSD.

#1 Given that it's not great to pound the same area of a SSD with writes; is it indeed still best practice to go with a swap partition
on a SSD rather than a swap FILE?

(Or is this a legacy spinning hard disk install suggestion?)

On 2/13/19 5:46 AM, Michael Stone wrote:
That's not a thing: the SSD will balance writes physically across
the drive regardless of where they are logically.

+1

https://en.wikipedia.org/wiki/Wear_leveling


On 2/13/19 5:41 AM, deb wrote:
#2 How DO you get the installer to go with a Swap FILE?

Just delete that recommended Swap partition during the install?

I looked; but did not run across any best practice docs for Swap on
SSD.

On 2/13/19 6:11 AM, Dan Ritter wrote:
The installer doesn't have that option...

+1 AFAIK


A swap partition is faster than a swap file.


Backing up, archiving, imaging, restoring, etc., swap files is
wasteful, but modifying those operations to exclude/ regenerate swap
files adds complexity (and risk).


In my SOHO environment, all my machines have a single system drive and
my bulk data is in a file server.  When I first started using SSD's and
USB flash drives as system drives, I was worried about swap wearing out
the drive.  So, I tried running without swap.  This worked until
memory got low, then the machines crashed.  So, I added memory and
reinstalled with 1 GB swap partitions.


On 2/13/19 6:11 AM, Dan Ritter wrote:
If you want maximum SSD longevity, increase the amount of space that
the SSD can use for remapping by never writing to some amount of
space. Easiest is to not fill the disk with partitions -- leave 5-10%
empty.

AFAIK over-provisioning has no effect on longevity -- longevity is
proportional to total number of cells times rated erase/ write cycles
per cell divided by write throughput.


But, over-provisioning can improve write performance:

https://en.wikipedia.org/wiki/Write_amplification#Over-provisioning


Other SSD considerations include choice of file system, mount options,
kernel tuning, etc.:

https://btrfs.wiki.kernel.org/index.php/FAQ

https://en.wikipedia.org/wiki/Trim_(computing)

mount(8)

https://cromwell-intl.com/open-source/performance-tuning/disks.html


David


Reply to: