ankaios
ankaios copied to clipboard
Re-use existing container bundles on device re-start
Description
Currently as implemented in #5 existing containers in status "exited" will be deleted and re-created on device restart. Measurements have revealed that the creation of a container bundle takes about ~50% of the whole startup time. So starting an existing container bundle will save about 50% of the time compared to deleting and re-creating the bundle.
As startup time is crucial in automotive for certain applications, this issue should collect pros and cons to re-use existing container bundles in order speed-up startup.
Currently the procedure on agent start is something like
- Call
podman ps -a
to get all existing containers - For each container matching the state
- If it is running keep it running
- If it is exited and shall be running call
podman rm ...
followed bypodman run
.
The proposed change is:
- Call
podman ps -a
to get all existing containers - For each container matching the state
- If it is running keep it running
- If it is exited and shall be running call
podman start ...
.
Pros:
- Faster startup times
- Less Flash wear out due to less write operations
- Preparation for bundles residing on read-only partition (although for that a separate concept would be required)
Cons:
- ...
Goals
Increase startup time for containers when container bundle already exists on disk.
Final result
Summary
To be filled when the final solution is sketched.
Tasks
- [ ] Task 1
- [ ] Task 2
- [ ] ...