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

Re: Swap



Hi Stefan

I noted your SSD reference below, and have the following comments. 

The artice describes first generation SSD devices and kernel version 2,x.  Newer devices offer a 10 times increase in read/write performance, compared to the SSDs described in the article.

Some SSD microcode software, if not all, include ECC checking at the micrcode level.
The SSDs microcode's job is to also do wear levelling. And the code does this quite well.

Older drives did not try to sustain an available free page queue. Page recovery requires a scan. Newer SSDs maintain a discard page queue. For older drives, the user has to manually run fstrim to reclaim used pages. Newer drives can be set to programatically, on their own, transfer the contents of the latter to the tail end of the former. You can also set up the discard option as an fstab parameter.

There is nothing wrong in using SSDs for a swap area.  In a server, an SSD swap file is a benefit when there is an over commitment of ram.  Swapping is up to 100 times faster than using a Hard disk. And, I would say, the SSD will probably outlive your computer or server. 

The reason swap is placed on hard disk is because of high SSD cost and low utilization. We want as much free space on an SSD as possible, considering the purchase price and low capacity (typically 128gig or 256gig). For most desktop systems, the only real swap activity is when a hybernate or sleep suspend is invoked.

My 128gig SSD is in its third year of use. My 8gigs of swap partition are on it.  For my needs (5 x 8hr work) and 24/7 uptime,  I did not bother placing the swap on a hard disk. I run fstrim twice a week as a crontab job.  I backup the SSD to a hard disk.

After 5 years of use,I will move the SSD to my replacement computer. The SSD will still be working at 100%.  

My SSD does not support SMART   Newer SSDs do. 

Leave the swap partition on the SSD.

 
Regards

 Leslie
Mr. Leslie Satenstein
Montréal Québec, Canada




From: Stefan Monnier <monnier@iro.umontreal.ca>
To: debian-laptop@lists.debian.org
Sent: Friday, February 5, 2016 11:51 AM
Subject: Re: Swap

> As for SSD specifics pls read https://wiki.archlinux.org/index.php/SSD
> it's a nice overview. As you can see, for SSD, any disk operation is 'bad'
> so you would try to put as much I/O as possible into RAM, for example avoid
> swapping and following Matus' aboce suggestions.
> ('bad' meaning that once all SSD cells are filled, the drive will become
> much slower. You may have noted the same effect with USB pen drives / memory
> sticks or SD cards.)

It seems you're confusing wear out and the slow down seen when the drive
is full.

The technology used in Flash memory "wears out" after some number of
writes.  That's true.  But nowadays it's only a problem that SSD drive
manufacturers have to solve.  End users aren't affected
nowadays, really.

The technology used by drive manufacturers (called FTL) to solve the
above problem has performance implications which typically result in
slower operations when as the disk becomes "full" (for some definition
of "full" as seen from the disk itself, which fundamentally has no idea
what filesystem is used and whether a block belongs to a file or not).
But here as well, this shouldn't significantly affect modern SSD drives
(typically because the manufacturer doesn't let you use all the memory
on the disk, so it's never really full, and because algorithms have been
improved the avoid pathological cases).

The FTL also incidentally introduces a significant amount of complexity
in the firmware which is a source of bugs.  This also affects the
reliability of SSDs.  But here, yet again, I haven't heard any horror
stories in quite a while, so it seems that it shouldn't be a real
concern for a modern SSD.

IOW, all in all, a modern SSD can be used "any way you like" without
taking any special measures, just like your old HDD, and you should
expect it to perform well and live a long life.  Even if it's "full" and
even if you swap to it like crazy (which won't be the case anyway,
since swap is so rarely used nowadays).


        Stefan




Reply to: