Repository navigation
registry remotecache: push cache blobs in parallel - #6455
Merged
Merged
Conversation
tonistiigi
reviewed
Jan 13, 2026
Registry cache blob pushing was sequential, copying one layer at a time. This uses images.Dispatch to push all cache layer blobs in parallel, similar to how image export already handles layer pushing. The blobs are collected upfront, pushed concurrently, then added to the cache manifest in order after all pushes complete. Signed-off-by: Amr Mahdi <amrmahdi@meta.com>
amrmahdi
force-pushed
the
amrmahdi/parallel-cache-push
branch
from
January 14, 2026 00:50
520d199 to
87b57a2
Compare
There was a problem hiding this comment.
Pull request overview
This PR optimizes registry cache export by parallelizing cache blob uploads. Previously, cache layer blobs were pushed sequentially, which could be slow for large builds. The PR now uses images.Dispatch to push all cache layer blobs in parallel with a concurrency limit of 4 (matching the existing default for registry connections).
Changes:
- Refactored
util/resolver/limited/group.goto exposeDefaultMaxConcurrencyas a public variable - Modified
cache/remotecache/export.goto collect layer descriptors upfront, push them in parallel usingimages.Dispatch, then add them to the cache manifest in order
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| util/resolver/limited/group.go | Exposed DefaultMaxConcurrency as a public int64 variable (value 4) to allow reuse across packages |
| cache/remotecache/export.go | Refactored Finalize method to push cache layer blobs in parallel using images.Dispatch with semaphore-based concurrency control, while preserving blob order in the final manifest |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tonistiigi
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Registry cache blob pushing was sequential, copying one layer at a time. This uses images.Dispatch to push all cache layer blobs in parallel, similar to how image export already handles layer pushing.
The blobs are collected upfront, pushed concurrently, then added to the cache manifest in order after all pushes complete.