Fedora Linux Support Community & Resources Center
  #1  
Old 8th December 2016, 05:46 PM
antikythera Offline
Administrator
 
Join Date: Dec 2013
Location: United Kingdom
Posts: 3,446
linuxchrome
Post SSD configuration with Fedora 24

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:

before
Code:
/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
after
Code:
/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
Code:
su -c 'hdparm -I /dev/sda' | grep TRIM
b. if it does run this command to enable the timer
Code:
systemctl enable --now fstrim.timer
3. Limit swap usage by editing /etc/sysctl.conf with root rights and adding the following two entries:
Code:
vm.swappiness=1
vm.vfs_cache_pressure=50
save the changes and return the the terminal. then make them active by issuing the command
Code:
sysctl -p
4. Finally, enable an SSD friendly I/O schedule mode

Edit /etc/default/grub with root rights and add the command elevator=deadline before rhgb silent on the boot command line. Save the changes.

then in terminal you need to rebuild grub for your bootloader again with root rights.

for Legacy systems issue the command:

Code:
grub2-mkconfig -o /boot/grub2/grub.cfg
for UEFI systems:

Code:
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
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.

sources:
http://www.certdepot.net/rhel-7-extend-life-ssd/
stevea's guide - http://forums.fedoraforum.org/showpost.php?p=1559050
__________________
Download, Install and Share Fedora - Official ISO Torrents | Live ISO Respins containing post-release updates

Last edited by antikythera; 9th December 2016 at 03:29 PM. Reason: fstab changes suggested by dd_wizard applied
Reply With Quote
  #2  
Old 8th December 2016, 09:19 PM
dd_wizard Offline
Registered User
 
Join Date: Sep 2009
Posts: 1,923
linuxfedorafirefox
Re: SSD configuration with Fedora 24

One minor suggestion. The option "defaults" is really a placeholder. once you add options like noatime, you should drop it. As in:
Code:
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
dd_wizard
Reply With Quote
  #3  
Old 8th December 2016, 11:15 PM
tankist02 Offline
Registered User
 
Join Date: Feb 2009
Posts: 89
windows_7chrome
Re: SSD configuration with Fedora 24

Why do you need discard if you enabled fstrim.timer?
Reply With Quote
  #4  
Old 8th December 2016, 11:24 PM
dd_wizard Offline
Registered User
 
Join Date: Sep 2009
Posts: 1,923
linuxfedorafirefox
Re: SSD configuration with Fedora 24

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.

dd_wizard
Reply With Quote
  #5  
Old 9th December 2016, 12:52 AM
antikythera Offline
Administrator
 
Join Date: Dec 2013
Location: United Kingdom
Posts: 3,446
linuxchrome
Re: SSD configuration with Fedora 24

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
__________________
Download, Install and Share Fedora - Official ISO Torrents | Live ISO Respins containing post-release updates
Reply With Quote
Reply

Tags
fedora, setup, ssd

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 21 with two NIC configuration daredavil82 Servers & Networking 0 30th September 2015 07:22 PM
Usb Modem Configuration with fedora 11-Help! vyver Hardware & Laptops 3 9th November 2009 01:02 AM
Fedora service configuration trangdo4987 Servers & Networking 2 1st June 2008 03:47 AM
application configuration for Fedora 4 pengyou12345 Using Fedora 0 7th July 2005 08:03 PM


Current GMT-time: 11:59 (Friday, 20-01-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat