-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Summary
- buildkit is faster on the first build compared to docker, and its multi-stage parallel builds are far more efficient than the latter.
- A comparison of the results of the 01 image build shows a speed increase compared to the latest Docker version (26.205632949 - 9.791309726) / 26.205632949 = 62.6%.
- buildkit has more significant cache utilization efficiency gains compared to docker for secondary cache builds.
- Looking at the pythoncuda image build, the second cache consumption is 274.253141433 / 310.089239040 = 88.44% of the first build, compared to 346.174570310 / 354.937599518 = 97.5% for the latest Docker version. Time saving (274.253141433 - 346.174570310) = -71.92s.
- The different build methods do not actually help with container image size.
- Although they both end up producing different layer files, both are based on OverlayFS tarball compression, which can save little space.
- Controlling the image size still has to be approached from other angles, such as
- Mastering Dockerfile packaging techniques such as multi-stage builds.
- Replacing the Docker Daemon storage engine for some more radical options.
Batch | 1 | 2 | ||||
---|---|---|---|---|---|---|
Engine | Version | Dockerfiles | Size (Min.) | Cost Time (Average) | Size (Min.) | Cost Time (Average) |
docker | docker:18.09-dind | 01 | 6.7MB | 21.518031592 | 6.7MB | 2.0920849165 |
pytorchcuda | 6.06GB | 346.498819327 | 6.06GB | 315.643858013 | ||
pytorchnocuda | 2.07GB | 145.608679127 | 2.07GB | 124.867800888 | ||
docker:19.03-dind | 01 | 6.7MB | 24.568581511 | 6.7MB | 2.5811410325 | |
pytorchcuda | 6.06GB | 345.907784574 | 6.06GB | 368.975733907 | ||
pytorchnocuda | 2.07GB | 171.159860534 | 2.07GB | 140.853525022 | ||
docker:20.10-dind | 01 | 6.7MB | 26.205632949 | 6.7MB | 2.703267634 | |
pytorchcuda | 6.06GB | 354.937599518 | 6.06GB | 346.174570310 | ||
pytorchnocuda | 2.07GB | 134.274947779 | 2.07GB | 115.477106795 | ||
buildkit | latest | 01 | 6.7MB | 9.791309726 | 6.7MB | 0.640428980 |
pytorchcuda | 6.06GB | 310.089239040 | 6.06GB | 274.253141433 | ||
pytorchnocuda | 2.07GB | 116.501044358 | 2.07GB | 97.542190338 |
01
pythonnocuda
pythoncuda
All Result
most data from https://github.com/arcosx/image-build-benchmark/actions
Engine | Version | Batch | Cost Time | Size | Dockerfiles |
---|---|---|---|---|---|
buildkit | latest | 1 | 9.842857074 | 6.7MB | 01 |
buildkit | latest | 2 | 0.623826959 | 6.7MB | 01 |
buildkit | latest | 1 | 9.739762377 | 6.7MB | 01 |
buildkit | latest | 2 | 0.657031000 | 6.7MB | 01 |
buildkit | latest | 1 | 115.836823837 | 2.07GB | pytorchnocuda |
buildkit | latest | 2 | 99.630524049 | 2.07GB | pytorchnocuda |
buildkit | latest | 1 | 117.165264879 | 2.07GB | pytorchnocuda |
buildkit | latest | 2 | 95.453856626 | 2.07GB | pytorchnocuda |
buildkit | latest | 1 | 294.971058991 | 6.06GB | pytorchcuda |
buildkit | latest | 2 | 276.494879150 | 6.06GB | pytorchcuda |
buildkit | latest | 1 | 325.207419088 | 6.06GB | pytorchcuda |
buildkit | latest | 2 | 272.011403716 | 6.06GB | pytorchcuda |
docker | docker:18.09-dind | 1 | 21.505729970 | 6.7MB | 01 |
docker | docker:18.09-dind | 2 | 2.062765073 | 6.7MB | 01 |
docker | docker:18.09-dind | 1 | 21.530333213 | 6.7MB | 01 |
docker | docker:18.09-dind | 2 | 2.12140476 | 6.7MB | 01 |
docker | docker:18.09-dind | 1 | 150.457999472 | 2.07GB | pytorchnocuda |
docker | docker:18.09-dind | 2 | 127.599738737 | 2.07GB | pytorchnocuda |
docker | docker:18.09-dind | 1 | 140.759358782 | 2.07GB | pytorchnocuda |
docker | docker:18.09-dind | 2 | 122.135863039 | 2.07GB | pytorchnocuda |
docker | docker:18.09-dind | 1 | 355.318607136 | 6.06GB | pytorchcuda |
docker | docker:18.09-dind | 2 | 318.155430170 | 6.06GB | pytorchcuda |
docker | docker:18.09-dind | 1 | 337.679031517 | 6.06GB | pytorchcuda |
docker | docker:18.09-dind | 2 | 313.132285855 | 6.06GB | pytorchcuda |
docker | docker:19.03-dind | 1 | 24.891717734 | 6.7MB | 01 |
docker | docker:19.03-dind | 2 | 2.631210337 | 6.7MB | 01 |
docker | docker:19.03-dind | 1 | 24.245445288 | 6.7MB | 01 |
docker | docker:19.03-dind | 2 | 2.531071728 | 6.7MB | 01 |
docker | docker:19.03-dind | 1 | 174.080275822 | 2.07GB | pytorchnocuda |
docker | docker:19.03-dind | 2 | 146.898676907 | 2.07GB | pytorchnocuda |
docker | docker:19.03-dind | 1 | 168.239445245 | 2.07GB | pytorchnocuda |
docker | docker:19.03-dind | 2 | 134.808373136 | 2.07GB | pytorchnocuda |
docker | docker:19.03-dind | 1 | 344.730033430 | 6.06GB | pytorchcuda |
docker | docker:19.03-dind | 2 | 362.944572568 | 6.06GB | pytorchcuda |
docker | docker:19.03-dind | 1 | 347.085535718 | 6.06GB | pytorchcuda |
docker | docker:19.03-dind | 2 | 375.006895246 | 6.06GB | pytorchcuda |
docker | docker:20.10-dind | 1 | 26.122958891 | 6.7MB | 01 |
docker | docker:20.10-dind | 2 | 2.700105439 | 6.7MB | 01 |
docker | docker:20.10-dind | 1 | 26.288307006 | 6.7MB | 01 |
docker | docker:20.10-dind | 2 | 2.706429829 | 6.7MB | 01 |
docker | docker:20.10-dind | 1 | 129.906688306 | 2.07GB | pytorchnocuda |
docker | docker:20.10-dind | 2 | 121.437758045 | 2.07GB | pytorchnocuda |
docker | docker:20.10-dind | 1 | 138.643207252 | 2.07GB | pytorchnocuda |
docker | docker:20.10-dind | 2 | 109.516455545 | 2.07GB | pytorchnocuda |
docker | docker:20.10-dind | 1 | 355.848456296 | 6.06GB | pytorchcuda |
docker | docker:20.10-dind | 2 | 346.772859129 | 6.06GB | pytorchcuda |
docker | docker:20.10-dind | 1 | 354.026742739 | 6.06GB | pytorchcuda |
docker | docker:20.10-dind | 2 | 345.576281490 | 6.06GB | pytorchcuda |
Metadata
Metadata
Assignees
Labels
No labels