-
Notifications
You must be signed in to change notification settings - Fork 0
daemon/c8d: Limit concurrent downloads/uploads #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: c8d
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,6 +59,11 @@ func (i *ImageService) PullImage(ctx context.Context, image, tagOrDigest string, | |
| opts = append(opts, containerd.WithImageHandler(h)) | ||
| opts = i.applySnapshotterOpts(opts, ref) | ||
|
|
||
| if i.limits.MaxConcurrentDownloads > 0 { | ||
| // TODO(vvoland): use the i.downloadLimiter directly | ||
| opts = append(opts, containerd.WithMaxConcurrentDownloads(i.limits.MaxConcurrentDownloads)) | ||
|
Comment on lines
+63
to
+64
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For pulls, the maximum downloads is currently respected across one pull - not the whole engine.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fine, from the help:
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The help text is misleading then - limit is per whole engine. |
||
| } | ||
|
|
||
| out := streamformatter.NewJSONProgressOutput(outStream, false) | ||
| finishProgress := showProgress(ctx, jobs, out, pullProgress(i.client.ContentStore(), true)) | ||
| defer finishProgress() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this TODO means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intent here is to use the same
semaphore.Weightedfor all pulls - to limit the downloads across whole engine and not one pull.