Hi! Is ARM support on the roadmap? We are planning...
# community-help
t
Hi! Is ARM support on the roadmap? We are planning on migrating our servers to AWS Graviton, and Typesense is currently the only part of our stack that doesn't have ARM support, so kinda blocking us from going forward or forcing us to find alternatives. I see there has been some discussion in the past but no updates.
k
@Tatu Ulmanen ARM support is planned by end of year. There are a few parts to it: 1. We have to ensure that all dependencies that Typesense uses can compile on ARM. 2. Port x86 specific SIMD intrinsics to NEON -- I've already checked on this and this should not be a blocker. 3. Build Typesense and run our perf tests to ensure that there aren't any gotchas. I think we should be able to go through this and be ARM compatible by end of the year.
t
Thank you, this timeframe works great! I know it's not an trivial task and I greatly appreciate your efforts. Support for ARM might be huge given the rising popularity of Graviton instances.
k
@Tatu Ulmanen If you or someone from the community can help with 1) it will help move things along. To start with, we need to know if these dependencies build on ARM: https://github.com/typesense/typesense/blob/master/docker/development.Dockerfile
Just running through those commands on an ARM instance (no need for Docker) should confirm that majority of 1) is covered. 2) and 3) are then much easier.
t
👍 I can take a look.
k
ty I'm excited about ARM myself.
t
Everything else works and builds with minor changes on ARM, except braft. I can't seem to find any info on building braft on ARM, so don't know if that's possible. To what extent is braft used, is this a blocker if not available?
Other changes needed to get the dependencies installed: 1. Change python-software-properties to software-properties-common 2. Change CMake from
cmake-3.15.2-Linux-x86_64.tar.gz
to
cmake-3.21.3-linux-aarch64.tar.gz
. The 3.15.2 version doesn't have aarch64 variant available. 3. brpc build fails. The solution is to add
-Wno-narrowing
in
CMAKE_CXX_FLAGS
of patches/brpc_cmakelists.txt Otherwise no issues. Built on AWS Graviton t4g.medium instance running a clean install of Ubuntu 20.04.2.
Removing
-msse4 -msse4.2
from
CMAKE_CPP_FLAGS
of
/opt/braft-c649789133566dc06e39ebd0c69a824f8e98993a/CMakeLists.txt
seemed to work and the build succeeded. Don't know if that affects something, but at least everything builds now.
k
This is an excellent summary, thank you.
Don't know if that affects something, but at least everything builds now.
-msse4 -msse4.2
flags enable SIMD instructions. There might be equivalent flags for ARM which we we can enable. I will check it out. But overall, this is great news: it means that there are no major blockers! I will update this thread as I patch the code to make these changes and start on Typesense specific changes for NEON.
🙌 1
t
Hi! Any updates on ARM compatibility?
k
Yes, it's on my task list for this month 🙂
t
Awesome, can't wait to try it out. Thanks!
k
@Tatu Ulmanen Typesense has been ARMed 🙂 Please give this build a go: https://dl.typesense.org/releases/0.23.0.rc2-arm/typesense-server-0.23.0.rc2-arm-linux-amd64.tar.gz I already did some smoke testing and as well as run the test suite and some benchmarking, and it looks fine.
t
Seems to be working just as before, no issues to report 🥳 Thank you!
k
@Tatu Ulmanen Awesome, thank you so much for helping with the initial work and for motivating me to get this done 🙂 It's a huge win. The current plan is to make the ARM build available as part of the 0.23 release (0.22 is under code freeze and will be released pretty soon). This build has a couple of minor features planned for 0.23 (specifically treating space as typo: https://github.com/typesense/typesense/issues/133) but should be otherwise stable to use.
I would actually love to learn about how you use Typesense if you don't mind sharing some details. Always curious to learn about use cases.
t
We have a small ecommerce platform built running a few dozen online shops, we're using Typesense for searching products in the frontend and orders, invoices, customers, companies etc in the backend. I've been very happy with how easy Typesense has been to set up and maintain. I've struggled with Elasticsearch before and for the longest time we just used MySQL FULLTEXT searches which were woefully inadequate. Now everything just works. There's a lot more we could do with Typesense I think, now that we're able to complete our transition to ARM I think it's time to start to explore a bit more what Typesense has to offer!
k
Cool, thanks for sharing that, and keep the feedback coming 🙂