containerd / continuity

A transport-agnostic, filesystem metadata manifest system
https://containerd.io
Apache License 2.0
137 stars 66 forks source link

Support darwin clonefile #223

Closed dmcgowan closed 1 year ago

dmcgowan commented 1 year ago

Adds clonefile support on copy for Darwin.

Added benchmark to show it is working

goos: darwin
goarch: amd64
pkg: github.com/containerd/continuity/fs
cpu: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
                  │   before.txt    │              after.txt              │
                  │     sec/op      │   sec/op     vs base                │
LargeCopy100MB-16    92802.9µ ± 11%   412.2µ ± 3%  -99.56% (p=0.000 n=10)
LargeCopy1GB-16     894137.8µ ± 11%   409.6µ ± 3%  -99.95% (p=0.000 n=10)
geomean                288.1m         410.9µ       -99.86%

                  │   before.txt   │              after.txt               │
                  │      B/op      │     B/op      vs base                │
LargeCopy100MB-16   38.913Ki ±  6%   3.961Ki ± 0%  -89.82% (p=0.000 n=10)
LargeCopy1GB-16     45.193Ki ± 18%   3.961Ki ± 0%  -91.24% (p=0.000 n=10)
geomean              41.94Ki         3.961Ki       -90.55%

                  │ before.txt │             after.txt              │
                  │ allocs/op  │ allocs/op   vs base                │
LargeCopy100MB-16   41.00 ± 0%   35.00 ± 0%  -14.63% (p=0.000 n=10)
LargeCopy1GB-16     42.50 ± 4%   35.00 ± 0%  -17.65% (p=0.000 n=10)
geomean             41.74        35.00       -16.15%
AkihiroSuda commented 1 year ago

Let's release v0.4.0 after merging this

AkihiroSuda commented 1 year ago

https://github.com/containerd/continuity/releases/tag/v0.4.0

slonopotamus commented 1 year ago

Nice! This makes native containerd snapshotter actually usable on macOS.