Results 1 to 7 of 7

Thread: Leap 15.0 SSD and HDD Partitioning

  1. #1

    Default Leap 15.0 SSD and HDD Partitioning

    Hi all,

    I am looking at upgrading to Leap15.0 (with LXQt) from 42.3 on my Intel Core i7 8700, 16Gbyte single user desktop. I also have acquired a WD 120G SSD to use along with my WD 2T HDD. Some articles on SSD relate to trying to minimise the amount of writes performed on an SSD so I have been experimenting with the setup in VirtualBox to have /var and /tmp on the HDD.

    The initial setup of SSD having /boot, / and swap with BTRFS and the HDD as /home as XFS is straight forward. But to get /var and /tmp to the HDD has been interesting to say the least.

    At first I thought just adding two extra XFS partitions to the HDD and mounting /var and /tmp there was an ok approach - but being pedantic I didn't like the idea of having fixed partitions sizes.

    The next experiment was with LVM but I felt the overheads and complexity was too much.

    Then I read about using bind in /etc/fstab adding these two lines at the end -

    Code:
    /home/chris/var        /var        none    bind    0 0
    /home/chris/tmp      /tmp        none    bind    0 0
    And that seemed to work nicely.

    So now my questions come down to this -

    1. Is it really worth the effort of "saving" an SSD by minimising writes to it by relocating /var and /tmp (and potentially any other write intensive locations)?
    2. Will using the bind method in /etc/fstab really stop writes to the SSD for /var and /tmp as I am suspicious there may be some writing to, then moving from the SSD to the HDD?
    3. Is overprovisioning an SSD (that is leaving unallocated space) still required? I get the impression it's not required these days for my particular SSD which has 7% onboard overprovisioning (128GB providing 120GB user space)
    4. Do I need to remove the /var and /tmp subvolumes in the BTRFS partition if I use the /etc/fstab approach?
    5. Should I relocate /.snapshots as well to the HDD?
    6. Is there a better way to achieve my goal?

    Out of interest I do compile a lot of my own programs so I am happy to leave /usr/local as is since programs are only being read to load faster off the SSD but I would appreciate any other tips/tricks/gotchas.

    Thanks,
    Chris.

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,262
    Blog Entries
    15

    Default Re: Leap 15.0 SSD and HDD Partitioning

    Hi
    The only thing I do is wind down swap (if it's even used) these days and disable plymouth.

    You could look at changing the disk scheduler to bfq for the SSD and HDD with a simple grub kernel option entry.

    Else sit back enjoy the defaults and SSD speed

    I'd just use the HDD for data to go with your backup 2TB device?

    This is my Tumbleweed/WinX setup partitioning on a 120GB SSD;
    Code:
    lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 111.8G  0 disk 
    ├─sda1   8:1    0   260M  0 part /boot/efi
    ├─sda2   8:2    0    16M  0 part 
    ├─sda3   8:3    0    40G  0 part /
    ├─sda4   8:4    0    35G  0 part /data
    ├─sda5   8:5    0     4G  0 part [SWAP]
    ├─sda6   8:6    0  31.8G  0 part 
    └─sda7   8:7    0   789M  0 part
    This is my Leap 15.0 setup on a 120GB SSD;
    Code:
     lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 119.2G  0 disk 
    ├─sda1   8:1    0   260M  0 part /boot/efi
    ├─sda2   8:2    0    40G  0 part /
    ├─sda3   8:3    0    75G  0 part /data
    └─sda4   8:4    0     4G  0 part [SWAP]
    This system is running SLES 15.0 with a 240GB SSD;
    Code:
    lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 223.6G  0 disk 
    ├─sda1   8:1    0   260M  0 part /boot/efi
    ├─sda2   8:2    0    40G  0 part /
    ├─sda3   8:3    0 175.3G  0 part /data
    └─sda4   8:4    0     8G  0 part [SWAP]
    All run bfq scheduler (mq-deadline) and swappiness set via /etc/sysctl.conf;
    Code:
    # Disable swap
    vm.swappiness = 1
    vm.vfs_cache_pressure = 50
    Last edited by malcolmlewis; 25-Aug-2018 at 20:07.
    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

    Default Re: Leap 15.0 SSD and HDD Partitioning

    Hi Malcolm,

    yes I was going to set the swappiness thing as well but didn't mention it


    You could look at changing the disk scheduler to bfq for the SSD and HDD with a simple grub kernel option entry.
    I'm going to have to google that as I have no idea what that all means.

    I notice in your lsblk results you don;t have a /home mount point but a /data one. That confuses me. Is /home just under /? I take it you're not concerned about that "writing to SSD" issue?

    Thanks,
    Chris.

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

    Default Re: Leap 15.0 SSD and HDD Partitioning

    Quote Originally Posted by kitman View Post
    Hi Malcolm,

    yes I was going to set the swappiness thing as well but didn't mention it



    I'm going to have to google that as I have no idea what that all means.

    I notice in your lsblk results you don;t have a /home mount point but a /data one. That confuses me. Is /home just under /? I take it you're not concerned about that "writing to SSD" issue?

    Thanks,
    Chris.
    Hi
    Via YaST Hardware -> bootloader, Kernel Parameters tab you add the grub kernel command line option (the one with resume, quiet etc on);
    Code:
    scsi_mod.use_blk_mq=1
    Yes, home is on / (all btrfs) and I use softlinks to my /data (xfs) partition in /home/username for all my main files and a few config files.

    Nope, have thousands of hours on my SSD's and still running fine, most have outlived the laptops and moved to newer ones...

    If it's a new drive what are the daily write specs?
    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
    Sep 2012
    Posts
    6,475

    Default Re: Leap 15.0 SSD and HDD Partitioning

    Quote Originally Posted by kitman View Post
    I also have acquired a WD 120G SSD
    This says nothing about exact model. WD Green 120G SSD has write endurance 40TBW (as stated by WDC). This means you can write 22GB every day for 5 years before official end of life. I doubt very much you will come even close to this during normal home usage. You can monitor how much data is actually written to get some estimation for your specific use case.

  6. #6

    Default Re: Leap 15.0 SSD and HDD Partitioning

    Hi arvidjaar,

    Yes it is a GREEN WD SSD.

    But I am beginning to gather from yours and Malcolm's replies that this "reduce writes to save SSD" seems to be a non issue with today's SSDs. Yes, most of the articles I read did relate to older SSDs (whatever that vintage that may be) and I was erring on the cautious side.

    I will start my backups tonight and start upgrading Leap15 tomorrow.

    Three quick follow up questions -

    1. Malcolm - that code for the GRUB - is that good for the HDD on my laptop too running Leap15?

    Code:
    scsi_mod.use_blk_mq=1
    2. Using the BTRFS for the /home partition under / is ok? Why does /home on most guided installs gets set as XFS?

    3. arvidjaar - can you recommend a tool to monitor disk writes?

    Thanks to all,
    Chris.

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,262
    Blog Entries
    15

    Default Re: Leap 15.0 SSD and HDD Partitioning

    Quote Originally Posted by kitman View Post
    Three quick follow up questions -

    1. Malcolm - that code for the GRUB - is that good for the HDD on my laptop too running Leap15?

    Code:
    scsi_mod.use_blk_mq=1
    Hi
    Yes is will use bfq for the HDD;
    Code:
    cat /sys/block/sda/queue/scheduler 
    
    [mq-deadline] kyber bfq none
    Quote Originally Posted by kitman View Post
    2. Using the BTRFS for the /home partition under / is ok? Why does /home on most guided installs gets set as XFS?
    I don't worry about snapshots, if you do then use the defaults, or exclude the /home subvolume from snapshots. I have a NAS and backups for important stuff, so like to just run SSD's.


    For monitoring, smartctl -a /dev/sdX will give you relevant information, disk writes etc... I see about 6GB of writes a day here.
    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!

Posting Permissions

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