SSD configuration with Fedora 24 onwards
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    6,382

    Post SSD configuration with Fedora 24 onwards

    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 by adding elevator=deadline to the kernel boot parameters with grubby:

    Code:
    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.

    sources:
    http://www.certdepot.net/rhel-7-extend-life-ssd/
    stevea's guide - http://forums.fedoraforum.org/showpost.php?p=1559050
    Last edited by antikythera; 17th November 2017 at 09:18 PM. Reason: simplified step 4 by use of grubby

  2. #2
    Join Date
    Sep 2009
    Posts
    2,184

    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

  3. #3
    Join Date
    Feb 2009
    Posts
    126

    Re: SSD configuration with Fedora 24

    Why do you need discard if you enabled fstrim.timer?

  4. #4
    Join Date
    Sep 2009
    Posts
    2,184

    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

  5. #5
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    6,382

    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

  6. #6
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    6,382

    Re: SSD configuration with Fedora 24 onwards

    Firefox browser tweaks collated from other threads:

    Quote Originally Posted by marko
    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

    https://www.servethehome.com/firefox...how-to-fix-it/

    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

Similar Threads

  1. Replies: 7
    Last Post: 11th March 2017, 05:45 PM
  2. F24 onwards GRUB workaround for Windows black screen dual-boot issue (UEFI)
    By antikythera in forum Guides & Solutions (Not For Questions)
    Replies: 2
    Last Post: 14th December 2016, 06:16 PM
  3. [SOLVED]
    Screen too bright (kernel 2.6.32.9-70 onwards)
    By Mr Wolf in forum Hardware & Laptops
    Replies: 6
    Last Post: 6th April 2010, 02:07 PM
  4. Error 80 on Fedora 9 onwards
    By Deathkarr in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 29th November 2009, 02:04 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •