commaai / agnos-builder

Build AGNOS, the operating system for your comma 3/3X
32 stars 51 forks source link

Boot time speedup #110

Open adeebshihadeh opened 1 year ago

adeebshihadeh commented 1 year ago

AGNOS 6:

adeebshihadeh commented 1 year ago

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:

adeebshihadeh commented 7 months ago

Useful commands

systemd-analyze time
systemctl list-dependencies comma.service
journalctl -u weston.service -u weston-ready.service -o short-monotonic

References

andiradulescu commented 7 months ago

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.