Optimizing mkinitcpio for boot time

I have been trying to learn mkimitcpio options to reduce my boot time but its been difficult for me, i have seen few posts from @The_Quantum_Alpha and read the arch wiki with some additional blogs but i cant figure out what would be right for my system. I would really appreciate if someone can help me out

This is my inxi output

inxi -Fza
System:    Kernel: 5.11.1-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.11-x86_64 
           root=UUID=7be2aa3e-19ac-4b1e-83e7-9272d041a9a9 rw quiet audit=0 loglevel=0 
           fsck.mode=skip i915.fastboot=1 ipv6.disable=1 nowatchdog pcie_aspm=off mitigations=off 
           noibrs noibpb no_stf_barrier tsx=on 
           Desktop: i3 4.19.1 info: i3bar dm: LightDM 1.30.0 Distro: Manjaro Linux 
Machine:   Type: Laptop System: Dell product: Inspiron 15 7000 Gaming v: N/A serial: <filter> 
           Chassis: type: 10 serial: <filter> 
           Mobo: Dell model: 065C71 v: A00 serial: <filter> UEFI: Dell v: 1.13.1 date: 12/18/2020 
Battery:   ID-1: BAT0 charge: 18.0 Wh condition: 43.8/74.0 Wh (59%) volts: 12.0/11.1 
           model: Samsung SDI DELL 0GFJ673 type: Li-ion serial: <filter> status: Charging 
CPU:       Info: Quad Core model: Intel Core i7-7700HQ bits: 64 type: MT MCP arch: Kaby Lake 
           family: 6 model-id: 9E (158) stepping: 9 microcode: DE L2 cache: 6 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 44817 
           Speed: 800 MHz min/max: 800/3800 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
           5: 800 6: 800 7: 800 8: 800 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: vulnerable 
           Type: mds status: Vulnerable; SMT vulnerable 
           Type: meltdown status: Vulnerable 
           Type: spec_store_bypass status: Vulnerable 
           Type: spectre_v1 status: Vulnerable: __user pointer sanitization and usercopy barriers 
           only; no swapgs barriers 
           Type: spectre_v2 status: Vulnerable, IBPB: disabled, STIBP: disabled 
           Type: srbds status: Vulnerable 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel HD Graphics 630 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:591b class ID: 0300 
           Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] vendor: Dell driver: nvidia 
           v: 460.39 alternate: nouveau,nvidia_drm bus ID: 01:00.0 chip ID: 10de:1c8c 
           class ID: 0300 
           Device-3: Sunplus Innovation Integrated_Webcam_HD type: USB driver: uvcvideo 
           bus ID: 1-12:4 chip ID: 1bcf:28c1 class ID: 0e02 
           Display: x11 server: X.Org 1.20.10 compositor: picom v: git-dac85 driver: 
           loaded: modesetting,nvidia alternate: fbdev,intel,nouveau,nv,vesa display ID: :0 
           screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
           s-diag: 582mm (22.9") 
           Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 142 size: 344x193mm (13.5x7.6") 
           diag: 394mm (15.5") 
           OpenGL: renderer: Mesa Intel HD Graphics 630 (KBL GT2) v: 4.6 Mesa 20.3.4 
           direct render: Yes 
Audio:     Device-1: Intel CM238 HD Audio vendor: Dell driver: snd_hda_intel v: kernel 
           bus ID: 00:1f.3 chip ID: 8086:a171 class ID: 0403 
           Sound Server: ALSA v: k5.11.1-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Dell 
           driver: r8169 v: kernel port: d000 bus ID: 02:00.0 chip ID: 10ec:8168 class ID: 0200 
           IF: enp2s0 state: down mac: <filter> 
           Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: d000 
           bus ID: 03:00.0 chip ID: 8086:24fd class ID: 0280 
           IF: wlp3s0 state: up mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
           bus ID: 1-4:3 chip ID: 8087:0a2b class ID: e001 
           Message: Required tool hciconfig not installed. Check --recommends 
Drives:    Local Storage: total: 1.14 TiB used: 10.96 GiB (0.9%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: SanDisk model: X400 M.2 2280 256GB size: 238.47 GiB 
           block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s rotation: SSD 
           serial: <filter> rev: 0012 scheme: GPT 
           ID-2: /dev/sdb maj-min: 8:16 vendor: Toshiba model: MQ01ABD100 size: 931.51 GiB 
           block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 5400 rpm 
           serial: <filter> rev: 3D scheme: GPT 
Partition: ID-1: / raw size: 40 GiB size: 39.12 GiB (97.80%) used: 10.87 GiB (27.8%) fs: ext4 
           dev: /dev/sda5 maj-min: 8:5 
           ID-2: /boot/efi raw size: 100 MiB size: 96 MiB (96.00%) used: 93.1 MiB (96.9%) fs: vfat 
           dev: /dev/sda2 maj-min: 8:2 
Swap:      Alert: No Swap data was found. 
Sensors:   System Temperatures: cpu: 49.0 C mobo: 43.0 C sodimm: SODIMM C 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 195 Uptime: 38m wakeups: 1 Memory: 15.5 GiB used: 1.87 GiB (12.1%) 
           Init: systemd v: 247 Compilers: gcc: 10.2.0 Packages: pacman: 923 lib: 260 Shell: Bash 
           v: 5.1.0 running in: urxvtd inxi: 3.3.01

my udevadm

udevadm info --attribute-walk -n /dev/sda5 | grep 'DRIVERS=="[^"]'
    DRIVERS=="sd"
    DRIVERS=="ahci"

my mkinitcpio conf

cat /etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block keyboard keymap filesystems"

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
COMPRESSION="lz4"
#COMPRESSION="zstd"
#COMPRESSION="cat"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

mkinitcpio -M output

mkinitcpio -M 
==> Modules autodetected
acpi_cpufreq
acpi_pad
aesni_intel
btusb
coretemp
crc32c_intel
crc32_pclmul
crct10dif_pclmul
dcdbas
dell_laptop
dell_smbios
dell_smm_hwmon
dell_wmi
dell_wmi_descriptor
ee1004
ext4
fjes
ghash_clmulni_intel
hid_logitech_dj
hid_logitech_hidpp
hid_multitouch
i2c_hid
i2c_i801
i915
idma64
int3400_thermal
int3402_thermal
int3403_thermal
intel_cstate
intel_hid
intel_lpss_pci
intel_pch_thermal
intel_powerclamp
intel_rapl_common
intel_rapl_msr
intel_uncore
iTCO_wdt
iwlwifi
joydev
kvm_intel
mac_hid
mei_hdcp
mei_me
mousedev
mxm_wmi
nouveau
nvidia
nvidia_drm
pcc_cpufreq
pcspkr
processor_thermal_device
r8169
rapl
serio_raw
snd_hda_codec_realtek
snd_hda_intel
tpm_crb
tpm_tis
usbhid
uvcvideo
video
wmi
wmi_bmof
x86_pkg_temp_thermal
xhci_pci

lspci

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 05)
	Subsystem: Dell Device 0798
	Flags: bus master, fast devsel, latency 0
	Capabilities: [e0] Vendor Specific Information: Len=10 <?>
	Kernel driver in use: skl_uncore

00:01.0 PCI bridge: Intel Corporation 6th-9th Gen Core Processor PCIe Controller (x16) (rev 05) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 122
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: 0000e000-0000efff [size=4K]
	Memory behind bridge: de000000-df0fffff [size=17M]
	Prefetchable memory behind bridge: 00000000c0000000-00000000d1ffffff [size=288M]
	Capabilities: [88] Subsystem: Dell Device 0798
	Capabilities: [80] Power Management version 3
	Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [a0] Express Root Port (Slot+), MSI 00
	Capabilities: [100] Virtual Channel
	Capabilities: [140] Root Complex Link
	Capabilities: [d94] Secondary PCI Express
	Kernel driver in use: pcieport

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04) (prog-if 00 [VGA controller])
	DeviceName:  Onboard IGD
	Subsystem: Dell Device 0798
	Flags: bus master, fast devsel, latency 0, IRQ 130
	Memory at dd000000 (64-bit, non-prefetchable) [size=16M]
	Memory at b0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at f000 [size=64]
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: [40] Vendor Specific Information: Len=0c <?>
	Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
	Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [100] Process Address Space ID (PASID)
	Capabilities: [200] Address Translation Service (ATS)
	Capabilities: [300] Page Request Interface (PRI)
	Kernel driver in use: i915
	Kernel modules: i915

00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 05)
	Subsystem: Dell Device 0798
	Flags: fast devsel, IRQ 16
	Memory at df320000 (64-bit, non-prefetchable) [size=32K]
	Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 3
	Capabilities: [e0] Vendor Specific Information: Len=0c <?>
	Kernel driver in use: proc_thermal
	Kernel modules: processor_thermal_device

00:14.0 USB controller: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller (rev 31) (prog-if 30 [XHCI])
	Subsystem: Dell Device 0798
	Flags: bus master, medium devsel, latency 0, IRQ 126
	Memory at df310000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: [70] Power Management version 2
	Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci

00:14.2 Signal processing controller: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem (rev 31)
	Subsystem: Dell Device 0798
	Flags: fast devsel, IRQ 18
	Memory at df338000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: [50] Power Management version 3
	Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
	Kernel driver in use: intel_pch_thermal
	Kernel modules: intel_pch_thermal

00:15.0 Signal processing controller: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #0 (rev 31)
	Subsystem: Dell Device 0798
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Memory at df337000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: [80] Power Management version 3
	Capabilities: [90] Vendor Specific Information: Len=14 <?>
	Kernel driver in use: intel-lpss
	Kernel modules: intel_lpss_pci

00:15.1 Signal processing controller: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #1 (rev 31)
	Subsystem: Dell Device 0798
	Flags: bus master, fast devsel, latency 0, IRQ 17
	Memory at df336000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: [80] Power Management version 3
	Capabilities: [90] Vendor Specific Information: Len=14 <?>
	Kernel driver in use: intel-lpss
	Kernel modules: intel_lpss_pci

00:16.0 Communication controller: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 (rev 31)
	Subsystem: Dell Device 0798
	Flags: bus master, fast devsel, latency 0, IRQ 127
	Memory at df335000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: [50] Power Management version 3
	Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Kernel driver in use: mei_me
	Kernel modules: mei_me

00:17.0 SATA controller: Intel Corporation HM170/QM170 Chipset SATA Controller [AHCI Mode] (rev 31) (prog-if 01 [AHCI 1.0])
	Subsystem: Dell Device 0798
	Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 125
	Memory at df330000 (32-bit, non-prefetchable) [size=8K]
	Memory at df334000 (32-bit, non-prefetchable) [size=256]
	I/O ports at f090 [size=8]
	I/O ports at f080 [size=4]
	I/O ports at f060 [size=32]
	Memory at df333000 (32-bit, non-prefetchable) [size=2K]
	Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [70] Power Management version 3
	Capabilities: [a8] SATA HBA v1.0
	Kernel driver in use: ahci

00:1c.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #5 (rev f1) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 123
	Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
	I/O behind bridge: 0000d000-0000dfff [size=4K]
	Memory behind bridge: df200000-df2fffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: [40] Express Root Port (Slot+), MSI 00
	Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [90] Subsystem: Dell Device 0798
	Capabilities: [a0] Power Management version 3
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Access Control Services
	Capabilities: [200] L1 PM Substates
	Capabilities: [220] Secondary PCI Express
	Kernel driver in use: pcieport

00:1c.5 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #6 (rev f1) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 124
	Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: df100000-df1fffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: [40] Express Root Port (Slot+), MSI 00
	Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [90] Subsystem: Dell Device 0798
	Capabilities: [a0] Power Management version 3
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Access Control Services
	Capabilities: [200] L1 PM Substates
	Capabilities: [220] Secondary PCI Express
	Kernel driver in use: pcieport

00:1f.0 ISA bridge: Intel Corporation HM175 Chipset LPC/eSPI Controller (rev 31)
	Subsystem: Dell Device 0798
	Flags: bus master, medium devsel, latency 0

00:1f.2 Memory controller: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller (rev 31)
	Subsystem: Dell Device 0798
	Flags: fast devsel
	Memory at df32c000 (32-bit, non-prefetchable) [disabled] [size=16K]

00:1f.3 Audio device: Intel Corporation CM238 HD Audio Controller (rev 31) (prog-if 80)
	Subsystem: Dell Device 0798
	Flags: bus master, fast devsel, latency 32, IRQ 131
	Memory at df328000 (64-bit, non-prefetchable) [size=16K]
	Memory at df300000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: [50] Power Management version 3
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset Family SMBus (rev 31)
	Subsystem: Dell Device 0798
	Flags: medium devsel, IRQ 16
	Memory at df332000 (64-bit, non-prefetchable) [size=256]
	I/O ports at f040 [size=32]
	Kernel driver in use: i801_smbus
	Kernel modules: i2c_i801

01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Dell Device 0798
	Flags: bus master, fast devsel, latency 0, IRQ 132
	Memory at de000000 (32-bit, non-prefetchable) [size=16M]
	Memory at c0000000 (64-bit, prefetchable) [size=256M]
	Memory at d0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at e000 [size=128]
	Expansion ROM at df000000 [virtual] [disabled] [size=512K]
	Capabilities: [60] Power Management version 3
	Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [78] Express Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Capabilities: [250] Latency Tolerance Reporting
	Capabilities: [258] L1 PM Substates
	Capabilities: [128] Power Budgeting <?>
	Capabilities: [420] Advanced Error Reporting
	Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
	Capabilities: [900] Secondary PCI Express
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
	Subsystem: Dell Device 0798
	Flags: bus master, fast devsel, latency 0, IRQ 16
	I/O ports at d000 [size=256]
	Memory at df204000 (64-bit, non-prefetchable) [size=4K]
	Memory at df200000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [70] Express Endpoint, MSI 01
	Capabilities: [b0] MSI-X: Enable+ Count=4 Masked-
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Virtual Channel
	Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
	Capabilities: [170] Latency Tolerance Reporting
	Capabilities: [178] L1 PM Substates
	Kernel driver in use: r8169
	Kernel modules: r8169

03:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
	Subsystem: Intel Corporation Device 0050
	Flags: bus master, fast devsel, latency 0, IRQ 129
	Memory at df100000 (64-bit, non-prefetchable) [size=8K]
	Capabilities: [c8] Power Management version 3
	Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [40] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Device Serial Number 00-28-f8-ff-ff-cb-56-79
	Capabilities: [14c] Latency Tolerance Reporting
	Capabilities: [154] L1 PM Substates
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

lsblk

lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238.5G  0 disk 
├─sda1   8:1    0   529M  0 part 
├─sda2   8:2    0   100M  0 part /boot/efi
├─sda3   8:3    0    16M  0 part 
├─sda4   8:4    0 197.8G  0 part 
└─sda5   8:5    0    40G  0 part /
sdb      8:16   0 931.5G  0 disk 
├─sdb1   8:17   0   128M  0 part 
└─sdb2   8:18   0 931.4G  0 part 

Please let me know if you need any more info

COMPRESSION="lz4"

May change that to COMPRESSION="cat" !

1 Like

also my systemd-analyze

Startup finished in 6.594s (firmware) + 457ms (loader) + 2.044s (kernel) + 2.509s (userspace) = 11.604s 
graphical.target reached after 1.474s in userspace
1.299s tlp.service                                          
 712ms systemd-modules-load.service                         
 510ms systemd-journal-flush.service                        
 483ms systemd-random-seed.service                          
 315ms dev-sda5.device                                      
 208ms accounts-daemon.service                              
 189ms polkit.service                                       
 153ms systemd-tmpfiles-clean.service                       
 122ms user@1000.service                                    
 119ms udisks2.service                                      
 110ms systemd-udevd.service                                
 108ms upower.service                                       
  96ms NetworkManager.service                               
  88ms systemd-logind.service                               
  73ms boot-efi.mount                                       
  57ms systemd-udev-trigger.service                         
  57ms avahi-daemon.service                                 
  53ms systemd-journald.service                             
  39ms lightdm.service                                      
  28ms wpa_supplicant.service                               
  25ms systemd-tmpfiles-setup-dev.service                   
  25ms ufw.service                                          
  18ms systemd-tmpfiles-setup.service                       
  15ms modprobe@fuse.service                                
  12ms systemd-sysctl.service                               
  11ms systemd-update-utmp.service                          
  11ms maia-console@tty1.service                            
  11ms systemd-backlight@leds:dell::kbd_backlight.service   
  10ms dev-hugepages.mount                                  
  10ms dev-mqueue.mount                                     
  10ms modprobe@configfs.service                            
  10ms modprobe@drm.service                                 
   9ms sys-kernel-debug.mount                               
   9ms sys-kernel-tracing.mount                             
   9ms user-runtime-dir@1000.service                        
   8ms kmod-static-nodes.service                            
   5ms systemd-remount-fs.service                           
   5ms systemd-user-sessions.service                        
   5ms systemd-backlight@backlight:intel_backlight.service  
   4ms systemd-fsck@dev-disk-by\x2duuid-E087\x2d471D.service
   4ms sys-kernel-config.mount                              
   3ms rtkit-daemon.service                                 
   2ms tmp.mount                                            
   1ms sys-fs-fuse-connections.mount    
graphical.target @1.474s
└─multi-user.target @1.207s
  └─systemd-user-sessions.service @1.202s +5ms
    └─nss-user-lookup.target @1.228s

I have already optimized whatever i could for now, I would appreciate any suggestions

I know its already enough but i am just trying to test my systems limit and expand my knowledge, so its kinda fun.

This is what I’m using since months, and well… Has helped a lot!

systemd-analyze
Startup finished in 873ms (kernel) + 687ms (initrd) + 855ms (userspace) = 2.416s 
graphical.target reached after 570ms in userspace
1 Like

Thanks for such quick reply :smile:

I have tried using cat vs lz4 and my system is giving me faster boot time with lz4. I tried booting it 5 times for each and its consistent for me.

your boot time is extremely fast. How did you achieve that?

I disabled services which I don’t need; I implemented some grub options, I tweaked some kernel parameters.

A thing about grub which has helped like cat compression, has been libahci.ignore_sss=1

1 Like

Interesting :thinking:

I do have notifications on, always ready to help!

The quad core i7-7700HQ with the 2TB HDD is the main reason…

I would assume you can pull 8 virtual core from the i7, but HDD are generally slower, especially if you have nearly 2TB, and the 7700HQ has a clever method of addressing ROM memory as chunks.

What you could do is disabling the systemd journal flushing, change it to volatile.

You may also set the mounting method of the root partition to “noatime” in /etc/fstab/

Hope this helped a bit!

1 Like

My system boots up from ssd, hdd is not mounted unless i do it from my file manager. noatime was already enabled for my root partition by default.

also this is my grub options -

 cat /etc/default/grub
GRUB_DEFAULT="Manjaro Linux"
GRUB_TIMEOUT="0"
GRUB_TIMEOUT_STYLE="hidden"
GRUB_RECORDFAIL_TIMEOUT="$GRUB_HIDDEN_TIMEOUT"
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet audit=0 loglevel=0 fsck.mode=skip i915.fastboot=1 ipv6.disable=1 nowatchdog pcie_aspm=off mitigations=off noibrs noibpb no_stf_barrier tsx=on"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT="false"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK="y"

# Uncomment to use basic console
GRUB_TERMINAL_INPUT="console"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT="console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE="1920x1080"

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX="keep"

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY="true"

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
export GRUB_COLOR_NORMAL="light-gray/black"
export GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

GRUB_HIDDEN_TIMEOUT="0"
GRUB_DISABLE_OS_PROBER="true"
GRUB_DISABLE_LINUX_RECOVERY="true"
1 Like

are you also using a custom kernel? your kernel time is really fast.

Oh, my bad! I am currently out so I am on my phone right now, and might not have seen everything…
Do you absolutely need grub, may I ask?

Else, you could try systemd-boot!

1 Like

Nope; I’m on vanilla 4.14.

Outupt of my inxi:

Summary
System:    Kernel: 4.14.222-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-4.14-x86_64 root=UUID=0d37cf27-2ff0-4234-a80e-4be323299166 rw i915.fastboot=1 
           i915.modeset=1 i915.enable_rc6=0 i915.enable_dc=0 quiet "acpi_osi=Windows 2009" libahci.ignore_sss=1 
           random.trust_cpu=on pcie_aspm=force scsi_mod.use_blk_mq=1 nowatchdog nmi_watchdog=0 mitigations=off 
           nospec_store_bypass_disable noibrs noibpb nopti nospec nospectre_v1 no_stf_barrier 
           kvm-intel.vmentry_l1d_flush=never audit=0 loglevel=0 udev.log_priority=0 rd.udev.log_priority=0 
           rd.systemd.show_status=false net.ifnames=0 systemd.unified_cgroup_hierarchy=true noresume 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm4 dm: LightDM 1.30.0 Distro: Manjaro Linux 
Machine:   Type: Laptop System: Hewlett-Packard product: HP ProBook 6470b v: A1029D1102 serial: <filter> Chassis: type: 10 
           serial: <filter> 
           Mobo: Hewlett-Packard model: 179C v: KBC Version 42.38 serial: <filter> BIOS: Hewlett-Packard v: 68ICE Ver. F.73 
           date: 08/07/2018 
Battery:   ID-1: BAT0 charge: 61.4 Wh condition: 61.4/61.4 Wh (100%) volts: 12.5/10.8 model: Hewlett-Packard Primary 
           type: Li-ion serial: <filter> status: Full 
           Device-1: hidpp_battery_2 model: Logitech Wireless Mobile Mouse MX Anywhere 2S serial: <filter> 
           charge: 10% (should be ignored) rechargeable: yes status: Discharging 
           Device-2: hidpp_battery_3 model: Logitech Wireless Touch Keyboard K400 Plus serial: <filter> 
           charge: 100% (should be ignored) rechargeable: yes status: Discharging 
Memory:    RAM: total: 15.55 GiB used: 2.35 GiB (15.1%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Info: Dual Core model: Intel Core i5-3210M bits: 64 type: MT MCP arch: Ivy Bridge family: 6 model-id: 3A (58) 
           stepping: 9 microcode: 20 L2 cache: 3 MiB bogomips: 19963 
           Speed: 2715 MHz min/max: 1200/3100 MHz Core speeds (MHz): 1: 2715 2: 2697 3: 2894 4: 2904 
           Flags: acpi aes aperfmperf apic arat arch_perfmon avx bts clflush cmov constant_tsc cpuid cpuid_fault cx16 cx8 de 
           ds_cpl dtes64 dtherm dts epb ept erms est f16c flexpriority flush_l1d fpu fsgsbase fxsr ht ibpb ibrs ida lahf_lm lm 
           mca mce mmx monitor msr mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pebs pge pln pni popcnt pse pse36 
           pts rdrand rdtscp rep_good sep smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc 
           tsc_deadline_timer vme vmx vnmi vpid x2apic xsave xsaveopt xtopology xtpr 
           Vulnerabilities: Type: itlb_multihit status: KVM: Vulnerable 
           Type: l1tf mitigation: PTE Inversion; VMX: vulnerable 
           Type: mds status: Vulnerable; SMT vulnerable 
           Type: meltdown status: Vulnerable 
           Type: spec_store_bypass status: Vulnerable 
           Type: spectre_v1 status: Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers 
           Type: spectre_v2 status: Vulnerable, IBPB: disabled, STIBP: disabled 
           Type: srbds status: Vulnerable: No microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:0166 class ID: 0300 
           Display: x11 server: X.Org 1.20.10 compositor: picom v: git-dac85 driver: loaded: intel display ID: :0 screens: 1 
           Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0") s-diag: 414mm (16.3") 
           Monitor-1: LVDS1 res: 1366x768 hz: 60 dpi: 112 size: 310x170mm (12.2x6.7") diag: 354mm (13.9") 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 20.3.4 compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 chip ID: 8086:1e20 class ID: 0403 
           Sound Server: ALSA v: k4.14.222-1-MANJARO 
Network:   Message: No Device data found. 
           Device-1: TP-Link Archer T9UH v1 [Realtek RTL8814AU] type: USB driver: 8814au bus ID: 4-3:11 chip ID: 2357:0106 
           class ID: 0000 serial: <filter> 
           IF: wlan0 state: up mac: <filter> 
           IP v4: <filter> type: dynamic noprefixroute scope: global broadcast: <filter> 
           IP v6: <filter> scope: link 
           WAN IP: <filter> 
Bluetooth: Message: No Bluetooth data was found. 
RAID:      Message: No RAID data was found. 
Drives:    Local Storage: total: 698.65 GiB used: 77.97 GiB (11.2%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB block size: physical: 512 B 
           logical: 512 B speed: 6.0 Gb/s rotation: SSD serial: <filter> rev: 4B6Q scheme: MBR 
           ID-2: /dev/sdb maj-min: 8:16 vendor: Crucial model: CT250MX500SSD1 size: 232.89 GiB block size: physical: 4096 B 
           logical: 512 B speed: 6.0 Gb/s rotation: SSD serial: <filter> rev: 023 scheme: MBR 
           Message: No Optical or Floppy data was found. 
Partition: ID-1: / raw size: 465.76 GiB size: 457.45 GiB (98.22%) used: 35.78 GiB (7.8%) fs: ext4 dev: /dev/sda1 maj-min: 8:1 
           label: N/A uuid: 0d37cf27-2ff0-4234-a80e-4be323299166 
           ID-2: /home/<filter>/mounts/servicedisk raw size: 232.88 GiB size: 228.23 GiB (98.00%) used: 42.19 GiB (18.5%) 
           fs: ext4 dev: /dev/sdb1 maj-min: 8:17 label: servicedisk uuid: 8412b438-5d7b-48bd-bfb1-46666bb7ac64 
Swap:      Alert: No Swap data was found. 
Unmounted: Message: No Unmounted partitions found. 
USB:       Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900 
           Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0 speed: 480 Mb/s chip ID: 8087:0024 
           class ID: 0900 
           Device-1: 1-1.2:4 info: Logitech Unifying Receiver type: Keyboard,Mouse,HID driver: logitech-djreceiver,usbhid 
           interfaces: 3 rev: 2.0 speed: 12 Mb/s chip ID: 046d:c52b class ID: 0300 
           Hub-3: 2-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900 
           Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0 speed: 480 Mb/s chip ID: 8087:0024 
           class ID: 0900 
           Hub-5: 3-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900 
           Hub-6: 4-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.0 speed: 5 Gb/s chip ID: 1d6b:0003 class ID: 0900 
           Device-1: 4-3:11 info: TP-Link Archer T9UH v1 [Realtek RTL8814AU] type: Network driver: 8814au interfaces: 1 
           rev: 3.0 speed: 5 Gb/s chip ID: 2357:0106 class ID: 0000 serial: <filter> 
Sensors:   System Temperatures: cpu: 43.0 C mobo: 0.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 236 Uptime: 27m wakeups: 54 Init: systemd v: 247 Compilers: gcc: 10.2.0 Packages: pacman: 1659 lib: 432 
           Shell: Bash v: 5.1.0 running in: xfce4-terminal inxi: 3.3.01
1 Like

No problem, i don’t need any specific boot loader. Grub was just installed by default so i was trying to optimize it using grub. Although i am dual booting to windows, pressing F12 gives me the option to select manjaro / windows boot manger.

will try to switch over to systemd-boot and report the change in timings.

Wow thats a lot of kernel parameters XD
this would be useful, i am gonna search and see which parameters i can use.

Thanks!

You can also take a look here :slight_smile:

https://forum.manjaro.org/t/my-system-tweaks-to-achieve-better-performances-based-on-my-needs/43808

But be careful: firstly, read it from first to last post; and remember: don’t blindly copying the same settings. Do your researches.

1 Like

Yes, thanks for the post.

1 Like

Please explain your highly opinionated tips for the less knowledgeable.

For those that don’t know, gzip is the default and Arch has switched to ztsd.

2 Likes

can you help me with the mkinitcpio.conf? @The_Quantum_Alpha