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.
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
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)