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

Re: Current SSD setup recommendations for laptop with Debian



On 7/4/2012 5:42 PM, green wrote:
> Nick Lidakis wrote at 2012-07-04 16:15 -0500:
>> I'm not a tweaker; I need to get work done on my laptop. Also, I need the
>> drive to perform reliably for as long as possible. My data is important to me
>> and I try to use my computer hardware for as long as possible --not
>> subscribing to the idea of disposable consumerism that is prevalent today.

Whether you subscribe to it or not, consumerism is thrust upon you, all
of us, and there's little/nothing we can do about it.

> This is precisely why I have purchased a Crucial m4 and researched alignment, 
> TRIM, etc.  I would like to see the particular build I am working on last for 
> 10+ years, as previous systems have, as a production workstation.

You won't get anywhere near 10 years from that Crucial SSD.  And it very
likely won't fail due to worn out cells.  Odds are much greater that a
capacitor, resistor, or voltage regulator in the power supply section
will fail much sooner.  These discreet components cost fractions of a
cent to a few tens of cents each.  Flash chips cost a few dollars to
tens of dollars each.  What do you guess the design lifetime of a $0.005
resistor or capacitor is?  Far less than 10 years.  And there are dozens
of them on an SSD PCB, in both the power section and on the bus lines to
each flash chip to correct signal skew.

Takeaway:  one need be far more concerned with discrete component
longevity than flash cell life.  How does one select a make/model of SSD
that *will* last 10 years?  You can't.  Recall 'consumerism' from above.
 Electronics companies don't make SSDs to last this long.  If they did
they'd go out of business from lack of sales.

> With my limited understanding of wear-leveling, TRIM especially seems (to me) 
> to be important for long-term reliability (provide the controller with true 
> 'free space' to work with).  Anyone, feel free to enlighten me.

TRIM has a performance effect but does far less for minimizing write
amplification and maximizing cell life than firmware wear leveling does.
 The additional performance gained from TRIM varies widely from one SSD
to another, and is dependent on the type of TRIM used (realtime vs
batch) and the write patterns of the applications and filesystem.  For
the OP's laptop use scenario, it won't make a lick of difference.

> Use gdisk (GPT partition table) if possible; it automatically aligns (start 
> of) partitions at 1MB ("sector alignment" = 2048).

Again, not critical for normal desktop applications, and it depends on
the erase block size of the SSD, which typically isn't available.

> Create ext4 partition with:

EXT4 is a filesystem, not a partition.

> `mkfs.ext4 -b -4096 -E stride=128,stripe_width=128 /dev/sda1`

And using stride and stripe_width is precisely the kind of useless
nonsense I previously described.  Some SSDs may benefit from this,
others may suffer horribly, or will require different parms for
"optimal" performance.  This is squarely in "tweaker" land.

> Add discard option to `/etc/fstab` *or* set up a fstrim cron job.

Best to do it via cron, if at all, as the the realtime option currently
has a greater latency than simply letting the filesystem/SSD do an
overwrite.

> Test with `fstrim` in the util-linux package and/or see 
> <http://blog.alexanderkoch.net/2011/testing-trim-with-luks-on-lvm/>.
> 
> If you are doing a new squeeze install, you probably want to set up the 
> partitions and filesystems yourself before the install (or using the alt-f2 
> console, before the 'partition disks' step), then select 'keep existing data' 
> (use the empty filesystem).  If you are doing encryption, perhaps create the 
> encrypted partition with the installer, then backup, re-format, and restore 
> the encrypted partitions using eg. grml.

Can you quantify the added performance Nick will see in day to day
desktop/laptop application use if he jumps through these hoops, vs doing
a standard install?  I didn't think so.

But it all looks good on 'paper', don't it?

> Hope this helps.

Given Nick's use case, you've simply muddied the water.  Nick came here
to, presumably, get a clear view, which I attempted to give him.  Now
the tweakers have arrived to confuse him again...

-- 
Stan


Reply to: