Skip to content

Add snapshotters benchmark#3152

Merged
estesp merged 2 commits intocontainerd:masterfrom
mxpv:bench
Apr 1, 2019
Merged

Add snapshotters benchmark#3152
estesp merged 2 commits intocontainerd:masterfrom
mxpv:bench

Conversation

@mxpv
Copy link
Copy Markdown
Member

@mxpv mxpv commented Apr 1, 2019

This PR adds snapshotters benchmark (that we used to compare performance between overlay and devmapper) and CloudFormation template to run suitable environment for testing (with installed dependencies and prepared devmapper pool and volumes in advance).

/cc @samuelkarp @nmeyerhans

note: I can remove CF template if you think its unnecessary as its aws specific.

Signed-off-by: Maksym Pavlenko [email protected]

Signed-off-by: Maksym Pavlenko <[email protected]>
@estesp
Copy link
Copy Markdown
Member

estesp commented Apr 1, 2019

I would suggest putting the CF template somewhere in contrib/ just to clarify it isn't a supported part of containerd

@mxpv
Copy link
Copy Markdown
Member Author

mxpv commented Apr 1, 2019

@estesp done

@codecov-io
Copy link
Copy Markdown

codecov-io commented Apr 1, 2019

Codecov Report

Merging #3152 into master will decrease coverage by 8.75%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3152      +/-   ##
==========================================
- Coverage   49.25%   40.49%   -8.76%     
==========================================
  Files         100       74      -26     
  Lines        9415     9898     +483     
==========================================
- Hits         4637     4008     -629     
- Misses       3955     5324    +1369     
+ Partials      823      566     -257
Flag Coverage Δ
#linux ?
#windows 40.49% <ø> (?)
Impacted Files Coverage Δ
snapshots/native/native.go 1.79% <0%> (-51.25%) ⬇️
archive/tar.go 16.99% <0%> (-33.86%) ⬇️
metadata/snapshot.go 21.53% <0%> (-33.23%) ⬇️
cio/io.go 1.52% <0%> (-25.75%) ⬇️
content/local/writer.go 56.86% <0%> (-7.34%) ⬇️
metadata/containers.go 47.97% <0%> (-6.62%) ⬇️
content/local/store.go 48.51% <0%> (-5.03%) ⬇️
metadata/images.go 57.57% <0%> (-4.99%) ⬇️
archive/tar_opts.go 28.57% <0%> (-4.77%) ⬇️
archive/compression/compression.go 58.69% <0%> (-4.7%) ⬇️
... and 98 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d0a06d...d9526f5. Read the comment docs.

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

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

@estesp estesp merged commit 932f883 into containerd:master Apr 1, 2019
@mxpv mxpv deleted the bench branch April 1, 2019 21:30
@dmcgowan
Copy link
Copy Markdown
Member

dmcgowan commented Apr 1, 2019

I think having these tests are a good idea, but I would prefer the testsuite package not divert from the suite approach. Benchmarks can be implemented in the same way as unit tests and the individual packages can run their own instance of benchmarks. That prevents a single test package needing to import all the snapshotters. You can still run multiple packages in one command still go test -bench=. ./snapshots/overlay ./snapshots/devmapper

@mxpv
Copy link
Copy Markdown
Member Author

mxpv commented Apr 1, 2019

@dmcgowan that's reasonable. is it fine to put common benchmark code to snapshots/ directory than?

@dmcgowan
Copy link
Copy Markdown
Member

dmcgowan commented Apr 1, 2019

The common benchmark code in snapshots/testsuite is fine. The main difference from the unit tests here seems to be how the root is configured, but that could be smarter to allow the individual tests to set a base root.

Updating the unit tests code to support this could be nice too if it is useful for devmapper to use the tests to verify the devmapper configuration.

@mxpv
Copy link
Copy Markdown
Member Author

mxpv commented Apr 1, 2019

Ok, I'll submit another PR for this.

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.

6 participants