Differ: write diff to the content store over bufio writer#2388
Merged
Conversation
ktock
commented
Oct 4, 2021
| } | ||
| }() | ||
|
|
||
| bufW := bufio.NewWriterSize(cw, 131072) |
Collaborator
Author
There was a problem hiding this comment.
Any suggestions for the buffer size? Tried 64KiB but the it made the export slower in +20-30% range.
https://github.com/ktock/buildkit/actions/runs/1301780687
Collaborator
Author
There was a problem hiding this comment.
Thank you for the review. Fixed.
tonistiigi
reviewed
Oct 4, 2021
| } | ||
| }() | ||
|
|
||
| bufW := bufio.NewWriterSize(cw, 131072) |
c4e1a97 to
2bfd729
Compare
Collaborator
Author
Added the results with OCI worker. |
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2bfd729 to
4f3e74c
Compare
tonistiigi
approved these changes
Oct 4, 2021
AkihiroSuda
approved these changes
Oct 4, 2021
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.
Fixes: #2365
Alternative of #2366
This commit mitigates the recent performance regression of layer exports with containerd worker + overlayfs differ.
The following measures time to take for
exporting layersof the following Dockerfile with changing the layer size from 50MB to 1GB (source).Measured on GitHub Actions
ubuntu-20.04runner.containerd worker
The regression is mitigated by this patch.
master version
https://github.com/ktock/buildkit/actions/runs/1295331304
The overlay differ + containerd worker shows about 2x slower exports.
${SIZE}(avg. of 3 samples)
This patch
https://github.com/ktock/buildkit/actions/runs/1301685570
Mitigates the performance regression to about 10%.
${SIZE}(avg. of 3 samples)
OCI worker
No large regression is observed.
master
https://github.com/ktock/buildkit/actions/runs/1295331304
${SIZE}This patch
https://github.com/ktock/buildkit/actions/runs/1301685570
${SIZE}