Skip to content

obeli-sk/benchmark-fibo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

115 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Obelisk fibonacci benchmark suite

Running

Assuming Obelisk and just are installed. Launch Obelisk with Rust components downloaded from an OCI registry.

just serve-rs-oci

Compute fibo(10) sequentially 100 times:

obelisk execution submit -f .../fibow.fiboa -- 10 100

Compute fibo(10) in parallel 200 times:

obelisk execution submit -f .../fibow.fiboa-concurrent -- 10 200

Running with native JavaScript (no build step)

Launch Obelisk with native JS activity and workflow (no compilation required):

just serve-js-native

The activity/js-native/fibo.js and workflow/js-native/ files are loaded directly by Obelisk's built-in JS runtime.

Building WASM Components from source

If direnv and Nix are available:

cp .envrc-example .envrc
direnv allow

Otherwise install the following versions of dependencies used for development as described in dev-deps.txt.

Build all components:

just build

Then run Obelisk with one of the provided TOML files. List all available targets:

just --list
just serve-???

Note on fiboa-rs-spawn activity

In order to run this activity, the fibo binary must be first built and FIBO_EXE_PATH must be set:

just build-fibo-binary
export FIBO_EXE_PATH="$(pwd)/target/x86_64-unknown-linux-musl/release_bin/fibo"

Running on Amazon Linux

sudo dnf update -y
sudo dnf install -y docker git
sudo systemctl start docker
sudo usermod -aG docker $USER

git clone https://github.com/obeli-sk/benchmark-fibo.git
cd benchmark-fibo

# If testing the `fiboa-rs-spawn` activity, the `fibo` native binary must be built.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo build -p fibo --profile=release_bin --target x86_64-unknown-linux-musl
export FIBO_DIR=/home/ec2-user/benchmark-fibo/target/x86_64-unknown-linux-musl/release_bin
export FIBO_EXE_PATH=$FIBO_DIR/fibo # only needed if running Obelisk directly without Docker

# Run Obelisk server
docker run --net=host --rm -it \
  -u $(id -u):$(id -g) \
  -v $(pwd):/config \
  -e 'OBELISK__WASM__CACHE_DIRECTORY=/cache/obelisk/wasm' \
  -v ~/.cache/obelisk/wasm:/cache/obelisk/wasm \
  -v $FIBO_DIR:/fibodir \
  -e 'FIBO_EXE_PATH=/fibodir/fibo' \
  getobelisk/obelisk \
  server run -c /config/obelisk-rs-oci.toml

# From within the container (docker exec..) run fibo(10) with a single iteration
obelisk execution submit -f .../fibow.fiboa -- 10 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors