Improve boot speed by using a ssd?

Hi,
on my new system i want to try to speed up my system a bit, especially the boot process. That is why i bought an SSD disc (and a normal hard disc for /home). During the opensuse Tumbleweed installation process i chose the “assisted partioning”, which resulted in the following configuration:

  • root (btrfs) is on the SSD
  • /home (XFS) is on the HDD
  • also Swap and /boot/efi (FAT) are on the HDD!

so I am a bit confused here… for a faster boot, /boot/efi should also be on the SSD right?
What about SWAP, does it improve the speed when i put in on the SSD? But i have to admit that i probably never use swap as i my system has 32GB of ram and is only used for anything that needs as much RAM.

Yes, current thought generally recommends the boot and swap partitions should be on the SSD. At various times there was concern about wearing out the SSD, so the swap was placed on the HDD, but nowadays that’s not supposed to be a concern.

The Guided Setup should provide an option somewhere in there to set the location of those partitions, or you should be able to modify even after the recommended layout is presented to you but before actually making changes to your disks.

TSU

All of my machines have partitioning similar to:

erlangen:~ # lsblk -f /dev/nvme0n1
NAME        FSTYPE LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT
nvme0n1                                                                           
├─nvme0n1p1 ext4   Fedora     047d4d83-a9a7-482e-8d15-a1c855a637ea   23.1G    21% /Fedora
├─nvme0n1p2 ext4   Tumbleweed 8b190950-c141-4351-9198-7a9592b4fb34     12G    57% /
├─nvme0n1p3 ext4   Home       704621ef-9b45-4e96-ba7f-1becd3924f08  200.9G    50% /home
└─nvme0n1p4 vfat              6DEC-64F9                              87.3M    13% /boot/efi
erlangen:~ # 

Drives are:

erlangen:~ # inxi -zDxx
Drives:    Local Storage: total: 4.56 TiB used: 1.87 TiB (41.1%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 950 PRO 512GB size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 
           serial: <filter> temp: 39 C 
           ID-2: /dev/sda vendor: Western Digital model: WD40EZRX-22SPEB0 size: 3.64 TiB speed: 6.0 Gb/s serial: <filter> 
           temp: 29 C 
           ID-3: /dev/sdb vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB speed: 6.0 Gb/s serial: <filter> 
erlangen:~ #

I was taken aback with the difference in start up times - that a ssd m2 drive makes. You will be impressed am sure.

Hi
Boot speed is all relative, yes a SSD will boot faster, but also removing the cruft will also do this…

On all my systems I remove plymouth, lock packages and rebuild initrd. I omit a few modules not needed, on single boot systems I turn off the graphical grub, set it to not probe foreign os, set timeout to zero and set to hidden.

Multi boot I set to 1 second, I don’t use hibernate or suspend and set swap to ~1GB

Here are a few of my setups…


Leap 15.0 Laptop (Multi boot):

fozzie-bear:~ # lsblk -f /dev/sda
NAME   FSTYPE LABEL  UUID                                 MOUNTPOINT
sda
├─sda1 vfat          1B66-6A32                            /boot/efi
├─sda2
├─sda3 btrfs  sled15 1774e610-6d65-48c4-9093-668f9f126e87 
├─sda4 btrfs  leap15 afaadb38-5701-4084-8888-ee7ce2648e6a /
├─sda5 xfs    data   d1ebd2cd-9abc-4e19-998e-46120376ef0c /data
├─sda6 ntfs          167295C07295A551
└─sda7 swap   swap   a4f65c49-3061-4f98-ad7e-ea1596580e90 [SWAP]

fozzie-bear:~ # inxi -zDxx
Drives:    HDD Total Size: 120.0GB (7.6% used)
           ID-1: /dev/sda model: OCZ size: 120.0GB serial: <filter>

fozzie-bear:~ # systemd-analyze 
Startup finished in 3.281s (firmware) + 2.255s (loader) + 2.196s (kernel) + 2.058s (initrd) + 7.409s (userspace) = 17.200s

Tumbleweed Desktop:

grover:~ # lsblk -f /dev/sd[a,b]
NAME   FSTYPE LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda
├─sda1 vfat              4AD6-FD90                             254.8M     2% /boot/efi
├─sda2 btrfs  tumbleweed 01c3dc8a-0bae-468a-8acf-08bf697ce6df   29.8G    25% /
├─sda3 xfs    data       ee9733db-24aa-48e4-928e-e020460fbf98   40.5G    78% /data
└─sda4 swap   swap       3787f150-c4f3-4752-9d66-fed9e3c08c13                [SWAP]
sdb
└─sdb1 xfs    BACKUP     59ec486b-358a-450b-a211-0db8e3ce3811   99.5G    89% /run/media/username/BACKUP
grover:~ # inxi -zDxx
Drives:    Local Storage: total: 1.13 TiB used: 982.92 GiB (85.1%) 
           ID-1: /dev/sda vendor: SanDisk model: SDSSDXPS240G size: 223.57 GiB speed: 6.0 Gb/s serial: <filter> 
           ID-2: /dev/sdb vendor: Western Digital model: WD10JPVX-75JC3T0 size: 931.51 GiB speed: 6.0 Gb/s serial: <filter> 
grover:~ # systemd-analyze 
Startup finished in 1.976s (kernel) + 1.183s (initrd) + 3.643s (userspace) = 6.803s
graphical.target reached after 3.635s in userspace

Tumbleweed Laptop:

bert:~ # lsblk -f /dev/sda
NAME   FSTYPE LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda
├─sda1 vfat              62BB-F4A5                             254.9M     2% /boot/efi
├─sda2 btrfs  tumbleweed 2cbadd0b-fccd-4aab-b6e1-1264fcc20bbb   34.5G    13% /
├─sda3 xfs    data       33860823-1867-436a-bc29-7f66d1d0beb6   75.8G     3% /data
└─sda4 swap   swap       48d473f6-29d3-4080-ab5b-fb3cfb75858e                [SWAP]
bert:~ # inxi -zDxx
Drives:    Local Storage: total: 119.24 GiB used: 7.60 GiB (6.4%) 
           ID-1: /dev/sda vendor: OCZ model: VERTEX4 size: 119.24 GiB speed: 6.0 Gb/s serial: <filter> 
bert:~ # systemd-analyze
Startup finished in 2.488s (firmware) + 756ms (loader) + 3.293s (kernel) + 1.901s (initrd) + 6.019s (userspace) = 14.458s
graphical.target reached after 6.001s in userspace

Leap 15.0 RaspberryPi 3 (multi-user target only)
gekkota-dns1:~ # lsblk -f /dev/mmcblk0
NAME        FSTYPE LABEL UUID                                 MOUNTPOINT
mmcblk0
├─mmcblk0p1 vfat   EFI   9862-7EB0                            /boot/efi
├─mmcblk0p2 ext4   ROOT  7f06244a-9113-4c4f-8e84-9dd013f4b8d9 /
└─mmcblk0p3 swap   SWAP  61300f15-d00e-4239-8854-027ffc11e45c [SWAP]
gekkota-dns1:~ # inxi -zDxx
Drives:    HDD Total Size: NA (-)
           ID-1: /dev/mmcblk0 model: N/A size: 15.9GB serial: N/A
gekkota-dns1:~ # systemd-analyze 
Startup finished in 4.222s (kernel) + 2.808s (initrd) + 9.737s (userspace) = 16.769s

thanks for all the answers. But i have to admit… that I was a bit impatient during the installation and only noticed the partition configurations as everything was finished :frowning:
Is it possible to move /boot/efi from the HDD to the SDD? I guess i have to shrink the root partition first, and then create a new efi partition on the ssd but then? Can i just copy the contents of the other partition over? What about fstab subvolume configurations and other configuration settings and relations?

Although I’d expect you could manually copy the boot partition to your SSD and and then using the Partitioner (you can access in YaST) to re-point that location and re-create your swap partition, I wonder if it’s worth the trouble on a brand new install, it probably is easier to re-install, particularly if you have to re-size the root partition to make room for the new partitions…

TSU

Hi
Unfortunately no, xfs will only grow, not shrink… But yes you can do a direct cp -ar the contents over or use something like dd, however you would need to re-create the efi entry in nvram (easy with efibootmgr), check /etc/fstab etc.

Quicker to start over probably…

/ is btrfs not XFS but that sounds very complicated, so i guess i will keep it the way it is.

It is also necessary to have / home on the SSD, in fact there are all the configuration files of the programs and the desktop, I have made a / home of 10 gig, but it is also enough 5 gig; in / home I do not have any of my files, I’ve created links to the mechanical HD where I have all my files.
Ext4 for all

Hi
That’s not a requirement, I do it because all my important stuff is on the /data partition. But you can setup (automatic or manual) for taking a snapshot of /home if using btrfs. I don’t use snapshots these days on my laptops…

Hi
The partition at the end of the disk is, you would have to shrink this first and make a efi partition, it does not have to be first…

enziosavio@linux-area51:~> lsblk -f
NAME   FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda                                     
├─sda1                      816M    10% /boot
├─sda2                     24,8G    37% /
└─sda3                        6G    38% /home
sdb                                     
├─sdb1                      8,2G     9% /var
├─sdb2                        9G     1% /tmp
└─sdb3                    397,8G     9% /archivio

I have done so since I have an SSD
sda is SSD

Hi
Ahh so you have a /boot, it could be done then, your would need to move the /boot files over and then just use sda1… If it’s doing what you want now, unless your wanting to re-install, I’d rock on…

I’m guessing the SSD is a 32Gb eMMC device?

enziosavio@linux-area51:~> inxi -D
Drives:    Local Storage: total: 521.66 GiB used: 61.61 GiB (11.8%) 
           ID-1: /dev/sda vendor: Kingston model: SV300S37A60G size: 55.90 GiB 
           ID-2: /dev/sdb vendor: Seagate model: ST500DM002-1BD142 size: 465.76 GiB 
enziosavio@linux-area51:~> systemd-analyze
Startup finished in 3.075s (kernel) + 979ms (initrd) + 4.191s (userspace) = 8.246s
graphical.target reached after 4.180s in userspace

By now it is an old SSD of 4 years ago;)