Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 54506  / 2 Years ago, tue, may 31, 2022, 8:31:32

After checking test blog posts from different authors, I know EXT4 is the fastest for 3y already in 2011. However, there are also other settings that make an SSD faster which I found in: http://www.howtogeek.com/62761/how-to-tweak-your-ssd-in-ubuntu-for-better-performance/


sudo gedit /etc/fstab



  • Add to / partition noatime,nodiratime

  • If kernel is >2.6.33, also add discard

  • tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0


And https://wiki.ubuntu.com/MagicFab/SSDchecklist


sudo gedit /etc/fstab



  • Add to / partition noatime, and that's it



  • And the data=writeback mounting option _if you formatted the disk without journaling. Otherwise add data=ordered which s[h]ould be a good compromise between full journaling and none at all.



  • tmpfs /tmp tmpfs nodev,nosuid,noexec,mode=1777 0 0




Why only noatime?
How can I know if the disk is without journaling from installation?
What's faster? No Journaling or opposite? And diff no journaling data=writeback or journaled data=ordered?


Why tmpfs /tmp differs in both articles, how do they differ, and which is better and why?


All of this is about SSD, but can I use the same settings in HDD?
I want to find an answer for HDD and SSD as I've made one-time scripts for setting it up in my https://wiki.ubuntu.com/Kangarooo/AfterCleanInstallation.


More From » hard-drive

 Answers
1

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.


[#42087] Thursday, June 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bearous

Total Points: 226
Total Questions: 116
Total Answers: 136

Location: Guernsey
Member since Sun, Jan 10, 2021
3 Years ago
;