在镜像内查看镜像拉取情况:

ls /.stargz-snapshotter/*

benchmark:

time nerdctl —snapshotter=overlayfs run -it —rm ghcr.io/stargz-containers/python:3.7-org python3 -c ‘print(“hi”)’

185.0 B/s的情况下 29s

time nerdctl —snapshotter=stargz run -it —rm ghcr.io/stargz-containers/python:3.7-esgz python3 -c ‘print(“hi”)’

10分钟+

mount结果:

stargz on /var/lib/containerd-stargz-grpc/snapshotter/snapshots/3/fs type fuse.rawBridge (rw,nodev,relatime,user_id=0,group_id=0,allow_other)

snapshot/snapshot.go NewSnapshotter
—> restoreRemoteSnapshot
�——> prepareRemoteSnapshot
�———> . fs/fs.go . Mount
�————> . fs/layer/layer.go . Resolve
�—�————> fs/layer/layer.go . resolveBlob
��—�—————> �fs/remote/resolver.go Resolve