-
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?
Conversation
| // TODO(vvoland): use the i.downloadLimiter directly | ||
| opts = append(opts, containerd.WithMaxConcurrentDownloads(i.limits.MaxConcurrentDownloads)) |
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.
For pulls, the maximum downloads is currently respected across one pull - not the whole engine. Pull creates its own semaphore.Weighted inside the private fetch function which makes it impossible to share one limiter for all pulls.
Possibly at some point we would need to have our own implementation of Pull anyway, so maybe it's fine for now? I also have a quick patch PoC for containerd that would allow to pass the semaphore.Weighted directly. So I could try to clean it up a bit and make a it PR for it upstream, WDYT?
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.
This is fine, from the help: Set the max concurrent downloads for each pull (default 3)
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.
The help text is misleading then - limit is per whole engine.
| opts = i.applySnapshotterOpts(opts, ref) | ||
|
|
||
| if i.limits.MaxConcurrentDownloads > 0 { | ||
| // TODO(vvoland): use the i.downloadLimiter directly |
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.Weighted for all pulls - to limit the downloads across whole engine and not one pull.
5e88685 to
ac7a31e
Compare
13b2b08 to
ff5b724
Compare
c4eca7c to
085bd47
Compare
Signed-off-by: Paweł Gronowski <[email protected]>
085bd47 to
9ff087d
Compare
Respect the maximum concurrent downloads/upload daemon configuration.
Signed-off-by: Paweł Gronowski [email protected]
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)