Comparing Earthly and Toast for isolated / repeatable development.
Calculate a performance floor by running a fast command, echo
, in the context of a large container (the emscripten SDK takes up about 1 GB).
After the initial build and caching, Toast takes 800ms and Earthly about 7 seconds on my 2020 M1 Macbook Air.
- MacOS 12.5
- Docker Desktop 4.10.1
- Toast 0.45.5
- Earthly v0.6.20 ad869c06c884b10f88948b5852ab22b4d7262e20
$ time toast hello
[INFO] Ready to run 1 task: hello.
[INFO] Running task helloβ¦
toast hello 0.29s user 0.13s system 50% cpu 0.827 total
$ time earthly --verbose +hello
1. Init π
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
buildkitd | Found buildkit daemon as docker container (earthly-buildkitd)
buildkitd | Comparing running container image ("sha256:644fb4ca18c832026baff8e95234d55c97628446fd9f99a22a3733814cab21eb") with available image ("sha256:644fb4ca18c832026baff8e95234d55c97628446fd9f99a22a3733814cab21eb")
buildkitd | Settings hashes match ("c919e39463a37848"), no restart required
buildkitd | Version github.com/earthly/buildkit v0.6.20 a2a3e382a7782588b741932d7ee9484358bac157
buildkitd | Platforms: linux/arm64 (native) linux/amd64 linux/amd64/v2 linux/riscv64 linux/ppc64le linux/s390x linux/386 linux/mips64le linux/mips64 linux/arm/v7 linux/arm/v6
buildkitd | Utilization: 0 other builds, 0/20 op load
buildkitd | GC stats: 2.0 GB cache, avg GC duration 0s, all-time GC duration 3ms, last GC duration 0s, last cleared 0 B
2. Build π§
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
internal-term | connecting to shellrepeater on 127.0.0.1:8373
ubuntu:20.04@sha256:c01a10535d9ea3e4065dee4abdb288821b2918929f1e1584287a03e731b9176c | --> Load metadata linux/arm64
ubuntu:20.04@sha256:c01a10535d9ea3e4065dee4abdb288821b2918929f1e1584287a03e731b9176c | Completed in 3.989541ms
+base | --> FROM ubuntu:20.04@sha256:c01a10535d9ea3e4065dee4abdb288821b2918929f1e1584287a03e731b9176c
context | --> local context .
context | Completed in 29.375Β΅s
+base | [ ] 0% resolve docker.io/library/ubuntu:20.04@sha256:c01a10535d9ea3e4065dee4abdb288821b2918929f1e1584287a03e731b9176c
+base | [ββββββββββ] 100% resolve docker.io/library/ubuntu:20.04@sha256:c01a10535d9ea3e4065dee4abdb288821b2918929f1e1584287a03e731b9176c
ongoing | context (5 seconds ago)
context | [ ] 0% transferring .:
context | [ββββββββββ] 100% transferring .:
context | Completed in 5.027224294s
+base | *cached* --> WORKDIR /test
+base | Completed in 0s
+emsdk | *cached* --> COPY install_emsdk.sh .
+emsdk | Completed in 0s
+emsdk | *cached* --> RUN ./install_emsdk.sh
+emsdk | Completed in 0s
+hello | *cached* --> RUN echo 'hello' > my_output
+hello | Completed in 80Β΅s
+hello | *cached* --> SAVE ARTIFACT my_output +hello/my_output AS LOCAL my_output
+hello | Completed in 97.791Β΅s
output | --> exporting outputs
output | [ββββββββββ] 100% copying files
output | Completed in 16.565209ms
Summary of timing information
Note that the times do not include the expansion of commands like BUILD, FROM, COPY (artifact).
context | () 5.027253669s
output | () 16.565209ms
ubuntu:20.04@sha256:c01a10535d9ea3e4065dee4abdb288821b2918929f1e1584287a03e731b9176c | () 3.989541ms
+base | () 3.822125ms
+hello | () 177.791Β΅s
===============================================================
Total 5.051808335s
Total (real) 5.189109375s
3. Push β« (disabled)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
To enable pushing use
earthly --push ...
4. Local Output π
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Artifact g/incubator/container-workflow-test:master+hello/my_output output as my_output
========================== π Earthly Build β
SUCCESS ==========================
Share your logs with an Earthly account (experimental)! Register for one at https://ci.earthly.dev.
retrying http request due to unexpected error Put "https://api.earthly.dev/analytics": dial tcp 100.20.164.62:443: connect: bad file descriptor
Warning: timedout while sending analytics
earthly --verbose +hello 0.64s user 0.43s system 14% cpu 7.275 total