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

Re: If btrfs is a way to save my SSD. Then what is for swap?

Am Freitag, 2. November 2012 schrieb Darac Marjal:
> On Fri, Nov 02, 2012 at 01:48:00AM -0500, Stan Hoeppner wrote:
> > On 11/2/2012 12:05 AM, Magicloud Magiclouds wrote:
> > > SSD like samsung 840 (TLC) only has 1k write times. Swap directly
> > > on it would not be horrible?
> > 
> > Your question I presume:  "Is SSD suitable for a swap partition?"
> > 
> > Answer:  Yes, all SSDs are much faster than mechanical HDD for swap
> > duty
> > 
> > Reason:  SSDs have no rotational latency
> I believe Magicloud's point was actually due to the limited number of
> writes available on an SSD.
> Cons:
>   A swap partition doesn't support TRIM, so deleted pages will be
>   deleted (written) immediately. However, I suspect swap doesn't
>   actually delete data very often (just marks it as unneeded).
> Pros:
>   Swap is mostly read, rather than written, so an SSD should benefit
> Alternative:
>   Try a swap file on an ext4 partition. That will allow you to make use
>   of the TRIM function via the ext4.

Not for the swap file itself which may not be fully used. Well you could 
remove swap file, then fstrim, then add it back again from time to time 

Anyway, whenever data is overwritten a trim is not needed, cause the SSD 
knows that is can reclaim the old blocks.

Thus it might be could to size the swap partition reasonably.

That said, 1k write times? What is that figure.

And Intel SSD 320 has something along the line of 20 GB or so per day for 
at least three years. Any good SSD should take writes in that amount.

Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

Reply to: