1 |
On Mon, Jul 22, 2013 at 4:42 PM, Stefan G. Weichinger <lists@×××××.at> wrote: |
2 |
> Am 19.07.2013 21:02, schrieb Paul Hartman: |
3 |
> |
4 |
>> Old SSDs that did not support TRIM would suffer write amplification |
5 |
>> after a certain amount of data had been written to them, but any |
6 |
>> modern SSD and modern OS will keep it nice and tidy. |
7 |
> |
8 |
> What's the "best practice" now for TRIM? |
9 |
> |
10 |
> I changed to manual "fstrim -v /" back then as they wrote that the |
11 |
> fstab-options weren't the right way of doing it. |
12 |
> |
13 |
> Any news on this? |
14 |
> |
15 |
> I have root-fs on ext4, btw ... |
16 |
|
17 |
I think it depends on your usage patterns. "discard" will trim unused |
18 |
space immediately as files are deleted. Putting fstrim in your cron |
19 |
jobs will wait to free all unused space at once. |
20 |
|
21 |
If you delete many files, or large files, you may notice performance |
22 |
slowdowns by using discard. On the other hand, if your SSD is near |
23 |
full you may benefit from discard to allow faster write speed before |
24 |
the cron job runs. |
25 |
|
26 |
As far as I remember, some filesystems don't support "discard" option, |
27 |
but do support fstrim. So fstrim job may be "safer" as generic |
28 |
advice... and it was older advice, before "discard" existed, so old |
29 |
SSD guides may refer to it by default. |
30 |
|
31 |
I personally use "discard" with ext4 and btrfs, but I have not done |
32 |
tests or have evidence that it is the best choice for me. It's simply |
33 |
what I chose and never changed it. :) |