Skip to content

bundle: read blobs in 4 MiB chunks during history export - #4137

Open
kevinmingtarja wants to merge 1 commit into
docker:masterfrom
kevinmingtarja:history-export-chunked-reads
Open

kevinmingtarja wants to merge 1 commit into
docker:masterfrom
kevinmingtarja:history-export-chunked-reads

Conversation

@kevinmingtarja

@kevinmingtarja kevinmingtarja commented Oct 10, 2026 •

Copy link
Copy Markdown

Fixes #4136

history export read blobs from the builder's content store in many small sequential reads, each a separate RPC, so exporting a record over a remote builder took tens of seconds. This buffers those reads so each blob is fetched in chunks of up to 4 MiB.

This runs on every CI build: docker/build-push-action exports the build record in its post step to generate the job summary, on by default unless DOCKER_BUILD_SUMMARY=false (build-push-action, actions-toolkit).

Exporting the same record from a remote builder (~80–120 ms per RPC), 5 runs each:

median Content/Read RPCs
master 26.0s 223
this PR 3.0s 4

With this PR, we're doing a lot less RPCs now:

Screenshot 2026-10-10 at 12 26 01 AM

Assisted by Claude Code (Claude Opus 5.5). Reviewed and validated fully by myself.

history export read blobs from the builder's content store in many
small sequential reads, each one a separate RPC, which made exporting a
record slow over a remote builder. Buffer these reads so each blob is
fetched in chunks of up to 4 MiB.

Fixes docker#4136

Signed-off-by: Kevin Mingtarja <kevin.mingtarja@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

history export: one record takes ~26s over a remote builder (223 sequential Content/Read RPCs)

1 participant