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

Apple M1 processor homebrew install very slow compared to docker image #89

Open
fdietz opened this issue Jun 15, 2021 · 2 comments
Open

Comments

@fdietz
Copy link

fdietz commented Jun 15, 2021

Using the elasticsearch docker image as explained in the official reference documentation the performance is great: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html. It is comparable to a setup on my Linux laptop.

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.13.2

But, when installing elasticsearch with homebrew brew install elasticsearch-full, I've noticed it is several times slower. For example my Ruby on Rails test suite runs normally in 20 seconds, but requires 2 minutes now.

Since I'm not very knowledgable in elasticsearch, I don't know how to debug this further. But, I assume there' a simple explanation for the slowdown.

Any ideas? Thanks in advance!

@DPattee
Copy link

DPattee commented Nov 16, 2021

A docked image is a read to run virtual machine (basically), while installing from a package manager like homebrew actually involves compiling the app you are trying to run. If you have a fast enough internet connection, downloading an image will be faster than compiling…

@jeremy
Copy link

jeremy commented Dec 1, 2021

Possibly due to installing the x86_64 builds and hence running under Rosetta, whereas Docker pulls the arm64 image automatically?

Elastic does provide aarch64 builds which you can install instead by changing x86_64 → aarch64 in the formula URLs, if you're interested in troubleshooting further.

jeroenvisser101 added a commit to jeroenvisser101/homebrew-tap that referenced this issue Jan 16, 2022
This change ensures that on ARM-based macs, the `aarch64` packages are
used, leading to better performance, less resource utilization and
better battery usage.

Closes elastic#89
jeroenvisser101 added a commit to jeroenvisser101/homebrew-tap that referenced this issue Jan 16, 2022
This change ensures that on ARM-based macs, the `aarch64` packages are
used, leading to better performance, less resource utilization and
better battery usage.

Closes elastic#89
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 a pull request may close this issue.

3 participants