Best /etc/fstab settings for boosting SSD/HDD performance

The howtogeek site is the more responsible of the two sites you mentioned. The atime tweaks are just metadata optimization that pipeline when a file will receive a certain timestamp update. It's applicable regardless of the media you use, it also depends on how sensitive your application is to the coherency of that metadata. Most desktop users won't miss it.

Now as for disabling journaling... that's just crazy. That's the whole point of using these advanced file systems: better performance while securing data integrity. Understand that if you make this trade you're exchanging your personal data for a modest increase in speed. I personally wouldn't recommend it. Most people don't keep good backup's to begin with to compensate for taking this risk.

Partition alignment does matter but not tweaking that bit won't kill you either. It really depends on how heavily the disk is accessed. Assuming it's unaligned, if you had tons of I/O going on a regular basis (server) you would see an improvement. On average desktop usage, who knows, probably not appreciable.

I would disregard that Ubuntu wiki you mentioned except for the notion that partition alignment is valuable. Here's a more responsible link:

http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/index.html?ca=dgr-lnxw074KB-Disksdth-LX

Some of the recommendations in that Ubuntu wiki are just plain wrong, like the reconfiguration of tmpfs using "nodev". It's already a RAMFS!

Moving firefox cache to /tmp may increase speed in your current session. Though it might be a security hazard (not secured in your home anymore) and it will be rebuilt on each boot since tmpfs isn't persistent.

Summary:

Adding discard to ext4 options is prudent, writeback is the default mode, leave journaling settings alone, the atime tweaks are fine, and the switch to deadline or nop scheduler might also be useful, partition alignment is optional. The rest is bunk.


The discard option is no longer suggested for SSD-hosted filesystems, as it slows things down because the Linux kernel has a non-optimized implementation of the command. (IIRC, TRIM requests only use one ATA sector range at a time, making it slow.)

Instead, create a daily cron job that runs fstrim -v / (or whatever your SSD partitions are). This is the solution that Ubuntu 14.04 LTS will be shipping with.


Do not enable 'noexec' on /tmp or you will face problem with certain 3D drivers which require executing from /tmp. NVIDIA drivers for modern hardware have this requirement, any application you have will segfault (like xscreensaver glmatrix) if you have 'noexec' enabled.