[GTALUG] SSD wear leveling [was Re: Build critique request and the story behind it.]

Russell rreiter91 at gmail.com
Tue Nov 21 09:59:25 EST 2017



On November 20, 2017 3:44:37 PM EST, "D. Hugh Redelmeier via talk" <talk at gtalug.org> wrote:
>| From: Lennart Sorensen via talk <talk at gtalug.org>
>
>| Wear leveling ought to mean it doesn't matter how you partition
>though.
>| If you want to reduce wear, don't write to it.
>
>True, but it is more complicated.
>
>Underneath the facade of a normal HDD, an SSD does a bunch of tricky
>things.

<trim the middle>

>Consequences:
>
>- having a lot of free physical blocks cuts down on write amplification
>
>- the effect is non-linear
>
>- to increase the number of free blocks
>
>  + use trim
>    * fstrim(8)
>    * trimm option to mount
>
>  + allocate less of the disk drive for OS use.

How would you suggest swap discard policy be handled? I have read about some people with fast systems setting 0 swap without issues, it's not a recommended practice tho. 

swapon, --discard[=policy] Enable swap discards, if the swap backing device supports the discard or trim operation. This may improve performance on some Solid State Devices, but often it does not. The option allows one to select between two available swap discard policies: --discard=once to perform a single-time discard operation for the whole swap area at swapon; or --discard=pages to asynchronously discard freed swap pages before they are available for reuse. If no policy is selected, the default behavior is to enable both discard types. The /etc/fstab mount options discard, discard=once, or discard=pages may also be used to enable discard flags. 

I had tentatively planned a very minimal swap on the SSD and to place any /extraswap on a HDD should it prove to be necessary. I was also going to try out using systemd units rather than fstab entries.

https://www.commandlinux.com/man-page/man5/systemd.swap.5.html

Black friday happened yesterday on a Monday (go figure) and my Newegg cart dropped my CPU choice as N/A, also Amazon refunded my 3TB drive choice, also probably N/A.

Right now I have a delivery label for the SSD, so I'm pretty sure it's on its way.

Sometimes I install three or four times until I'm satisfied with the balance of a partitioning scheme. That's usually on reclaimed or RMA new old stock. I'm not sure that I want to format and reformat a new SSD that way, so I think I'd like to try and get this one up with optimal housekeeping on the first go, if possible, so any comments are most helpful.

>    But, if it isn't a new disk, you have to tell the SDD firmware
>    that the free space is free.  I don't know how to do that.
>---
>Talk Mailing List
>talk at gtalug.org
>https://gtalug.org/mailman/listinfo/talk

Thanks. 
-- 
Russell


More information about the talk mailing list