Skip to content

Instantly share code, notes, and snippets.

@igor-aptos
Created December 1, 2023 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igor-aptos/21d12bda5b88712048ec6638873a7d9b to your computer and use it in GitHub Desktop.
Save igor-aptos/21d12bda5b88712048ec6638873a7d9b to your computer and use it in GitHub Desktop.
# Below are commands to run.
#
# It has two benchmarks, a shorter one (~10m) and a large db one (few hours).
# Once the script finishes, it will print out a table like, and column “t/s”
# is your achieved “transactions per second” for each workload. Evaluation
# criteria for previewnet is encoded in the script, and will tell you after
# the table if you’ve not met any of the criteria. (warnings are for sharded
# tests which are not part of the requirement)
# You should modify NUMBER_OF_EXECUTION_THREADS for your hardware (but it needs
# to be the same for both benchmarks). It should be below 75% of your cores (as
# you’ll need some cores for consensus and networking, etc), and we recommend
# starting with 50%, and testing in the 50-75% range. Pick the number that works
# best (and smallest among those that perform equivalently).
#
# Reference spec, that passes the above criteria, is GCP t2d-standard-60 (AMD Milan)
# with 60 virtual and physical cores (hyperthreading disabled) and 2TB SSD with 60k IOPs,
# and NUMBER_OF_EXECUTION_THREADS=32.
# checkout repo and install needed tools (cargo, etc)
git clone https://github.com/aptos-labs/aptos-core.git
cd aptos-core/
./scripts/dev_setup.sh
TABULATE_INSTALL=lib-only pip install tabulate
# create new shell, so environment and path are initialized
# you probably want to use tmux/screen at this point
# switch to main branch if not there:
git switch previewnet2_bench
ulimit -n 1048576
# run the short benchmark (~10m):
FLOW=PREVIEWNET NUM_BLOCKS_PER_TEST=50 HIDE_OUTPUT=1 NUMBER_OF_EXECUTION_THREADS=32 ./testsuite/single_node_performance.py
# run the large DB benchmark (few hours):
FLOW=PREVIEWNET_LARGE_DB NUM_BLOCKS_PER_TEST=300 HIDE_OUTPUT=1 ENABLE_PRUNER=1 NUMBER_OF_EXECUTION_THREADS=32 ./testsuite/single_node_performance.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment