-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DHT Benchmark with asynchronous w/r (#406)
Instead of using just one peer for all get/store action, the benchmark spawns --num_threads 16 parallel tasks that collectively run --total_num_rounds consecutive iterations. On each iteration, the benchmark: - generates a unique random key, then pick --num_store_peers (from 1 to 10) random peers (default = 1) - each peer .stores a unique subkey to the same key in parallel (using return_future=True from tutorial) - after all peers finished storing, it will choose --num_get_peers that may or may not be the same as the peers that stored the value. Each of the new peers .gets the key with latest=True or False (option, default=True) After the evaluation is over, the benchmark: - measures the global frequency at which .get requests returned the correct output - measure the mean, stdev and max wall time for each .store and each .get request (use ddof=1 for stdev) Finally, the benchmark runs allows an option to kill a random subset of DHT peers (not chosen for store/get requests) to test fault tolerance.
- Loading branch information
1 parent
5d31c3b
commit a960438
Showing
3 changed files
with
216 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Benchmarks | ||
|
||
on: [ push, pull_request ] | ||
|
||
|
||
jobs: | ||
run_benchmarks: | ||
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: Key-v1-3.9-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
- name: Build hivemind | ||
run: | | ||
pip install . | ||
- name: Benchmark | ||
run: | | ||
cd benchmarks | ||
python benchmark_throughput.py --preset minimalistic | ||
python benchmark_tensor_compression.py | ||
python benchmark_dht.py |
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