Ubuntu: What SSD optimization are needed on latest Ubuntu version?


I have read of a lot of questions about SSD optimization (How do I optimize the OS for SSDs?, Installing Ubuntu on a SSD, I'm confused about SSD optimization, etc...).

Most of those questions seem outdated (3+ years old) and I am a little bit confused with all the directions the answers are taking.

So my question is : As of today, what is the general consensus about SSD optimization on Ubuntu 14.04 / 15.04 ?

Is this even needed now ?


The thing is , first most important part about SSDs is minimizing the writes to the disk, which is why people add nodiratime, noatime to the /etc/fstab file.

Second , is running TRIM which reclaims unused blocks of NAND memory back to SSD. Windows has TRIM enabled by default, AFAIK, so no one bothers there. With Ubuntu, it does have a weekly cronjob for TRIM, however for I've learned from Rinzwind's answer that the cron job only runs on Intel and Samsung SSDs. That's why you have to edit that /etc/cron.weekly/fstrim file to have exec fstrim-all --no-model-check line, so that it runs no matter what is your SSD model.

Over the recent years, this has not changed - these are still key points , minimizing writes and enabling TRIM.

Removing writes and expensive storage amount is the two factors why people also remove swap area. By default, Ubuntu creates swap partition equal to your RAM size. I have a 128 SSD and 6 GB of RAM. That means that by default Ubuntu will chop off 6 GB from 128GB, leaving 122GB for my OS, and 5% is typically reserved for root, so that leaves me 122-122*0.05=115.9 GB for myself. I might as well use that storage for something else, which is why I have only one main partition, no swap partition, but I do have a 512 MB swap file as a protective feature (not that I plan on running out of RAM, but it's always recommended to have swap)


It works fine with SSD which supports TRIM

for 16.04 there is no


simple fstrim does not have --no-model-check and it works fine with sandisk ssd


The only thing you may need to do is to add --no-model-check to /etc/cron.weekly/fstrim.

The line should look this way

exec fstrim-all --no-model-check     

Check that your SSD supports TRIM (almost all recent models do) by

sudo hdparm -I /dev/sda | grep "TRIM supported"  

if your SSD is /dev/sda. If it does, add --no-model-check.


Generally Ubuntu supports Solid State Drives very well.
If you have an intel or a SAMSUNG SSD, automatic trim support is enabled by default.

You don't have to care about much with one exception:
You should store your personal data on a HDD to reduce the amount of writes to SSD.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »