View Full Version : SSD configuration with Fedora 24 onwards

8th December 2016, 05:46 PM
Consider this sharing of information rather than a guide or tutorial. It's what I ended up settling on today after reading the many guides about this topic on the internet. I settled on a fairly current guide for RHEL 7 so most of this is duplicating that information.

Installation works much the same way as to a mechanical drive. You plug in the USB thumb drive or insert the optical media and go through the normal setup routine (see the note at the end of this post regarding partition alignment which is actually something you should have been doing with mechanical AFT drives too). The major difference being a couple of tweaks you can apply afterwards to reduce writes and maintain drive health.

Most modern SSD drives have firmware that features garbage collection which supposedly negates the use for running TRIM if an OS doesn't support it. Garbage collection occurs when the system is idle but takes a while to complete. TRIM on the other hand can be scheduled simply by enabling the fstrim timer these days in Fedora. So it's entirely optional whether to use garbage collection or TRIM.

1. switch off timestamp writes every time a file is accessed

with root rights edit /etc/fstab and add noatime to each drive entry string:

/dev/mapper/luks-419802a7-681c-435f-898d-47aa52b2d20a / xfs defaults,x-systemd.device-timeout=0 0 0
UUID=bbedb204-f646-4b38-a8b1-05ea18b4b3e1 /boot ext4 defaults 1 2
UUID=CCDF-0ED0 /boot/efi vfat umask=0077,shortname=winnt 0 2
/dev/mapper/luks-3df3f1c3-f240-4577-b635-27b9d8d2afd7 /home ext4 defaults,x-systemd.device-timeout=0 1 2
/dev/mapper/luks-9db12648-093a-4b66-9c1a-943e6edcccb2 swap swap defaults,x-systemd.device-timeout=0 0 0

/dev/mapper/luks-419802a7-681c-435f-898d-47aa52b2d20a / xfs noatime,x-systemd.device-timeout=0 0 0
UUID=bbedb204-f646-4b38-a8b1-05ea18b4b3e1 /boot ext4 defaults 1 2
UUID=CCDF-0ED0 /boot/efi vfat umask=0077,shortname=winnt 0 2
/dev/mapper/luks-3df3f1c3-f240-4577-b635-27b9d8d2afd7 /home ext4 noatime,x-systemd.device-timeout=0 1 2
/dev/mapper/luks-9db12648-093a-4b66-9c1a-943e6edcccb2 swap swap noatime,x-systemd.device-timeout=0 0 0

2. optional if your drive's firmware can run garbage collection - find out if your drive supports TRIM and permanently enable the fstrim timer using the following command with root rights:

a. first find out if your drive supports trim

su -c 'hdparm -I /dev/sda' | grep TRIM

b. if it does run this command to enable the timer

systemctl enable --now fstrim.timer

3. Limit swap usage by editing /etc/sysctl.conf with root rights and adding the following two entries:


save the changes and return the the terminal. then make them active by issuing the command

sysctl -p

4. Finally, enable an SSD friendly I/O schedule mode by adding elevator=deadline to the kernel boot parameters with grubby:

sudo grubby --update-kernel=ALL --args='elevator=deadline'
NB - partition alignment during OS installation. I cheated here and set them up as blank partitions in Windows 8 after shrinking my data partition to make space for Fedora using the Disk Management Tool. This ensures the new partitions are properly aligned to 4K clusters.

to align partitions manually in Fedora please refer to stevea's possibly out of date in parts but very comprehensive guide.

stevea's guide - http://forums.fedoraforum.org/showpost.php?p=1559050

8th December 2016, 09:19 PM
One minor suggestion. The option "defaults" is really a placeholder. once you add options like noatime, you should drop it. As in:

UUID=e726010c-d129-4895-91db-7fb3f2888d86 / btrfs noatime,discard,subvol=root 0 0
UUID=15127f8e-008e-45e9-b06b-90c49f95e286 /boot ext4 noatime,discard,data=writeback 1 2
UUID=0AF0-160E /boot/efi vfat noatime,discard,umask=0077,shortname=winnt 0 2
UUID=e726010c-d129-4895-91db-7fb3f2888d86 /home btrfs noatime,discard,subvol=home 0 0
UUID=e726010c-d129-4895-91db-7fb3f2888d86 /var btrfs noatime,discard,subvol=var 0 0
UUID=f3f022c0-aebd-4494-8345-e9d822902a17 /mnt/Data ext2 noatime,nosuid,nodev,nofail,x-gvfs-show 0 2
UUID=f15f7f6e-3dfa-4cba-a612-6bc6a0f00a31 /home/gene/.local/share/libvirt/images ext4 noatime,discard 0 2
UUID=7d6415c7-caab-4543-a1d2-b1a0f3d2b0b4 /home/gene/VirtualBox\040VMs/thinlv ext4 noatime,discard 0 2


8th December 2016, 11:15 PM
Why do you need discard if you enabled fstrim.timer?

8th December 2016, 11:24 PM
You only need one. I've had good results with discard instead of fstrim. Only once did I notice any serious lag from discard, in over a year of usage. But, installing the infinality font bundle with --allow-erasing did lag the system for almost a minute.


9th December 2016, 12:52 AM
Thanks for that dd_wizard, I'm all for removing surplus code. I just followed the guide I found for adding noatime. As defaults is surplus to requirements I'll remove it from fstab next time I boot the machine and update the above original post when I'm not using a kindle fire hd to browse the forum. It's a pain in the backside to edit posts containing code with

13th June 2017, 04:42 PM
Firefox browser tweaks collated from other threads:

Someone posted a page about how Firefox browser.sessionstore feature uses up a lot of your SSD write life because it's defaulted to 15 seconds


I personally set mine to toggle all the enabled flags related to browser.sessionstore to false and set the interval to 3600000 (one hour in msec). I don't see the value in storing tab information for a crash, isn't that what history is for?

set browser.sessionstore.max_tabs_undo and browser.sessionstore.max_windows_undo to 0.

browser.cache.disk.enable false
browser.cache.memory.max_entry_size 65536