containerd worker: use diff service instead of client-side implementation#2366
containerd worker: use diff service instead of client-side implementation#2366ktock wants to merge 1 commit into
Conversation
|
Containerd's diff service doesn't support custom compresor (containerd/containerd#5735) so zstd support is limited to OCI worker. https://github.com/moby/buildkit/pull/2366/checks?check_run_id=3623798830#step:7:1046 |
|
@tonistiigi WDYT about #2366 (comment) ? |
bdc14ce to
dfb0658
Compare
| enableOverlay, fallback = true, true | ||
| switch d.sn.Name() { | ||
| case "overlayfs", "fuse-overlayfs", "stargz": | ||
| logWarnOnErr = true // snapshotter should support overlay diff. so print warn log on failure |
There was a problem hiding this comment.
Does “fuse-overlayfs” really support overlay diff?
There was a problem hiding this comment.
Thank you for pointing this. No, it doesn't because fuse-overlayfs snapshotter doesn't provide overlayfs mounts. Disabled it for fuse-overlayfs snapshotter.
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
dfb0658 to
cbda4a2
Compare
|
I'm not really sure if these hacks are worth it. If we can fix the buffering issue and performance compared to oci worker is in +10-20% range I'd be ok with just using the client-side implementation always. Some cleanup in this area might be good though. Currently, we have exceptions for overlay-native, windows and zstd. All of them could be implemented in containerd as well if the performance parity is needed but I don't think it is very important to have it instantly. In #buildkit while discussing mergeop with @sipsma we've come up with another exception where we want certain refs to store their changes list for upper layer directly in ref metadata. This is so that we can guarantee the diff remains persistent when it is copied to different snapshot chains. If that list exists for a ref it would be used as a source for the differ, so again something that containerd API itself does not support. FYI @aaronlehmann |
|
Thank you for the comment. At least fixing the buffering issue seems to be needed instantly. I'll open a PR for the fix. |
Fixes: #2365
This commit fixes containerd worker to use containerd's diff service instead of client-side implementation to avoid the performance regression. Overlayfs differ will be enabled only for OCI worker.
As discussed in #2365, to allow containerd worker using overlayfs differ, we'll need to port the differ implementation to containerd diff serivce.