bluerobotics / BlueOS

The open source platform for ROV, USV, robotic system operation, development, and expansion.
https://blueos.cloud/docs/
Other
151 stars 73 forks source link

Boot time improvements #1489

Open Williangalvani opened 1 year ago

Williangalvani commented 1 year ago

We ran some tests yesterday:

rafaellehmkuhl commented 1 year ago

Do we have a boot time profiling? RaspOS start time, Docker, Ardusub, services, etc.

Williangalvani commented 1 year ago

Do we have a boot time profiling? RaspOS start time, Docker, Ardusub, services, etc.

we can use systemd-analyze for overall pi boot time, systemd-analyze critical-chain for the critical chain, and systemd-analyze blame for a list of times taken by individual services. On top of that, core takes ~14 seconds to start after bootstrap is up

joaoantoniocardoso commented 1 year ago

To read: https://silvertonconsulting.com/2016/05/06/faster-docker-initialization-through-slacker-snapshots-nfs-storage/

edit: interesting, but their technique didn't change the time to run the containers, so it's useless for us, and probably too complicated anyways :x

Williangalvani commented 1 year ago

blueos_startup_update alone is taking roughly 10 seconds, which doesn't help.

patrickelectric commented 1 year ago

blueos_startup_update alone is taking roughly 10 seconds, which doesn't help.

We should add a version control system on that or something else to help us track when it's required to run.

patrickelectric commented 1 year ago

from @joaoantoniocardoso systemd-analyze plot > bootplot.svg bootplot

patrickelectric commented 1 year ago

Before #2020: boot time was 102s and moved to 90s (-12s) Moving to podmand: boot time was 102s and moved to 71s (-31s) Applying patches are taking 24s on log (python says 17s but it's wrong)

If we move to podman (-31s) and skip patch application (-24s) we can move BlueOS startup time to 35s. Experiments done with @joaoantoniocardoso

Tests done in a rasp pi 3

joaoantoniocardoso commented 1 year ago

Before #2020: boot time was 102s and moved to 90s (-12s) Moving to podmand: boot time was 102s and moved to 71s (-31s) Applying patches are taking 24s on log (python says 17s but it's wrong)

If we move to podman (-31s) and skip patch application (-24s) we can move BlueOS startup time to 35s. Experiments done with @joaoantoniocardoso

Tests done in a rasp pi 3

bootplot

patrickelectric commented 1 year ago

podman_service was responsible for starting BlueOS