-
Notifications
You must be signed in to change notification settings - Fork 610
chore: readme for benchmarking remotely #15512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
johnathan79717
merged 3 commits into
merge-train/barretenberg
from
jh/remote-benchmark-readme
Jul 8, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,34 @@ | ||
| # Benchmark Barretenberg Remotely | ||
|
|
||
| ## Why | ||
| Aztec engineers usually share computing resources on a mainframe. Its CPU load varies which adds noise to benchmark results. | ||
|
|
||
| ## Who | ||
| To eliminate such noise, we have a machine dedicated to run benchmarks for the Aztec cryptography engineering team. | ||
|
|
||
| ## What | ||
| There are scripts that: | ||
| 1. Build your target locally, so you do not need to switch branches remotely. | ||
| 2. `scp` your target to the remote machine. | ||
| 3. Run your benchmark command remotely. | ||
| 4. `scp` the benchmark results, usually in json, back to your local machine. | ||
| 5. Maybe analyze the results. | ||
|
|
||
| ## Setup & Troubleshooting | ||
| 1. Ask a crypto eng team member for the private key. Put the key in your mainframe home like `/mnt/user-data/<username>/remote-bb-worker.pem`. Set the permission by `chmod 600 /mnt/user-data/<username>/remote-bb-worker.pem`. | ||
| - Putting the key in your home named like this might allow it to be automatically updated when the machine is reset. | ||
| 2. Add these to your `~/.zshrc` and restart `zsh`. | ||
| - `export BB_SSH_KEY=-i/mnt/user-data/<username>/remote-bb-worker.pem` | ||
| - `export BB_SSH_INSTANCE=<ASK-A-TEAM-MEMBER-FOR-THE-HOSTNAME>` | ||
| - `export BB_SSH_CPP_PATH=/home/ubuntu/aztec-packages/barretenberg/cpp` | ||
| 3. Try `ssh $BB_SSH_KEY $BB_SSH_INSTANCE`. | ||
| - If it times out, double check your `$BB_SSH_INSTANCE` with another team member. | ||
| - If you get a permission denied, double check your private key with another team member. | ||
| - If it says the private key is too public, make sure you did `chmod 600 /mnt/user-data/<username>/remote-bb-worker.pem`. You should see `-rw-------` if you `ls -al` the key. | ||
| 4. If `ssh` worked, the setup is complete. | ||
|
|
||
| ## How | ||
| - `./scripts/benchmark_client_ivc.sh` lets you run `client_ivc_bench` remotely and analyze the results. | ||
| - `./scripts/benchmark_example_ivc_flow_remote.sh` copies the example flow input you'd like to run to the remote machine, runs `bb_cli_bench`, and analyze the results. | ||
| - For the script to work you need to have the example flows downloaded locally, by `AZTEC_CACHE_COMMIT=origin/next~3 DOWNLOAD_ONLY=1 yarn-project/end-to-end/bootstrap.sh build_bench` | ||
| - If you have other special needs, look inside the above scripts and see what parameters you can give, or use `./scripts/benchmark_remote.sh`. | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.