Results 1 to 5 of 5

Thread: How I optimized my drive setup (HDD vs SSD)

  1. #1
    Join Date
    Jan 2009
    Location
    Romania, Bucharest
    Posts
    887

    Lightbulb How I optimized my drive setup (HDD vs SSD)

    Since I usually only visit the forum to ask for help, I figured I'd also share something useful for a change. Hopefully that still makes this the right forum section, feel free to move if not.

    For some time I've been facing a dilemma: Hard Disk Drives are very slow, but more reliable as well as cheap when it comes to price per TB of storage. Solid State Drives are very fast, but you need to make sure you aren't writing too much data to them while leaving enough free space to give it plenty of free cells to cycle between as to further reduce wear. Like most people, I was previously using a two drive setup, with an SSD for the root partition and an HDD for the home partition. The issue with this is that while boot times are very fast, logins are not, and the general user experience is often painfully slow when working with user data. Of course relying on an SSD to store all the data in your home folder is more risky, plus a 2TB SSD costs as much as an 8TB HDD so it's too expensive for most of us.

    I found a way to get the same unified experience under an optimized 3-drive setup; A NVME (PCIE) SSD for the root partition, a SATA3 SSD for the home partition, and a SATA3 HDD as an archive partition. It works like this: /archive/myusername follows the same structure as /home/myusername except it contains only large directories with stuff I wish to ensure I don't risk losing and / or is updated more heavily (media, GIT repositories of projects compiled from Github / Gitlab, etc). /home/myusername meanwhile contains all the user settings and stuff the system needs to work with, such as the ~/.config and ~/.local and ~/.cache directories with everything else of the sort. For further reliability I use a rsync command scheduled with cron, to backup some of these settings directories from the SSD to the HDD on a daily basis... in case the home SSD ever crashes I can easily recover them too from the archive HDD. Finally I use symlinks to seamlessly connect everything from my /archive directory to my /home directory, making it possible to access all data as if in the same place; Directories such as My Pictures / My Videos / My Music and more are located on the HDD but linked to the SSD so they appear part of my home directory as usual. Here's a screenshot of exactly what this setup looks like:



    The practical differences I instantly noticed after the drive change: Apart from gaining a bit of extra free space on the old HDD by splitting some data that's not being duplicated, logins are now lightning fast like boot times and so is opening applications! The performance is in fact faster on the hard drive as well, thanks to it not being automatically accessed by applications constantly reading or updating their settings, but only used when I'm deliberately accessing it to look at something... less cases of processes freezing due to going into "disk sleep" too. Since the hard drive is nearly 10 years old I'm protecting it from added stress, both drives share the load and should thus last longer. On my home SSD I'm using roughly 10% of the 1TB available, while writing is mainly limited to updating small settings (eg: Firefox browser cache) which should ensure little overall wear. I sense no difference from my previous setup thanks to the symlinks, everything looks and feels exactly the same way except for the little arrow on the icons.

    I figured this would be inspiring as I imagine many people going for such a setup. To me it seems like the ideal configuration at this point in computer history: A small NVME SSD for installing the OS / EFI partition (500 GB or less), a larger SATA3 SSD for lightweight home data (1 or 2 TB), then an even larger SATA3 HDD for storing heavy data you don't mind being accessed slowly (4 TB or more)... I found this the most efficient and affordable way to get the best of both worlds at the moment. Hope others find this suggestion helpful! What are your own thoughts, and can you think of ways to better improve this kind of integrated drive configuration?
    openSUSE Tumbleweed x64, KDE Framework 5

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,684
    Blog Entries
    15

    Default Re: How I optimized my drive setup (HDD vs SSD)

    Hi
    Similar setup here, but since my motherboard doesn't support NVMe boot, I have a PCIe card that holds the NVMe and a M2 SSD connected to the M/B SATA;

    Code:
    pinxi -Dxxz
    
    Drives:    Local Storage: total: 465.77 GiB used: 100.96 GiB (21.7%) 
               ID-1: /dev/nvme0n1 vendor: Western Digital model: WDS250G1B0C-00S6U0 size: 232.89 GiB speed: 15.8 Gb/s lanes: 2 
               serial: <filter> 
               ID-2: /dev/sda vendor: Western Digital model: WDS250G2B0B-00YS70 size: 232.89 GiB speed: 6.0 Gb/s serial: <filter> 
    
    lsblk
    
    NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda           8:0    0 232.9G  0 disk 
    ├─sda1        8:1    0   260M  0 part /boot/efi
    ├─sda2        8:2    0   768M  0 part /boot
    ├─sda3        8:3    0   230G  0 part /stuff
    └─sda4        8:4    0   1.9G  0 part [SWAP]
    nvme0n1     259:0    0 232.9G  0 disk 
    ├─nvme0n1p1 259:1    0    40G  0 part /
    └─nvme0n1p2 259:2    0 192.9G  0 part /data
    I have other drives on a separate SATA controller for qemu, it has a 1TB backup drive and can activate on the fly (bind/unbind) to use when needed...

    I don't worry about read/writes to the drives, most drives have long lifetimes as well as 20GB+ writes per day these days and have yet to have one fail...
    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!

  3. #3
    Join Date
    Jan 2009
    Location
    Romania, Bucharest
    Posts
    887

    Default Re: How I optimized my drive setup (HDD vs SSD)

    Nice setup. Yes I'm still used to the idea that SSD's are sensitive to writing, even if modern ones are far better today. Especially after early this year my previous root SSD (ADATA) simply died on me while I was doing a Tumbleweed update... scared me a lot because the whole computer froze at POST until I removed it and reset the CMOS to defaults. This time I got Samsung ones which are the best, in terms of both speed and durability. In proper mixture with a reliable HDD and smart automated backups, this feels as good and safe as it gets
    openSUSE Tumbleweed x64, KDE Framework 5

  4. #4
    Join Date
    Mar 2020
    Location
    Athens
    Posts
    7

    Default Re: How I optimized my drive setup (HDD vs SSD)

    Nice tip, thanks!
    Just to mention something, no intention of advertising, I have a 250gb 840 evo, I bought it about 2011.
    This ssd, has "suffered" from me. Format after format, windows, linux, macintosh, gaming (a lot of gaming) and an endless distrohop before land on opensuse. But then again, btrfs <-> ext4, again btrfs.. etc etc.. you get the point Maybe I was just lucky, or samsung really does a good job on ssds
    But reading your tip, I think I should run to buy a new ssd&hdd to save my world!

  5. #5
    Join Date
    Mar 2020
    Location
    São Leopoldo, RS, Brazil
    Posts
    241

    Default Re: How I optimized my drive setup (HDD vs SSD)

    Quote Originally Posted by MirceaKitsune View Post
    Nice setup. Yes I'm still used to the idea that SSD's are sensitive to writing, even if modern ones are far better today.
    I dropped this notion already. Let's put our available resources to the best use we can make of them. Which leads to recommendations 1 & 2.

    1) Do you use hibernation? If so, place the swap on the faster NVME drive, you can reduce swappiness and cache pressure to avoid swapping during system operation, and prioritize swap for hibernation usage.

    2) You're doing backups only of your configs? Your data is way more important than that. So move your own data back to the SATA SSD, keeping on the slow HDD easily recoverable data (i.e. games, music, movies). Then configure/update a backup routine from the SSD to HDD.

    Additionally, if you have some RAM to spare, disable Firefox caching to disk. This avoids fragmentation on btrfs. Also, avoids writes on disk which are not really important.

    3) Open a tab on Firefox and type about:config, paste the first setting below and toggle the value to false. Review the size of the second setting.
    Code:
    browser.cache.disk.enable    false
    browser.cache.memory.capacity    -1
    openSUSE Tumbleweed

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
  •