Ubuntu logo

Developer Summit

Enable automatic trimming of SSD drives

2013-11-19 16:05..17:00 in Core 2

SSDs need to be TRIMed, i. e. they need to be told which blocks the OS considers as "unused" (i. e. from deleted files). Withouth this, the write speed on SSDs becomes unbearably slow over time.

http://wiki.ubuntuusers.de/SSD/TRIM explains the details, but this kind of housekeeping really should happen by default. There are two approaches to this, immediately marking the blocks as unused when deleting a file ("discard" mount option), or calling fstrim regularly. discard slows down deletion while a cronjob occasionally puts some potentially unexpected IO load on the machine, so this discussion is primarily about deciding which approach we want to do by default.

I (Martin Pitt) think that a cron approach is better. If we go with this we need to discuss when and how to run this: * Whats a reasonable interval (weekly/monthly/etc.) * How to detect devices/partitions which need trimming (/proc/mounts, hdparm -I, not mounted with "discard", etc.)