Skip to content

Conversation

@tonistiigi
Copy link
Member

Containerd v2.2 updated the ReadCloser returned from Fetcher to implement ReadAt, but it works by making a separate HTTP request for each read. This means lots of requests depending on the buffer size used by copy. In containerd content pkg buffer is 1MB.

Containerd change containerd/containerd@4bf1705

@cpuguy83 @dmcgowan I think this is unexpected that the objects return common interfaces but their performance may differ multiple times (100x+ more requests). This seems to fix the main pull case for buildkit, but there may be more accidental cases for hitting the new ReadAt method assuming it works with similar performance as Read/Seek. Lots of things like SectionReader use ReadAt by default and containerd content.Provider is ReadAt based.

Containerd v2.2 updated the ReadCloser returned from Fetcher
to implement ReadAt, but it works by making a separate HTTP request
for each read. This means lots of requests depending on the buffer
size used by copy. In containerd content pkg buffer is 1MB.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi
Copy link
Member Author

This is also likely related to #6359 . Although I think there the extra range request trigger some extra registry side bug.

@cpuguy83
Copy link
Member

Ah seems like a revert is in order.
I can open that later today.

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.

3 participants