Closed apostasie closed 3 weeks ago
About the "perf boost": un-scientific measurement show 30% speed-up at minimum compression for Alpine - and ~15% at max compression.
Adding cleaned-up test as well (now that we can parallelize).
Fixed.
Could you update labels.LabelUncompressed with the actual uncompressed digest, using Digester of go-digest? e.g.: https://github.com/containerd/containerd/blob/4a18adcfca4e37e829c0d3174bd04d4cbf222f9a/core/diff/apply/apply.go#L90
Could you update labels.LabelUncompressed with the actual uncompressed digest, using Digester of go-digest? e.g.: https://github.com/containerd/containerd/blob/4a18adcfca4e37e829c0d3174bd04d4cbf222f9a/core/diff/apply/apply.go#L90
That would change the current behavior then, right?
Currently, on main
we are calling on LayerConvertFunc
(which does delete the label from the uncompressed resource), and then we just commit the original info labels, untouched:
https://github.com/containerd/nerdctl/blob/main/pkg/imgutil/converter/zstd.go#L110
Can you clarify why we should change this behavior?
Is the current logic faulty on that?
Can you clarify why we should change this behavior? Is the current logic faulty on that?
The current logic isn't faulty but it's good to make sure that the content has the correct LabelUncompressed (this can be used for fast path as mentioned in https://github.com/containerd/nerdctl/pull/3079#discussion_r1634447937 ). But yes, we can do that as a following up so this patch looks good for now.
Thanks a lot @ktock Appreciate the fast review on this!
Fix #3078 by removing use of intermediary uncompressed layer.
This incidentally gives us a small (?) perf boost (as we no longer read and write resources twice).
This will make convert tests able to be run concurrently.
@AkihiroSuda and team - PTAL at your convenience