-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add foundationdb to dev-full & document avx support
- Loading branch information
1 parent
bdd7ba3
commit d37a085
Showing
7 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
function configure_database() { | ||
if ! fdbcli -C /var/fdb/fdb.cluster --exec status --timeout 1 ; then | ||
echo "Configuring database" | ||
until fdbcli -C /var/fdb/fdb.cluster --exec 'configure new single memory; status' --timeout 10 ; do | ||
sleep 2 | ||
done | ||
echo "Done configuring database" | ||
fi | ||
|
||
echo "Database ready for connection" | ||
} | ||
|
||
|
||
# | ||
# Start the init function in the background and proceed to the main entry | ||
# point. The function will hang until Foundationdb is up, then configure | ||
# the database and exit silently. | ||
# | ||
|
||
configure_database & | ||
IP=$(hostname -i|rev|cut -d' ' -f1|rev) | ||
echo "docker:docker@$IP:4500" > /var/fdb/run/fdb.ci.cluster | ||
|
||
# fix for apple sillicon/qemu | ||
# https://github.com/apple/foundationdb/issues/4111#issuecomment-1284040423 | ||
sed -i '$ s/$/ --knob_disable_posix_kernel_aio=1/' /var/fdb/scripts/fdb.bash | ||
exec /var/fdb/scripts/fdb.bash "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
# https://apple.github.io/foundationdb/administration.html#administration-running-foundationdb | ||
# Configure redundancy and storage engine | ||
echo "=== Configuring Storage ===" | ||
# fdbcli --exec "configure new single ssd" | ||
|
||
# Start server | ||
echo "=== Starting Server ===" | ||
/var/fdb/scripts/fdb.bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# AVX | ||
|
||
AVX (Advanced Vector Extensions) is a SIMD instruction on Intel CPUs to make | ||
FoundationDB run parallel data processing tasks faster. | ||
|
||
## Even & odd versions | ||
|
||
Even versions of FoundationDB are compiled without AVX. Odd versions are compiled with it. | ||
|
||
For example, [7.1.61](https://github.com/apple/foundationdb/releases/tag/7.1.61) is the AVX version of [7.1.60](https://github.com/apple/foundationdb/releases/tag/7.1.60). | ||
|
||
Make sure to pay attention to if you're using a versino of FDB with AVX. | ||
|
||
## When to use AVX | ||
|
||
Use AVX on production Linux servers. | ||
|
||
## When not to use AVX | ||
|
||
Don't use AVX for Docker images, since QEMU can't emulate AVX and will crash ([source](https://github.com/apple/foundationdb/issues/4111#issuecomment-1284040423)). Tihs will prevent ARM users from being able to run FoundationDB. | ||
|
||
This might be easy to fix if we build a Docker image built on the prebuilt AMD & ARM binaries on GitHub. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/services/cluster/src/workflows/server/install/install_scripts/components/fdb.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters