You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Containerd temporarily mount/umount all parent snapshots when unpacking each layer. The mount/umount can take 1~2 seconds for large layers. @dmcgowan told me that Docker has an "optimization" (dangerous hack) where it directly converts tars to overlayfs layers on disk without mounting. We could add this ability on unpack to optimize pull.
I made some local change to resolve 1) and 2) on my desktop, and here is the performance difference:
Docker 18.06: 28.033s
Containerd HEAD: 40.347s
Containerd HEAD - mount/umount: 36.521s
Containerd HEAD - mount/umount + simultaneous unpack: 29.898s
Pull image performance is important for some use case, e.g. fast auto scale. And the improvement is significant. We may want to do the optimization to avoid regression.
I recently did some benchmark to compare the pull image performance between containerd and docker.
It turns out that containerd image pull is significantly slower than Docker:
After some investigation, I find that this is mainly caused by 2 issues:
Docker has an "optimization" (dangerous hack) where it directly converts tars to overlayfs layers on disk without mounting. We could add this ability on unpack to optimize pull.I made some local change to resolve 1) and 2) on my desktop, and here is the performance difference:
Pull image performance is important for some use case, e.g. fast auto scale. And the improvement is significant. We may want to do the optimization to avoid regression.
/cc @containerd/containerd-maintainers