On Fri, 13 Dec 2013 11:11:44 +0100 Martin Pitt <[email protected]> wrote: > Modern SSDs need regular TRIMming [1] to retain their performance. > Without it, write performance severely (like 1/50th) goes down over > time, as writing a single block incurs reading/updating/writing back > several physical blocks. > > There are two main methods for doing this, synchronously using the > "discard" mount option or asynchronously using fstrim [2]. Colin King did > some extensive benchmarking and found that on desktops and servers you > usually want a cron'ed fstrim [3].
This assumes that you can handle a disk-heavy job running via cron, rather than distributing the overhead over time. (That link mentions fstrim running for a long time even when run on a daily basis, let alone weekly.) Sometimes you want to maximize peak performance at the cost of extra overhead at specific times; sometimes you want consistent performance and no downward spikes. Ideally, I would suggest that we start enabling the "discard" option by default in d-i. That would also avoid spinning up a periodic cron job that runs regardless of actual need or disk activity. (One of the things I really wish we could do more easily is eliminate the numerous cron jobs that simply wake up, realize they have no work to do, and go back to sleep.)

