Skip to content

Restore decompression benchmarks#6957

Merged
kzys merged 1 commit intocontainerd:mainfrom
kzys:zstd-bench
May 19, 2022
Merged

Restore decompression benchmarks#6957
kzys merged 1 commit intocontainerd:mainfrom
kzys:zstd-bench

Conversation

@kzys
Copy link
Copy Markdown
Member

@kzys kzys commented May 18, 2022

The benchmarks were deleted in #2640 but we could use that to evaluate
zstd further.

Signed-off-by: Kazuyoshi Kato [email protected]

@k8s-ci-robot
Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kzys
Copy link
Copy Markdown
Member Author

kzys commented May 18, 2022

I was planning to call zstd(1) instead of using the pure Go implementation, but seems it wouldn't result any performance gain. Go is faster than I thought :)

% go test -bench BenchmarkDecompression
goos: linux
goarch: amd64
pkg: github.com/containerd/containerd/archive/compression
cpu: Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
BenchmarkDecompression/size=32MiB/gzip-96       1000000000               0.1552 ns/op
BenchmarkDecompression/size=32MiB/zstd-96       1000000000               0.08588 ns/op
BenchmarkDecompression/size=32MiB/gzipPureGo-96                 1000000000               0.2111 ns/op
BenchmarkDecompression/size=32MiB/zstdPureGo-96                 1000000000               0.08232 ns/op
BenchmarkDecompression/size=64MiB/gzip-96                       1000000000               0.2945 ns/op
BenchmarkDecompression/size=64MiB/zstd-96                       1000000000               0.1465 ns/op
BenchmarkDecompression/size=64MiB/gzipPureGo-96                 1000000000               0.4157 ns/op
BenchmarkDecompression/size=64MiB/zstdPureGo-96                 1000000000               0.1109 ns/op
BenchmarkDecompression/size=128MiB/gzip-96                      1000000000               0.6552 ns/op
BenchmarkDecompression/size=128MiB/zstd-96                      1000000000               0.3235 ns/op
BenchmarkDecompression/size=128MiB/gzipPureGo-96                1000000000               0.8044 ns/op
BenchmarkDecompression/size=128MiB/zstdPureGo-96                1000000000               0.2584 ns/op
BenchmarkDecompression/size=256MiB/gzip-96                             1        1275289951 ns/op
BenchmarkDecompression/size=256MiB/zstd-96                      1000000000               0.5624 ns/op
BenchmarkDecompression/size=256MiB/gzipPureGo-96                       1        1656262363 ns/op
BenchmarkDecompression/size=256MiB/zstdPureGo-96                1000000000               0.5702 ns/op
PASS
ok      github.com/containerd/containerd/archive/compression    160.223s
go test -bench BenchmarkDecompression  211.31s user 41.57s system 157% cpu 2:40.57 total

The benchmarks were deleted in containerd#2640 but we could use that to evaluate
zstd further.

Signed-off-by: Kazuyoshi Kato <[email protected]>
@kzys kzys marked this pull request as ready for review May 18, 2022 20:08
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants