bootc-dev / bootc-dev/bootc

[ostree-rs-ext] Parallelize Writing OCI image

Open
#1,683 1 comment 0 reactions 0 assignees View on GitHub
triaged
Dominant language
Rust
Stars
2.3k
Forks
230
Avg merge
3d 12h
Merged PRs (30d)
38

Description

Currently, ostree-rs-ext is single threaded. When outputting a compressed gz images, this makes it so it requires around ~6min on a 2c/4t system for a large image such as Bazzite.

This could be more than halved by outputting the layers in parallel, as there is no implicit requirement for them to be linked. However, the current code makes it difficult to achieve due to the shared ostree object.

This consumes a large part of the build process, so let's try to improve on that over the next few months.

The compressed images it outputs compare favorably to compression by podman size-wise. In addition, when uploading multiple tags, podman recompresses the image per tag, so it cumulatively takes longer as opposed to uploading the raw oci with skopeo. Therefore, this fix should go to ostree-rs-ext.

Another 2 minutes could be spared by parallelizing ostree, however that would be much harder to do.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.