laptop advice time...

Jamon Camisso jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Fri Aug 23 14:48:23 UTC 2013


On 23/08/13 10:41 AM, D. Hugh Redelmeier wrote:
> | From: Jamon Camisso <jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org>
> 
> | I have a fully luks encrypted disk with TRIM support running Debian. It
> | takes 3 things:
> | 
> | 1) add these options to GRUB_CMDLINE_LINUX: allow-discards root_trim=yes
> | 2) add "discard" to relevant partitions in /etc/crypttab
> | 3) issue periodic fstrim commands. I do this once a day with cron
> 
> I would have thought that 2 and 3 do the same job in different ways.
> 2 acts earlier, so 3 would be redundant.
> 
> I admit that I don't really understand the subtleties of TRIM on
> different abstraction layers (real disk vs virtual decrypted disk).
> 
> With luks, is there a simple one-to-one correspondence between encrypted 
> and decrypted blocks?
> 
> I would be surprised if discard and fstrim are both useful: one or the
> other should do the job.  I don't know which is better, but some
> advocate fstrim over discard and I don't remember any advocating
> discard over fstrim.
> 
> | From: Lennart Sorensen <lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org>
> 
> | TRIM helps performance, but other than that should not actually affect
> | the lifespan of the device.
> 
> I don't think that that is correct.  TRIM avoids useless copying, and
> all writes are likely to cause SSD wear.

TRIM in /etc/fstab is generally considered a bad idea as it can run as
many times as the filesystem does writes.

Manually running fstrim requires that discards be allowed by both the
kernel, and by the dm-crypt driver is my understanding.

So all three options make for robust TRIM support, though you could do
away with part 3 if you wanted to increase wear on the drive a bit.
Lifespan ratings for SSDs are pretty high these days, I'd expect one to
last just as long as spinning disks. I've had a 60GB for 3 years and it
is still going strong.

Cheers, Jamon
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list