Improve image pull performance from http 1.1 container registries#4653
Improve image pull performance from http 1.1 container registries#4653estesp merged 3 commits intocontainerd:masterfrom
Conversation
Private registries that does not support http 2.0 such as Azure Container Registry streams back content in a max of 16KB chunks (max TLS record size). The small chunks introduce an overhead when copying the layers to the content store sine each chunk incurs the overhead of grpc message that has to be sent to the content store. This change reduces this overhead by buffering the chunks into 1MB chunks and only then writes a message to the content store. Below is a per comparsion between the 2 approaches using a couple of large images that are being pulled from the docker hub (http 2.0) and a private Azure CR (http 1.1) in seconds. image | Buffered copy | master ------- |---------------|---------- docker.io/pytorch/pytorch:latest | 55.63 | 58.33 docker.io/nvidia/cuda:latest | 72.05 | 75.98 containerdpulltest.azurecr.io/pytorch/pytorch:latest | 61.45 | 77.1 containerdpulltest.azurecr.io/nvidia/cuda:latest | 77.13 | 85.47 Signed-off-by: Amr Mahdi <[email protected]>
|
Hi @amrmahdi. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Build succeeded.
|
|
/ok-to-test |
|
Looks like you are missing DCO on the 2nd commit. |
Signed-off-by: Amr Mahdi <[email protected]>
a8a70ea to
f6834d4
Compare
|
Build succeeded.
|
Signed-off-by: Amr Mahdi <[email protected]>
ec7cd79 to
b81917e
Compare
|
Build succeeded.
|
|
@mikebrow LGTY? |
|
Maintainers can merge this PR since there are two approvals. |
…t-transfer Improve image pull performance from http 1.1 container registries (cherry picked from commit cc3785c) Signed-off-by: Amr Mahdi <[email protected]>
- Update to containerd 1.4.2 - Update Golang runtime to 1.15.5 Upstream containerd 1.4.2 release notes: https://github.com/containerd/containerd/releases/tag/v1.4.2 Welcome to the v1.4.2 release of containerd! ------------------------------------------------------ The second patch release for containerd 1.4 includes multiple minor fixes and updates. Notable Updates - Fix bug limiting the number of layers by default containerd/cri#1602 - Fix selinux shared memory issue by relabeling /dev/shm containerd/cri#1605 - Fix unknown state preventing removal of containers containerd/containerd#4656 - Fix nil pointer error when restoring checkpoint containerd/containerd#4754 - Improve image pull performance when using HTTP 1.1 containerd/containerd#4653 - Update default seccomp profile for pidfd containerd/containerd#4730 - Update Go to 1.15 Windows - Fix integer overflow on Windows containerd/containerd#4589 - Fix lcow snapshotter to read trailing tar data containerd/containerd#4628 Signed-off-by: Sebastiaan van Stijn <[email protected]>
NOTE: the Dockerfile currently uses a single version of Golang for all
stages. This means that currently, all binaries are built with Go
1.13.x, including the containerd binary; upstream containerd switched
to use Go 1.15.
full diff: containerd/containerd@v1.4.1...v1.4.2
Release notes:
Welcome to the v1.4.2 release of containerd!
------------------------------------------------------
The second patch release for containerd 1.4 includes multiple minor fixes
and updates.
Notable Updates
- Fix bug limiting the number of layers by default containerd/cri#1602
- Fix selinux shared memory issue by relabeling /dev/shm containerd/cri#1605
- Fix unknown state preventing removal of containers containerd/containerd#4656
- Fix nil pointer error when restoring checkpoint containerd/containerd#4754
- Improve image pull performance when using HTTP 1.1 containerd/containerd#4653
- Update default seccomp profile for pidfd containerd/containerd#4730
- Update Go to 1.15
Windows
- Fix integer overflow on Windows containerd/containerd#4589
- Fix lcow snapshotter to read trailing tar data containerd/containerd#4628
Signed-off-by: Sebastiaan van Stijn <[email protected]>
NOTE: the Dockerfile currently uses a single version of Golang for all
stages. This means that currently, all binaries are built with Go
1.13.x, including the containerd binary; upstream containerd switched
to use Go 1.15.
full diff: containerd/containerd@v1.4.1...v1.4.2
Release notes:
Welcome to the v1.4.2 release of containerd!
------------------------------------------------------
The second patch release for containerd 1.4 includes multiple minor fixes
and updates.
Notable Updates
- Fix bug limiting the number of layers by default containerd/cri#1602
- Fix selinux shared memory issue by relabeling /dev/shm containerd/cri#1605
- Fix unknown state preventing removal of containers containerd/containerd#4656
- Fix nil pointer error when restoring checkpoint containerd/containerd#4754
- Improve image pull performance when using HTTP 1.1 containerd/containerd#4653
- Update default seccomp profile for pidfd containerd/containerd#4730
- Update Go to 1.15
Windows
- Fix integer overflow on Windows containerd/containerd#4589
- Fix lcow snapshotter to read trailing tar data containerd/containerd#4628
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Upstream-commit: 703951197c3338631ee0529dd9dd814d16f037f0
Component: engine
- Update to containerd 1.4.2 - Update Golang runtime to 1.15.5 Upstream containerd 1.4.2 release notes: https://github.com/containerd/containerd/releases/tag/v1.4.2 Welcome to the v1.4.2 release of containerd! ------------------------------------------------------ The second patch release for containerd 1.4 includes multiple minor fixes and updates. Notable Updates - Fix bug limiting the number of layers by default containerd/cri#1602 - Fix selinux shared memory issue by relabeling /dev/shm containerd/cri#1605 - Fix unknown state preventing removal of containers containerd/containerd#4656 - Fix nil pointer error when restoring checkpoint containerd/containerd#4754 - Improve image pull performance when using HTTP 1.1 containerd/containerd#4653 - Update default seccomp profile for pidfd containerd/containerd#4730 - Update Go to 1.15 Windows - Fix integer overflow on Windows containerd/containerd#4589 - Fix lcow snapshotter to read trailing tar data containerd/containerd#4628 Signed-off-by: Sebastiaan van Stijn <[email protected]>
NOTE: the Dockerfile currently uses a single version of Golang for all
stages. This means that currently, all binaries are built with Go
1.13.x, including the containerd binary; upstream containerd switched
to use Go 1.15.
full diff: containerd/containerd@v1.4.1...v1.4.2
Release notes:
Welcome to the v1.4.2 release of containerd!
------------------------------------------------------
The second patch release for containerd 1.4 includes multiple minor fixes
and updates.
Notable Updates
- Fix bug limiting the number of layers by default containerd/cri#1602
- Fix selinux shared memory issue by relabeling /dev/shm containerd/cri#1605
- Fix unknown state preventing removal of containers containerd/containerd#4656
- Fix nil pointer error when restoring checkpoint containerd/containerd#4754
- Improve image pull performance when using HTTP 1.1 containerd/containerd#4653
- Update default seccomp profile for pidfd containerd/containerd#4730
- Update Go to 1.15
Windows
- Fix integer overflow on Windows containerd/containerd#4589
- Fix lcow snapshotter to read trailing tar data containerd/containerd#4628
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 7039511)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Private registries that does not support http 2.0 such as Azure Container Registry streams back content in a max of 16KB chunks (max TLS record size). The small chunks introduce an overhead when copying the layers to the content store sine each chunk incurs the overhead of grpc message that has to be sent to the content store.
This change reduces this overhead by buffering the chunks into 1MB chunks and only then writes a message to the content store.
Below is a per comparsion between the 2 approaches using a couple of large images that are being pulled from the docker hub (http 2.0) and a private Azure CR (http 1.1) in seconds.
Test setup:
Signed-off-by: Amr Mahdi [email protected]