Why doesn't ubuntu turn on discard mount option for ssd drives that support it? Or, alternatively, include a cron-job to run fstrim periodically ? The aim of this question is to understand the technical difficulties and the reasons behind that decision and not to discuss a bug or a feature request.

  • This should probably be discussed in a bug report, and with the Release Team and Tech Board, and possibly on the ubuntu-devel mailing list. While a perfectly reasonable question, "why is X [not] the default in Ubuntu?" is not generally a good thing for Ask Ubuntu. – dobey Dec 16 '13 at 20:15
  • Unless the answer is clear @dobey :D TRIM is not good enough -yet-. – Rinzwind Dec 16 '13 at 20:17
  • @Rinzwind Even if the answer is clear for previous releases, that may change in the coming, or future releases. Discussion about why and how to improve things to make them the default are better suited to the mailing lists, and bug reports, not on Ask Ubuntu. Even in your answer you say "hopefully in 14.04" but development releases are also off topic. :) – dobey Dec 16 '13 at 20:46
  • @dobey, How can someone know if it's a bug, a known issue, or to be included in a future release?! Regarding mailing list, the stackexchange is here to replace those dinosaurs. – Erb Dec 16 '13 at 21:10
  • Ask Ubuntu is not here to replace mailing lists. It is not a discussion forum. There is a Discourse instance now, which is for discussion. And looking just now, I see this: discourse.ubuntu.com/t/ssds-are-now-trimmed-by-default/1346 – dobey Dec 16 '13 at 21:13

Ubuntu always goes for stable before cutting edge and TRIM is not perfect yet.

A couple of quotes:

The reason Ubuntu doesn’t TRIM SSDs by default is because the Linux kernel’s implementation of TRIM is slow and results in poor performance in normal use. Source

From OpenSuse:

The kernel implementation of realtime trim in 11.2, 11.3, and 11.4 is not optimized. The spec. calls for trim supporting a vectorized list of trim ranges, but as of kernel 3.0 trim is only invoked by the kernel with a single discard / trim range and with current mid 2011 SSDs this has proven to cause a performance degradation instead of a performance increase. There are few reasons to use the kernels realtime discard support with pre-3.1 kernels. It is not known when the kernels discard functionality will be optimized to work beneficially with current generation SSDs.

Ubuntu is also looking at enabling TRIM automatically by having the system regularly run fstrim. This will hopefully be part of Ubuntu 14.04 so Ubuntu users won’t be forced to deal with SSD performance degradation or run fstrim on their own. Source

Update: fstrim (fstrim-all) was added to 14.04 in the new util-linux package (2.20.1-5.1ubuntu11)

| improve this answer | |
  • fstrim (fstrim-all) was added to 14.04 in the new util-linux package (2.20.1-5.1ubuntu11 – doug Dec 18 '13 at 15:47
  • Nice :) Ill edit that in @doug – Rinzwind Dec 18 '13 at 16:07
  • like alot of changes/additions not openly documented except in source changelog. So users should read, to note- It's set to run as a weekly cron job. That behavior can be altered/edited if desired there. Likely there is also a new man, didn't yet ck. – doug Dec 18 '13 at 18:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.