You are not logged in.

#1 2023-02-24 22:51:56

faeve
Member
Registered: 2022-06-10
Posts: 12

Slow Boot Time / Speed it up [SOLVED]

Hello,

My boot time feels really slow and I would like to speed it up.

It seems like my disc is taking up the most time (is my disk just slow?), I think that there are also services that are taking up their full time outs before moving onto the next process. How do I cull these timeout, either by resolving whatever issue their having or reducing there their time out.

Here are some logs that might help? My bootloader is GRUB, also im posting my MBR partition table.

Ive read theres not a big difference in using system-d boot, and Im not opposed to using it but it was a pain installing 3 os on a MBR table and Id rather not mess with it if at all possible.

I use KDE Plasma and have removed every unnecessary app. But I think I remember it being slow to boot before I added a desktop environment, its been a while.


I'm using this guide off of the wiki
Improving performance/Boot process:
https://wiki.archlinux.org/title/Improv … ot_process

cfdisk

$ cfdisk

    Device                 Boot                           Start                  End              Sectors              Size           Id Type
>>  /dev/sda1              *                               2048              1050623              1048576              512M            7 HPFS/NTFS/exFAT               
    /dev/sda2                                           1052670            168822783            167770114               80G            f W95 Ext'd (LBA)
    ├─/dev/sda5                                         1052672            164726783            163674112               78G            7 HPFS/NTFS/exFAT
    └─/dev/sda6                                       164728832            168822783              4093952                2G           82 Linux swap / Solaris
    /dev/sda3                                         168822784            209782783             40960000             19.5G            c W95 FAT32 (LBA)
    /dev/sda4                                         209782784            625137663            415354880            198.1G           83 Linux
    Free space                                        625137664            625142447                 4784              2.3M

fstab

 Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda3
UUID=3f7739f2-6181-4cd0-bb5a-db5905cd2f44       /               ext4            rw,relatime     0 1

# /dev/sda6
UUID=b97a640d-25a3-4cb5-9929-211bcf1b1ed0       none            swap            defaults        0 0

GRUB config

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="1"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
  font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci>
else
  search --no-floppy --fs-uuid --set=root 3f7739f2-6181-4cd0-bb5a-db5905cd2f44
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/06_grub-customizer_menu_color_helper ###
### END /etc/grub.d/06_grub-customizer_menu_color_helper ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux->
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-bareme>
        else
          search --no-floppy --fs-uuid --set=root 3f7739f2-6181-4cd0-bb5a-db5905cd2f44
        fi
        echo    'Loading Linux linux ...'
        linux   /boot/vmlinuz-linux root=UUID=3f7739f2-6181-4cd0-bb5a-db5905cd2f44 rw  loglevel=3 quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/intel-ucode.img /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-3f7739f2-6181-4cd0-bb5a-db>
        menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menu>
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos3'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hin>
                else
                  search --no-floppy --fs-uuid --set=root 3f7739f2-6181-4cd0-bb5a-db5905cd2f44
                fi
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=3f7739f2-6181-4cd0-bb5a-db5905cd2f44 rw  loglevel=3 qu>
                echo    'Loading initial ramdisk ...'
                initrd  /boot/intel-ucode.img /boot/initramfs-linux.img
        }
        menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class>
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos3'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hin>
                else
                  search --no-floppy --fs-uuid --set=root 3f7739f2-6181-4cd0-bb5a-db5905cd2f44
                fi
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=3f7739f2-6181-4cd0-bb5a-db5905cd2f44 rw  loglevel=3 qu>
                echo    'Loading initial ramdisk ...'
                initrd  /boot/intel-ucode.img /boot/initramfs-linux.img
        }
        menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class>
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos3'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hin>
                else
                  search --no-floppy --fs-uuid --set=root 3f7739f2-6181-4cd0-bb5a-db5905cd2f44
                fi
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=3f7739f2-6181-4cd0-bb5a-db5905cd2f44 rw  loglevel=3 qu>
                initrd  /boot/intel-ucode.img /boot/initramfs-linux-fallback.img
        }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-141435>
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-bareme>
        else
          search --no-floppy --fs-uuid --set=root 1414359814357DB4
        fi
        parttool ${root} hidden-
        drivemap -s (hd0) ${root}
        chainloader +1
}
menuentry 'Ubuntu 22.04.2 LTS (22.04) (on /dev/sda4)' --class ubuntu --class gnu-linux --class gnu --class o>
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos4'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-bareme>
        else
          search --no-floppy --fs-uuid --set=root 86117ca1-165c-4571-8e6c-d3e0ebadedba
        fi
        linux /boot/vmlinuz-5.19.0-32-generic root=UUID=86117ca1-165c-4571-8e6c-d3e0ebadedba ro quiet splash>
        initrd /boot/initrd.img-5.19.0-32-generic
}
submenu 'Advanced options for Ubuntu 22.04.2 LTS (22.04) (on /dev/sda4)' $menuentry_id_option 'osprober-gnul>
        menuentry 'Ubuntu (on /dev/sda4)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osp>
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos4'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hin>
                else
                  search --no-floppy --fs-uuid --set=root 86117ca1-165c-4571-8e6c-d3e0ebadedba
                fi
                linux /boot/vmlinuz-5.19.0-32-generic root=UUID=86117ca1-165c-4571-8e6c-d3e0ebadedba ro quie>
                initrd /boot/initrd.img-5.19.0-32-generic
        }
        menuentry 'Ubuntu, with Linux 5.19.0-32-generic (on /dev/sda4)' --class gnu-linux --class gnu --clas>
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos4'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hin>
                else
                  search --no-floppy --fs-uuid --set=root 86117ca1-165c-4571-8e6c-d3e0ebadedba
                fi
                linux /boot/vmlinuz-5.19.0-32-generic root=UUID=86117ca1-165c-4571-8e6c-d3e0ebadedba ro quie>
                initrd /boot/initrd.img-5.19.0-32-generic
        }
        }
        menuentry 'Ubuntu, with Linux 5.19.0-32-generic (recovery mode) (on /dev/sda4)' --class gnu-linux -->
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos4'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hin>
                else
                  search --no-floppy --fs-uuid --set=root 86117ca1-165c-4571-8e6c-d3e0ebadedba
                fi
                linux /boot/vmlinuz-5.19.0-32-generic root=UUID=86117ca1-165c-4571-8e6c-d3e0ebadedba ro reco>
                initrd /boot/initrd.img-5.19.0-32-generic
        }
        menuentry 'Ubuntu, with Linux 5.15.0-43-generic (on /dev/sda4)' --class gnu-linux --class gnu --clas>
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos4'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hin>
                else
                  search --no-floppy --fs-uuid --set=root 86117ca1-165c-4571-8e6c-d3e0ebadedba
                fi
                linux /boot/vmlinuz-5.15.0-43-generic root=UUID=86117ca1-165c-4571-8e6c-d3e0ebadedba ro quie>
                initrd /boot/initrd.img-5.15.0-43-generic
        }
        menuentry 'Ubuntu, with Linux 5.15.0-43-generic (recovery mode) (on /dev/sda4)' --class gnu-linux -->
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos4'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hin>
                else
                  search --no-floppy --fs-uuid --set=root 86117ca1-165c-4571-8e6c-d3e0ebadedba
                fi
                linux /boot/vmlinuz-5.15.0-43-generic root=UUID=86117ca1-165c-4571-8e6c-d3e0ebadedba ro reco>
                initrd /boot/initrd.img-5.15.0-43-generic
        }
}

### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
        fwsetup --is-supported
        if [ "$?" = 0 ]; then
                menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
                        fwsetup
                }
        fi
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

Systemd logs

$ systemd-analyze

Startup finished in 5.628s (kernel) + 8.673s (userspace) = 14.301s 
graphical.target reached after 8.673s in userspace.
$ systemd-analyze blame

3.933s dev-sda3.device
3.281s udisks2.service
2.243s systemd-journal-flush.service
1.894s packagekit.service
1.616s lvm2-monitor.service
1.413s systemd-tmpfiles-setup-dev.service
1.200s upower.service
 938ms iwd.service
 936ms dbus.service
 898ms systemd-udevd.service
 729ms systemd-tmpfiles-setup.service
 716ms user@1000.service
 547ms colord.service
 475ms systemd-random-seed.service
 449ms polkit.service
 415ms dhcpcd.service
 375ms systemd-sysctl.service
 302ms systemd-udev-trigger.service
 274ms systemd-modules-load.service
 230ms accounts-daemon.service
lines 1-20...skipping...
3.933s dev-sda3.device
3.281s udisks2.service
2.243s systemd-journal-flush.service
1.894s packagekit.service
1.616s lvm2-monitor.service
1.413s systemd-tmpfiles-setup-dev.service
1.200s upower.service
 938ms iwd.service
 936ms dbus.service
 898ms systemd-udevd.service
 729ms systemd-tmpfiles-setup.service
 716ms user@1000.service
 547ms colord.service
 475ms systemd-random-seed.service
 449ms polkit.service
 415ms dhcpcd.service
 375ms systemd-sysctl.service
 302ms systemd-udev-trigger.service
 274ms systemd-modules-load.service
 230ms accounts-daemon.service
 212ms systemd-logind.service
 189ms systemd-timesyncd.service
 186ms systemd-update-utmp.service
 162ms modprobe@dm_mod.service
 153ms systemd-journald.service
 146ms dev-disk-by\x2duuid-b97a640d\x2d25a3\x2d4cb5\x2d9929\x2d211bcf1b1ed0.swap
 140ms modprobe@fuse.service
 136ms systemd-backlight@backlight:intel_backlight.service
 128ms systemd-rfkill.service
 116ms systemd-remount-fs.service
 106ms sys-fs-fuse-connections.mount
 105ms sys-kernel-config.mount
  82ms modprobe@drm.service
  70ms systemd-tmpfiles-clean.service
  65ms modprobe@configfs.service
  47ms kmod-static-nodes.service
  42ms user-runtime-dir@1000.service
$ systemd-analyze critical-chain

The time when unit became active or started is printed after the "@" characte>
The time the unit took to start is printed after the "+" character.

graphical.target @8.673s
└─sddm.service @8.672s
  └─systemd-user-sessions.service @8.602s +39ms
    └─network.target @8.574s
      └─iwd.service @7.635s +938ms
        └─basic.target @7.612s
          └─sockets.target @7.612s
            └─dbus.socket @7.612s
              └─sysinit.target @7.599s
                └─systemd-timesyncd.service @7.409s +189ms
                  └─systemd-tmpfiles-setup.service @6.652s +729ms
                    └─local-fs.target @6.535s
                      └─run-credentials-systemd\x2dtmpfiles\x2dsetup.service.>
                        └─local-fs-pre.target @4.096s
                          └─systemd-tmpfiles-setup-dev.service @2.682s +1.413s
                            └─kmod-static-nodes.service @2.408s +47ms
                              └─systemd-journald.socket @2.399s
lines 1-20...skipping...
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @8.673s
└─sddm.service @8.672s
  └─systemd-user-sessions.service @8.602s +39ms
    └─network.target @8.574s
      └─iwd.service @7.635s +938ms
        └─basic.target @7.612s
          └─sockets.target @7.612s
            └─dbus.socket @7.612s
              └─sysinit.target @7.599s
                └─systemd-timesyncd.service @7.409s +189ms
                  └─systemd-tmpfiles-setup.service @6.652s +729ms
                    └─local-fs.target @6.535s
                      └─run-credentials-systemd\x2dtmpfiles\x2dsetup.service.mount @6.656s
                        └─local-fs-pre.target @4.096s
                          └─systemd-tmpfiles-setup-dev.service @2.682s +1.413s
                            └─kmod-static-nodes.service @2.408s +47ms
                              └─systemd-journald.socket @2.399s
                                └─-.mount @2.297s
                                  └─-.slice @2.297s

df info

$ df -h

Filesystem      Size  Used Avail Use% Mounted on
dev             3.9G     0  3.9G   0% /dev
run             3.9G  1.4M  3.9G   1% /run
/dev/sda3        20G   11G  8.0G  56% /
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           3.9G  8.0K  3.9G   1% /tmp
tmpfs           782M   68K  782M   1% /run/user/1000
$ df -i

Filesystem      Inodes  IUsed   IFree IUse% Mounted on
dev             996393    551  995842    1% /dev
run             999849    846  999003    1% /run
/dev/sda3      1281120 388154  892966   31% /
tmpfs           999849      1  999848    1% /dev/shm
tmpfs          1048576     25 1048551    1% /tmp
tmpfs           199969     86  199883    1% /run/user/1000

Disc info

$ sudo hdparm -I /dev/sda
/dev/sda:

ATA device, with non-removable media
        Model Number:       WDC WD3200BEKT-75PVMT1                  
        Serial Number:      WD-WXB1A72P8147
        Firmware Revision:  01.01A01
        Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
        Supported: 8 7 6 5 
        Likely used: 8
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:    16514064
        LBA    user addressable sectors:   268435455
        LBA48  user addressable sectors:   625142448
        Logical/Physical Sector size:           512 bytes
        device size with M = 1024*1024:      305245 MBytes
        device size with M = 1000*1000:      320072 MBytes (320 GB)
        cache/buffer size  = 16384 KBytes
        Nominal Media Rotation Rate: 7200
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, with device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 0
        Advanced power management level: 128
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4 
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
           *    Advanced Power Management feature set
                SET_MAX security extension
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    General Purpose Logging feature set
           *    WRITE_{DMA|MULTIPLE}_FUA_EXT
           *    64-bit World wide name
           *    IDLE_IMMEDIATE with UNLOAD
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
           *    Idle-Unload when NCQ is active
           *    NCQ priority information
           *    DMA Setup Auto-Activate optimization
           *    Device-initiated interface power management
           *    Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Write Same (AC2)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
                unknown 206[12] (vendor specific)
                unknown 206[13] (vendor specific)
                unknown 206[14] (vendor specific)
Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
                frozen
        not     expired: security count
                supported: enhanced erase
        60min for SECURITY ERASE UNIT. 60min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50014ee657fb3f89
        NAA             : 5
        IEEE OUI        : 0014ee
        Unique ID       : 657fb3f89
Checksum: correct

Thank you for your time

Last edited by faeve (2023-02-25 00:33:41)

Offline

#2 2023-02-25 00:34:34

faeve
Member
Registered: 2022-06-10
Posts: 12

Re: Slow Boot Time / Speed it up [SOLVED]

Just followed the guide and found out what was taking up all the time. FYI future reader wink Read the wiki its amazing

Offline

Board footer

Powered by FluxBB