I thought I’d ask here, perhaps somebody has a magic recipe. I was planning to migrate my app from RethinkDB to FoundationDB, and did some work towards that a couple of years ago. But as I wanted to pick up and complete the work, I found out that I can’t, because I am unable to run FoundationDB on my development machine, which is a Mac with an M1 (Apple Silicon) processor.
I’m puzzled, because FoundationDB seems to be developed at Apple, and I’m guessing most developers have Apple Silicon machines by now? Am I missing something?
In my case, I deploy on Linux, but my application is developed on a Mac in a local JVM, with a couple of supporting Docker containers. I can run the fdb servers in Docker (assuming arm64 is supported as an architecture, but if local .so libs are required, these need to be accessible natively to the JVM.
Darwin does not support KAIO, try to pass disable_posix_kernel_aio=1 to both fdbserver process and fdbclient (with set knob). If you use fdbcli also pass this knob.
I think mac m1 support is pretty much there for 7.1+, but you need to build from source currently. Several developers are using mac m1’s and building locally (basically all testing happens on linux though).
Well, that’s good news! At least I know I’m not the only one that wants to use FoundationDB for development on a Mac machine
BTW, making fdb fully work on MacOS is perhaps unnecessary — a working arm64 docker container would be plenty enough (the current official docker container is intel-only). It’s not about being native or particularly fast, it’s about being able to do local development at all.
I think you can get pretty far with the x86_64 MacOS package (.pkg file) and Rosetta2 then. I was able to install it (I had to click through a warning about Apple not being able to verify it which is a bit silly), and then I was able to load libfdb_c from the python bindings as long as I did arch -x86_64 python3
I’ve just revisited this problem. I wanted to migrate my SaaS application to FoundationDB (it’s based on RethinkDB right now), and I’ve actually done much of the interfacing a couple of years back, but the inability to run fdb on Apple Silicon is a showstopper. I can’t develop on my machine.
Here’s what I did today:
Took a closer look at the ‘tigrisdata/foundationdb’ images on Docker Hub. Unfortunately, their source isn’t available (anymore?) and I have no idea what’s actually inside.
Checked the official Docker images, but these don’t have arm64 versions.
Revisited the Github issues related to Apple Silicon support. It seems they were all closed without resolution.
Tried a workaround suggested in one of the Github issues (--knob_disable_posix_kernel_aio=1), that still results in a core dump.
Noticed that there is no longer a way for users to open Github issues.
Wanted to try downloading the latest native release again, but the webpage is down (404).
The problem of the webpage being down seems to have been reported 3 weeks ago…
I’m not sure what to make of this… I have to say, all this is rather disheartening. Recent discussions of distributed databases on HN do not even mention FoundationDB, as nobody seems to be even considering it. I really like FoundationDB, and I do understand that I am entitled to absolutely nothing, but I’m growing increasingly worried about painting myself into a corner with a dying project, like I previously did with RethinkDB.
Hm, we are running FDB 6.3 on Apple Silicon with no issues. Literally just downloading it from Release Release 6.3.24 · apple/foundationdb · GitHub and running it. If you’re talking about bindings specifically, we use Java and any x86 JVM would do.
Tried a workaround suggested in one of the Github issues (--knob_disable_posix_kernel_aio=1), that still results in a core dump.
Could you give some more additional information like what version of FDB you are using? If you want to run FDB on your Mac (with Docker) you have to use the even numbered images (the one with AVX disabled). I just tried this Support Apple Silicon · Issue #4111 · apple/foundationdb · GitHub out and it still works without any issues on my M1. If you share some more information on what version(s) you tried it’s easier to help you.
If you want to run FDB directly on you Mac you can also use the FDB package for arm64 FoundationDB-7.1.27_arm64.pkg.
I tried with multiple versions — the docker container version that I reported in the GitHub issue (back when reporting issues was possible for non-collaborators) was 7.1.23. I retried recently with foundationdb/foundationdb:7.1.27 and the result was the same (segfault).
I had no idea about the even-numbered images and AVX, how would one normally find out about that? A quick check shows that foundationdb/foundationdb:7.1.27 doesn’t crash with a segfault, so it might work under emulation.
I also had no idea about the native arm64 pkg, last I checked these were not available. I installed one from your direct link and it seems to work just fine!
I tried with multiple versions — the docker container version that I reported in the GitHub issue (back when reporting issues was possible for non-collaborators) was 7.1.23. I retried recently with foundationdb/foundationdb:7.1.27 and the result was the same (segfault).
I had no idea about the even-numbered images and AVX, how would one normally find out about that? A quick check shows that foundationdb/foundationdb:7.1.27 doesn’t crash with a segfault, so it might work under emulation.
I also had no idea about the native arm64 pkg, last I checked these were not available. I installed one from your direct link and it seems to work just fine!
They are fairly new and were added with 7.1.26, so not surprising that you had no idea about them