Ubuntu – What SSD optimization are needed on latest Ubuntu version

performancessd

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 ?

Best Answer

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)

Related Question