Skip to content

Add option to compress blobs on import#3455

Merged
estesp merged 1 commit intocontainerd:masterfrom
dmcgowan:fix-default-import-compression
Jul 25, 2019
Merged

Add option to compress blobs on import#3455
estesp merged 1 commit intocontainerd:masterfrom
dmcgowan:fix-default-import-compression

Conversation

@dmcgowan
Copy link
Copy Markdown
Member

Change the default back to leave uncompressed and add option to do the compression.

Fixes #3453

$ time ctr images import /tmp/kube-apiserver.tar                                                           
unpacking gcr.io/google-containers/kube-apiserver:v1.15.1 (sha256:91db5f34e0511159cb0eb24cd334f80be45561867f570b54b8aff9bcd3201073)...done
ctr images import /tmp/kube-apiserver.tar  0.85s user 0.17s system 15% cpu 6.537 total
$ time ctr images import --compress-blobs /tmp/kube-apiserver.tar
unpacking gcr.io/google-containers/kube-apiserver:v1.15.1 (sha256:2245106da92a70e3ed831b597641dcfefd5489a3e736598fb5598a14e37eb350)...done
ctr images import --compress-blobs /tmp/kube-apiserver.tar  18.03s user 6.20s system 81% cpu 29.866 total

As seen from above, the compression may add a non-trivial amount of time on import and therefore should not be the default. The option is useful when importing before a push or to reduce the size of the import blob. Note this only affects archives created through docker save, which does not compress today. Archives exported from containerd will preserve manifests and blobs.

Change the default back to leave uncompressed and add
option to do the compression.

Signed-off-by: Derek McGowan <[email protected]>
@dmcgowan dmcgowan requested a review from Random-Liu July 25, 2019 19:09
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 25, 2019

Build succeeded.

@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 29930e9 into containerd:master Jul 25, 2019
@Random-Liu
Copy link
Copy Markdown
Member

LGTM

@dmcgowan dmcgowan deleted the fix-default-import-compression branch September 10, 2019 17:42
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.

Regression in ctr images import.

4 participants