Boot optimization for vim3l

note: this is not question or tutorial just my casual comments on this topic since I didn’t find much in fourm about it so posted in hope it help someone.

first step analyze current boot sequence some help full commands are as bellow:

  • khadas@Khadas:~$ systemd-analyze
    Startup finished in 14.104s (kernel) + 13.168s (userspace) = 27.273s
    graphical.target reached after 12.966s in userspace

  • khadas@Khadas:~$ systemd-analyze blame
    6.979s NetworkManager-wait-online.service
    2.435s networkd-dispatcher.service
    2.341s systemd-modules-load.service
    2.232s dev-mmcblk1p2.device
    2.107s ModemManager.service
    1.897s udisks2.service
    1.458s lightdm.service
    1.370s NetworkManager.service
    1.270s loadcpufreq.service
    1.202s avahi-daemon.service
    998ms systemd-logind.service
    996ms wpa_supplicant.service
    898ms fenix-zram-config.service
    791ms networking.service
    766ms apache2.service
    640ms zram-setup@zram2.service
    639ms zram-setup@zram0.service
    637ms zram-setup@zram3.service
    636ms zram-setup@zram1.service
    634ms zram-setup@zram5.service
    627ms zram-setup@zram4.service
    547ms rsyslog.service
    514ms systemd-udev-trigger.service
    481ms systemd-udevd.service
    416ms ssh.service
    388ms keyboard-setup.service

  • khadas@Khadas:~$ systemd-analyze --no-pager critical-chain
    The time after the unit is active or started is printed after the “@” character.
    The time the unit takes to start is printed after the “+” character.

graphical.target 12.966s
└─multi-user.target @12.966s
└─getty.target 12.965s
└─getty@tty1.service 12.943s
└─rc-local.service 12.563s +338ms
└─network-online.target 12.558s
└─NetworkManager-wait-online.service 5.577s +6.979s
└─NetworkManager.service 4.201s +1.370s
└─dbus.service 4.168s
└─basic.target 3.965s
└─fenix-hardware-optimize.service 3.938s +26ms
└─sysinit.target 3.908s
└─systemd-update-utmp.service 3.857s +49ms
└─systemd-tmpfiles-setup.service 3.659s +193ms
└─local-fs.target 3.592s
└─run-user-113.mount 12.836s
└─local-fs-pre.target 1.241s
└─systemd-tmpfiles-setup-dev.service 1.067s +172ms
└─systemd-sysusers.service 805ms +252ms
└─systemd-remount-fs.service 733ms +67ms
└─systemd-journald.socket 666ms
└─-.mount 652ms
└─systemd-journald.socket 666ms
└─…

has other analyze methodes

  • after that has beel able to get bootgraph from bootgraph.pll tool but not quite clear

  • not successful setting init=/usr/lib/systemd/systemd-bootchart to get graph from it.

  • on optimization part only worked with “systemctl disable” to disable services to autoboot services can still work by commands and scripts after boot