Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make as many as possible containers run native on Apple Silicon #1594

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aequitas
Copy link
Collaborator

@aequitas aequitas commented Dec 11, 2024

This PR improves build/runtime on Apple Silicon by using as much as possible native containers images for ARM.

Building

Clean build:

  • darwin/amd64 (core i5, native) time make build-no-cache: 339.94s
  • darwin/amd64 (m4, emulated) time DOCKER_DEFAULT_PLATFORM=linux/amd64 make build-no-cache: 584.05s
  • darwin/arm64 (m4, native+emulated) time make build-no-cache: 600.39s
  • darwin/arm64 (m1, native+emulated) time make build-no-cache: 917.0s

Cached rebuild:

  • darwin/amd64 (core i5, native) make build; time make build: 36.16s
  • darwin/amd64 (m4, emulated) DOCKER_DEFAULT_PLATFORM=linux/amd64 make build; time DOCKER_DEFAULT_PLATFORM=linux/amd64 make build: 5.92s
  • darwin/arm64 (m4, native+emulated) make build; time make build: 6.08s
  • darwin/arm64 (m1, native+emulated) make build; time make build: 10.73s

Testing

  • darwin/amd64 (core i5, native) make up env=test; time make integration-tests: 77 passed, 12 skipped, 36 warnings in 63.31s (0:01:03), total time: 67.74s

  • darwin/amd64 (m4, emulated) DOCKER_DEFAULT_PLATFORM=linux/amd64 make up env=test; time make integration-tests 77 passed, 12 skipped, 36 warnings in 113.53s (0:01:53), total time: 116.83s

  • darwin/arm64 (m4, native+emulated) make up env=test; time make integration-tests: 77 passed, 12 skipped, 36 warnings in 41.95s, total time: 44.96s

  • darwin/arm64 (m1, native+emulated) make up env=test; time make integration-tests: 77 passed, 12 skipped, 36 warnings in 48.78s, total time: 52.18s

Notes

Verify container architecture: docker ps -q | xargs -I% -n1 docker exec -i % arch

Forcing amd64 (RELEASE=main as util image is not available as latest: DOCKER_DEFAULT_PLATFORM=linux/amd64 RELEASE=main make up env=test

- fix worker-nassl not starting with integration-test target
- fix bug in beat healthcheck
@aequitas aequitas force-pushed the arm64 branch 2 times, most recently from 773c1d1 to 33ee693 Compare December 12, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant