#community-help

ARM Support for Typesense on AWS Graviton Servers

TLDR Tatu inquires on ARM support for Typesense. Kishore Nallan informs it's on the roadmap with end of year completion. After some troubleshooting, they successfully test an ARM build, preparing it for the 0.23 release.

Powered by Struct AI

1

Sep 24, 2021 (28 months ago)
Tatu
Photo of md5-b4a54d591f9148a83dc5f8e2fed6f871
Tatu
11:52 AM
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.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:04 PM
Tatu 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.
Tatu
Photo of md5-b4a54d591f9148a83dc5f8e2fed6f871
Tatu
12:06 PM
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.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:07 PM
Tatu 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
12:08
Kishore Nallan
12:08 PM
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.
Tatu
Photo of md5-b4a54d591f9148a83dc5f8e2fed6f871
Tatu
12:08 PM
:thumbsup: I can take a look.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:09 PM
:ty: I'm excited about ARM myself.
Tatu
Photo of md5-b4a54d591f9148a83dc5f8e2fed6f871
Tatu
06:07 PM
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?
06:14
Tatu
06:14 PM
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.
06:33
Tatu
06:33 PM
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.
Sep 25, 2021 (28 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:47 AM
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

Dec 01, 2021 (26 months ago)
Tatu
Photo of md5-b4a54d591f9148a83dc5f8e2fed6f871
Tatu
09:39 PM
Hi! Any updates on ARM compatibility?
Dec 02, 2021 (26 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:25 AM
Yes, it's on my task list for this month 🙂
Tatu
Photo of md5-b4a54d591f9148a83dc5f8e2fed6f871
Tatu
10:40 AM
Awesome, can't wait to try it out. Thanks!
Dec 04, 2021 (25 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:12 PM
Tatu 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.
Tatu
Photo of md5-b4a54d591f9148a83dc5f8e2fed6f871
Tatu
02:51 PM
Seems to be working just as before, no issues to report :partying_face: Thank you!
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
02:54 PM
Tatu 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.
02:55
Kishore Nallan
02:55 PM
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.
Tatu
Photo of md5-b4a54d591f9148a83dc5f8e2fed6f871
Tatu
03:18 PM
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!
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:29 PM
Cool, thanks for sharing that, and keep the feedback coming 🙂

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community

Similar Threads

Trouble Running Typesense Docker Image on AMD Phenom II X4 955 Processor

Ian struggles to run Typesense on an AMD Phenom II X4 955 Processor, experiencing the docker image to shut down immediately upon startup. Jason and Kishore Nallan suggest multiple troubleshooting steps, identifying the potential issue as the processor's lack of support for MSSE4 flags.

1

53
14mo

Announcing Typesense v0.23 and Addressing Queries

Jason announced new Typesense v0.23 upgrades and addressed inquiries from Ross about schema changes and cloud updates. User Janaka asked about price-performance on ARM, which Jason answered. Others, like A, Bill, Carl, and Ailish, expressed excitement.

134

11
19mo

Resolving Issues with Infix and Prefix in Query Searches

Daren struggled with searches missing values in production. Jason and Kishore Nallan offered insights and created new features to help solve the problem, which was then tested and deployed by Daren.

2

38
5mo

Discussing Search API Limitations and Solutions

Sidharth had problems with search API response limitations and sorting issues. Kishore Nallan suggested multi_search query and provided links for an updated version. After installation, some timeout and performance issues were encountered, partially resolved by adjusting client timeout values.

1

45
14mo

Seeking C++ Project Contribution Guidance

Peka wants to contribute to a project and seeks resources. Kishore Nallan provides initial guidance and recommends starting with a simple task on the Typesense project. Peka encounters a setup error well into the process.

3

17
26mo