[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?



AFAIK, TRIM mostly results in writing performance. It will lengthen the life a little, but not on purpose. So btrfs' copy-on-write is almost the only thing really lengthen the life.
But sadly, btrfs does not support swap file yet.
And, 1k times, that is from the news of Samsung's TLC chip, which is belived to be used in its SSD of next model.
Of course, Intel or other brands would be nice, but Samsung is so cheap....


On Fri, Nov 2, 2012 at 8:59 PM, Martin Steigerwald <Martin@lichtvoll.de> wrote:
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
tough.

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201211021359.22806.Martin@lichtvoll.de" target="_blank">http://lists.debian.org/201211021359.22806.Martin@lichtvoll.de




--
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.

Reply to: