Results 1 to 5 of 5

Thread: [SSD] Recommendations

  1. #1

    Question [SSD] Recommendations

    Hello,
    I would like to ask you about configuration of SSD best/recommended practices in openSUSE Leap/Tumbleweed.
    You are certainly more experienced then me
    I want to use Goodram CX400 SSD drive.
    My installation:
    *45G / (encrypted btrfs with subvolumes)
    *the rest /home (encrypted btrfs with subvolumes)
    What should I configure?
    I've heard about trim, separated /tmp, zram/zswap, I/O Scheduler, disabling SWAP on SSD.
    Life and efficiency of SSD is very important for me.
    Thank you in advance
    PS. The best advises I would like to put on openSUSE Wiki for other users

  2. #2
    Join Date
    Apr 2021
    Location
    Munich
    Posts
    43

    Default Re: [SSD] Recommendations

    ahhhrrreeecccek2710,

    this reminds me of my purchase of an electric guitar, where the salesman told me never to plug the 1/4" mono cable between the amplifier and the guitar differently.
    So the side that was previously in the guitar should never ever be connected to the amplifier!

    A SSD is not a glass cannon. Most times a SSD will even survive your hard drive. They are much more temperature resistant shock resistant and are far less complex in structure. Most voodoo articles about SSDs don't mention that also hard drives can only handle a limited number of writes (and reads). This is not due to the material or technique, but to other mechanical reasons.
    In difference to SSDs their cycles can't be calculated and that is the reason why we are talking about operation times with hard drives rather than cycles and amount of writes.
    And that feels simply different - but it is not!

    As long as we are talking about a regular client computer, SSD usage should be a no-brainer. I remember an article several years ago in a german computer magazine where the vendor gives a guarantee of 150TB before the SSD will be broken. That means you have to write ~70GB of data every day for 6 years (no weekend, no vacation, etc. ...) to reach that limit. That is completely unrealistic in normal usage. Most times, you are just reading form your SSD. But even more...
    The 150TB limit were exceeded in that test by a factor of 30 to ~4000TB in reality.

    That is not a guarantee, but it may reduce your worries. You will simply replace your SSD in terms of more speed and capacity before you will reach that limit of cycles. And a backup is needed anyway for so many reasons.

    The most interesting option is: TRIM
    https://en.opensuse.org/SDB:SSD_performance#TRIM

    What makes sense and what is nonsense depends in my opinion strongly by your special needs or usage.
    For example, if you often compile software form source it could be a wise choice to do that in a tmpfs - also because the I/O on RAM is much higher.
    But, KISS -> Keep it simple, stupid

    The system should be comfortable for you and your needs. Not for the SSD.

  3. #3
    Join Date
    Mar 2020
    Location
    São Leopoldo, RS, Brazil
    Posts
    320

    Default Re: [SSD] Recommendations

    Quote Originally Posted by ahhhrrreeecccek2710 View Post
    My installation:
    *45G / (encrypted btrfs with subvolumes)
    *the rest /home (encrypted btrfs with subvolumes)
    What should I configure?
    I've heard about trim, separated /tmp, zram/zswap, I/O Scheduler, disabling SWAP on SSD.
    Life and efficiency of SSD is very important for me.
    btrfs recognizes the underlying device is SSD and does some optimizations. Also by default fstrim.service is enabled and an appropriate I/O scheduler is picked.
    /tmp is by default a tmpfs mount. See: https://en.opensuse.org/openSUSE:Tmp_on_tmpfs
    ZRAM is a good way to avoid swapping to your SSD drive. If you don't need hibernation then you don't even need a swap partition. Install systemd-zram-service and enable the zramswap service. It takes care of everything.

    Quote Originally Posted by ahhhrrreeecccek2710 View Post
    PS. The best advises I would like to put on openSUSE Wiki for other users
    openSUSE Tumbleweed

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,264
    Blog Entries
    15

    Default Re: [SSD] Recommendations

    Quote Originally Posted by awerlang View Post
    btrfs recognizes the underlying device is SSD and does some optimizations. Also by default fstrim.service is enabled and an appropriate I/O scheduler is picked.
    /tmp is by default a tmpfs mount. See: https://en.opensuse.org/openSUSE:Tmp_on_tmpfs
    ZRAM is a good way to avoid swapping to your SSD drive. If you don't need hibernation then you don't even need a swap partition. Install systemd-zram-service and enable the zramswap service. It takes care of everything.



    Hi
    Aside from the systemd one (It's a number of years old now but still works), there is also systemd-swap which allows different compression options via the conf file, I have it built here...
    https://build.opensuse.org/package/s...G/systemd-swap
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    2,659
    Blog Entries
    1

    Default Re: [SSD] Recommendations

    Quote Originally Posted by ahhhrrreeecccek2710 View Post
    Hello,
    I would like to ask you about configuration of SSD best/recommended practices in openSUSE Leap/Tumbleweed.
    You are certainly more experienced then me
    I want to use Goodram CX400 SSD drive.
    My installation:
    *45G / (encrypted btrfs with subvolumes)
    *the rest /home (encrypted btrfs with subvolumes)
    What should I configure?
    I've heard about trim, separated /tmp, zram/zswap, I/O Scheduler, disabling SWAP on SSD.
    Life and efficiency of SSD is very important for me.
    Thank you in advance
    PS. The best advises I would like to put on openSUSE Wiki for other users
    Forget all pesky details an go with defaults, e.g. have one small EFI System Partition:
    Code:
    3400G:~ # df -h /boot/efi/ 
    Filesystem      Size  Used Avail Use% Mounted on 
    /dev/sdc1       100M   32M   69M  32% /boot/efi 
    3400G:~ #
    The rest is allocated to a single BTRFS partition with standard subvolumes:
    Code:
    3400G:~ # btrfs subvolume list /mnt                   
    ID 256 gen 1480 top level 5 path @ 
    ID 257 gen 837 top level 256 path @/var 
    ID 258 gen 839 top level 256 path @/usr/local 
    ID 259 gen 841 top level 256 path @/tmp 
    ID 260 gen 843 top level 256 path @/srv 
    ID 261 gen 845 top level 256 path @/root 
    ID 262 gen 847 top level 256 path @/opt 
    ID 263 gen 849 top level 256 path @/home 
    ID 264 gen 851 top level 256 path @/boot/grub2/x86_64-efi 
    ID 265 gen 853 top level 256 path @/boot/grub2/i386-pc 
    ID 266 gen 1480 top level 256 path @/.snapshots 
    ID 267 gen 1480 top level 266 path @/.snapshots/1/snapshot 
    ID 275 gen 84 top level 266 path @/.snapshots/2/snapshot 
    3400G:~ #
    Use defaults for mounting:
    Code:
    3400G:~ # cat /mnt/@/.snapshots/2/snapshot/etc/fstab   
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /                       btrfs  defaults                      0  0 
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /.snapshots             btrfs  subvol=/@/.snapshots          0  0 
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /var                    btrfs  subvol=/@/var                 0  0 
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /usr/local              btrfs  subvol=/@/usr/local           0  0 
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /tmp                    btrfs  subvol=/@/tmp                 0  0 
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /srv                    btrfs  subvol=/@/srv                 0  0 
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /root                   btrfs  subvol=/@/root                0  0 
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /opt                    btrfs  subvol=/@/opt                 0  0 
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /home                   btrfs  subvol=/@/home                0  0 
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0 
    UUID=36e8edd4-d99e-4e13-a998-8c101d9cba75  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0 
    UUID=404C-1EC8                             /boot/efi               vfat   defaults                      0  2 
    3400G:~ #
    Leap allocates /tmp to disk. Tumbleweed allocates it to RAM. No action needed:
    Code:
    3400G:~ # mount | grep /tmp 
    tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=409600,inode64) 
    3400G:~ # df -h /tmp 
    Filesystem      Size  Used Avail Use% Mounted on 
    tmpfs            15G  636K   15G   1% /tmp 
    3400G:~ #
    Instead of using swap I bought double sized RAM:
    Code:
    3400G:~ # inxi -m 
    Memory:    RAM:total: 29.27 GiB used: 4.52 GiB (15.4%)  
               Array-1:capacity: 128 GiB slots: 4 EC: None  
               Device-1: DIMM_A1 size: No Module Installed  
               Device-2: DIMM_A2 size: 16 GiB speed: 2133 MT/s  
               Device-3: DIMM_B1 size: No Module Installed  
               Device-4: DIMM_B2 size: 16 GiB speed: 2133 MT/s  
    3400G:~ #
    That's all I need.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

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
  •