agnos-builder
agnos-builder copied to clipboard
Boot time speedup
AGNOS 6:
- XBL: 3.5s
- ABL: 4.7s
- Kernel: 10.5s
- setup shows on screen: 38s
Added a script to print boot times. Here's where we're at as of 1e0f240f38622f752e926a0edb53efe9f23d5833
comma@tici:/data$ ./analyze-boot-time.py
------ ---- ----- ---
PON 1.5 1.5 9%
XBL 2.4 3.9 14%
ABL 3.7 7.6 21%
kernel 3.59 11.19 20%
weston 6.37 17.57 36%
comma 0.01 17.58 0%
onroad ? ? -
------ ---- ----- ---
Further reduction:
- up to 3s off the ABL, if both of these are fixed
- timeout fastboot faster if nothing plugged in (relies on USB enumeration)
- init screen faster for factory reset
- 1s off kernel? by turning stuff off and deferring init
- weston includes everything from /sbin/init all the way to weston being ready, lots to cut down here
- udev in particular is slow
- time-to-onroad isn't measured by the script yet, but that's at least another 5s
Useful commands
systemd-analyze time
systemctl list-dependencies comma.service
journalctl -u weston.service -u weston-ready.service -o short-monotonic
References
- https://elinux.org/Boot_Time
Related to locking https://github.com/commaai/openpilot/issues/30894.
My current (early) progress is running ./analyze-boot-time.py + running the useful commands from the previous comment + analyzing dmesg with initcall_debug and generating a boot.svg with scripts/bootgraph.pl.