Improving boot up speed

I am using the SSD in the system, the speed is now significantly boosted, but still I feel it is slow. I am not sure why NTP is taking too much time (even though network service is ready in 5 secs)

23.035s ntpdate.service
 5.539s NetworkManager-wait-online.service
 3.143s plymouth-quit.service
 3.107s plymouth-quit-wait.service
 3.015s systemd-modules-load.service
  833ms NetworkManager.service
  830ms docker.service
  764ms dev-nvme0n1p3.device
  624ms systemd-tmpfiles-setup.service
  355ms vboxdrv.service
Startup finished in 4.785s (firmware) + 5.582s (loader) + 2.053s (kernel) + 27.571s (userspace) = 39.991s 
graphical.target reached after 27.571s in userspace.
System:
  Kernel: 6.4.16-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.4-x86_64
    root=UUID=44e25003-1f04-4d4c-ae58-396e08b83bc4 rw splash
    udev.log_priority=3
  Desktop: KDE Plasma v: 5.27.8 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: ASUSTeK product: TUF Gaming FX505GT_FX505GT v: 1.0
    serial: <superuser required>
  Mobo: ASUSTeK model: FX505GT v: 1.0 serial: <superuser required>
    UEFI: American Megatrends v: FX505GT.311 date: 02/08/2021
Battery:
  ID-1: BAT0 charge: 14.1 Wh (43.7%) condition: 32.3/48.1 Wh (67.2%)
    volts: 12.3 min: 11.7 model: Simplo SDI ICR18650 type: Li-ion
    serial: <filter> status: charging cycles: 41
CPU:
  Info: model: Intel Core i7-9750H bits: 64 type: MT MCP arch: Coffee Lake
    gen: core 9 level: v3 note: check built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 0xA (10) microcode: 0xF4
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 1541 high: 1600 min/max: 800/4500 scaling:
    driver: intel_pstate governor: powersave cores: 1: 1600 2: 1600 3: 901
    4: 1600 5: 1600 6: 1600 7: 1600 8: 1600 9: 1599 10: 1600 11: 1599 12: 1600
    bogomips: 62431
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS, IBPB: conditional, STIBP: conditional,
    RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: ASUSTeK
    driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
    ports: active: eDP-1 empty: none bus-ID: 00:02.0 chip-ID: 8086:3e9b
    class-ID: 0300
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: ASUSTeK
    driver: nvidia v: 535.104.05 alternate: nouveau,nvidia_drm non-free: 535.xx+
    status: current (as of 2023-08) arch: Turing code: TUxxx
    process: TSMC 12nm FF built: 2018-22 pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 01:00.0 chip-ID: 10de:1f91 class-ID: 0300
  Device-3: IMC Networks USB2.0 HD UVC WebCam driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-11:2 chip-ID: 13d3:56a2
    class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.2.0
    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia
    alternate: fbdev,nouveau,nv,vesa dri: iris gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93") monitors: <missing: xrandr>
  Monitor-1: eDP-1 model: Najing CEC Panda 0x0036 built: 2018 res: 1920x1080
    dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
    ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 23.1.7-1 renderer: Mesa Intel UHD Graphics 630
    (CFL GT2) direct-render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK
    driver: sof-audio-pci-intel-cnl alternate: snd_hda_intel, snd_soc_skl,
    snd_sof_pci_intel_cnl bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403
  Device-2: NVIDIA vendor: ASUSTeK driver: snd_hda_intel v: kernel pcie:
    gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10fa
    class-ID: 0403
  API: ALSA v: k6.4.16-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 0.3.80 status: off with: wireplumber status: off
    tools: pw-cli,wpctl
  Server-3: PulseAudio v: 16.1 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 3000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: down mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) driver: btusb v: 0.8
    type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-14:3
    chip-ID: 8087:0aaa class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 1.38 TiB used: 172.06 GiB (12.2%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: 2200V MTFDHBA512TCK
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: P1MA0V4 temp: 44.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 870 EVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 3B6Q scheme: GPT
Partition:
  ID-1: / raw-size: 185.24 GiB size: 181.28 GiB (97.86%)
    used: 38.29 GiB (21.1%) fs: ext4 dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 283.38 GiB size: 277.87 GiB (98.06%)
    used: 35.78 GiB (12.9%) fs: ext4 dev: /dev/nvme0n1p5 maj-min: 259:4
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 7.81 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p2 maj-min: 259:2
Sensors:
  System Temperatures: cpu: 46.0 C pch: 57.0 C mobo: N/A
  Fan Speeds (rpm): cpu: 2300
Info:
  Processes: 304 Uptime: 7m wakeups: 21507 Memory: total: 16 GiB
  available: 15.47 GiB used: 2.85 GiB (18.4%) Init: systemd v: 254
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 alt: 12
  clang: 16.0.6 Packages: pm: pacman pkgs: 1491 libs: 375 tools: pamac,yay
  Shell: Bash v: 5.1.16 running-in: konsole inxi: 3.3.29

ntpdate.service is disabled here and this installation came that way by default:

ntpdate.service - One-Shot Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpdate.service; disabled; preset: disabled)
Active: inactive (dead)

I think you can disable it…mine is:

$ systemctl status ntpdate.service
â—‹ ntpdate.service - One-Shot Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpdate.service; disabled; preset: disabled)
Active: inactive (dead)

Sep 20 13:00:23 Mirdarthos-PC ntpd[34791]: 20 Sep 13:00:23 ntpd[34791]: Listen normally on 4 lo [::1]:123
Sep 20 13:00:23 Mirdarthos-PC ntpd[34791]: Listen normally on 3 eno1 10.0.0.20:123
Sep 20 13:00:23 Mirdarthos-PC ntpd[34791]: 20 Sep 13:00:23 ntpd[34791]: Listening on routing socket on fd #21 for interface updates
Sep 20 13:00:23 Mirdarthos-PC ntpd[34791]: Listen normally on 4 lo [::1]:123
Sep 20 13:00:23 Mirdarthos-PC ntpd[34791]: Listening on routing socket on fd #21 for interface updates
Sep 20 13:00:30 Mirdarthos-PC ntpd[34791]: ntpd: time slew +0.000319 s
Sep 20 13:00:30 Mirdarthos-PC ntpd[34791]: 20 Sep 13:00:30 ntpd[34791]: ntpd: time slew +0.000319 s
Sep 20 13:00:30 Mirdarthos-PC ntpd[34791]: ntpd: time slew +0.000319s
Sep 20 13:00:30 Mirdarthos-PC systemd[1]: ntpdate.service: Deactivated successfully.
Sep 20 13:00:30 Mirdarthos-PC systemd[1]: Finished One-Shot Network Time Service.

Edit:

I think, IIRC, you just need to enable systemd-timesyncd.service to replace it:

sudo systemctl enable --now systemd-timesyncd.service

Mine, as example:

$ systemctl status systemd-timesyncd.service                                                                                                                                                                                                        â—Ź systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; preset: enabled)
Active: active (running) since Wed 2023-09-20 12:25:30 SAST; 1h 10min ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 572 (systemd-timesyn)
Status: "Contacted time server 41.175.49.55:123 (2.manjaro.pool.ntp.org)."
Tasks: 2 (limit: 19080)
Memory: 2.2M
CPU: 43ms
CGroup: /system.slice/systemd-timesyncd.service
└─572 /usr/lib/systemd/systemd-timesyncd

Sep 20 12:25:30 Mirdarthos-PC systemd[1]: Starting Network Time Synchronization...
Sep 20 12:25:30 Mirdarthos-PC systemd[1]: Started Network Time Synchronization.
Sep 20 12:26:02 Mirdarthos-PC systemd-timesyncd[572]: Contacted time server 41.175.49.55:123 (2.manjaro.pool.ntp.org).
Sep 20 12:26:02 Mirdarthos-PC systemd-timesyncd[572]: Initial clock synchronization to Wed 2023-09-20 12:26:02.024543 SAST.

Edit #2:

For more:

https://wiki.archlinux.org/title/Systemd-timesyncd

1 Like

Here systemd takes care of it:

systemd-timedated.service                                  static          -       
systemd-timesyncd.service                                  enabled         enabled 
2 Likes