Skip to content

maksymar/heartbeat-cost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heartbeat Cost

Goal

Run experiments to measure heartbeat cost on the IC.

Summary

  • Experiments run on canisters written in Rust and Motoko
    • Empty canisters *_empty, time is measured outside of dfx call
    • Non-empty canisters with measurements done inside the canister
  • Results are based on ~15 minutes of measurements

Adjusted to production heartbeat rate

Experiment Hearbeat Rate Burn Rate per Sec Burn Rate per Year
rust 917 ms ~0.65 MC ~21 TC
motoko 917 ms ~2.24 MC ~71 TC

Local dfx heartbeat rate

Note: non-production dfx runs a single node which causes reduced heartbeat rate and elevated costs.

Experiment Hearbeat Rate Burn Rate per Sec Burn Rate per Year Code Data
rust 703 ms ~0.86 MC ~27 TC code data
rust_empty - ~0.86 MC ~27 TC code data
motoko 706 ms ~2.94 MC ~93 TC code data
motoko_empty - ~3.01 MC ~95 TC code data

Experiments rust, motoko

# Enter either motoko or rust folder.
$ cd motoko
# or
$ cd rust

# Start DFX and deploy a canister.
$ dfx start --background
$ dfx deploy

# Open Candid UI
# - call "reset" function to start measurements
# - call "report" function to get statistics since the last reset

# Stop/delete canisters, stop DFX execution.
$ dfx canister stop --all
$ dfx canister delete --all
$ dfx stop

Experiments rust_empty, motoko_empty

# Enter either motoko_empty or rust_empty folder.
$ cd motoko_empty
# or
$ cd rust_empty

# Start DFX and deploy a canister.
$ dfx start --background
$ dfx deploy

# Run experiment.
$ ./run_experiment.py

# Stop/delete canisters, stop DFX execution.
$ dfx canister stop --all
$ dfx canister delete --all
$ dfx stop

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published