-
Notifications
You must be signed in to change notification settings - Fork 1
rework old scripts & merge scripts #138
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
Open
AYAHASSAN287
wants to merge
7
commits into
master
Choose a base branch
from
Lite_protocol_part2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8834019
rework old scripts & merge scripts
AYAHASSAN287 ce8a178
Apply changes to existing scripts
AYAHASSAN287 e532e6a
Add merged scripts
AYAHASSAN287 f53809c
last test script added
AYAHASSAN287 0abb67f
Fix review point
AYAHASSAN287 159d04f
Adding new test scenarios after review points
AYAHASSAN287 61a7a0c
Adding the second scenario after review comments
AYAHASSAN287 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 was deleted.
Oops, something went wrong.
151 changes: 151 additions & 0 deletions
151
scripts/Lite_protocol_scripts/store/nodes_15_scenario2.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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,151 @@ | ||
| #!/bin/bash | ||
| set -e | ||
| if ! typeset -f wn >/dev/null 2>&1; then | ||
| wn() { docker compose "$@"; } | ||
| fi | ||
| # - waku-simulator: 15-node network, 1 service, 1 edge | ||
| # - Service node limited by env below (CPU cores 0-3; memory 512 MiB) | ||
| # - Phases driven by LPT; Sonda runs throughout to exercise Store | ||
| # - This variant stresses CPU more and uses 120s observe windows | ||
|
|
||
| echo " Running test..." | ||
|
|
||
| # -------------------- Bring up simulator ------------------------ | ||
| cd ./waku-simulator | ||
|
|
||
| export NWAKU_IMAGE=wakuorg/nwaku:latest | ||
| export NUM_NWAKU_NODES=15 | ||
| export RLN_ENABLED=false | ||
|
|
||
| export SERVICENODE_CPU_CORES="0-3" | ||
| export SERVICENODE_MEM_LIMIT=512m | ||
| export POSTGRES_CPU_CORES="0-3" | ||
| export POSTGRES_MEM_LIMIT=2g | ||
| export POSTGRES_SHM=1g | ||
|
|
||
| docker compose up -d | ||
|
|
||
| # Wait until service node is running | ||
| while true; do | ||
| sid="$(docker compose ps -q servicenode || true)" | ||
| if [[ -n "$sid" ]]; then | ||
| state="$(docker inspect --format '{{.State.Status}}' "$sid" 2>/dev/null || true)" | ||
| [[ "$state" == "running" ]] && break | ||
| fi | ||
| sleep 1 | ||
| done | ||
|
|
||
| cd ../lpt | ||
|
|
||
| # -------------------- LPT common knobs (same exports) ------------------------- | ||
| export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest | ||
| export START_PUBLISHING_AFTER=15 | ||
| export NUM_MESSAGES=0 | ||
| export MESSAGE_INTERVAL_MILLIS=100 | ||
|
|
||
| export MIN_MESSAGE_SIZE=120Kb | ||
| export MAX_MESSAGE_SIZE=145Kb | ||
|
|
||
| export LIGHTPUSH_SERVICE_PEER=/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n | ||
| export FILTER_SERVICE_PEER=/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n | ||
|
|
||
| export PUBSUB=/waku/2/rs/66/0 | ||
| export CONTENT_TOPIC=/tester/2/light-pubsub-test/wakusim | ||
| export CLUSTER_ID=66 | ||
|
|
||
| # wait time before starting traffic | ||
| sleep 60 | ||
|
|
||
|
|
||
| # -------------------- Sonda (Store monitor) ----------------------------------- | ||
| cd ../sonda | ||
|
|
||
| docker build -t local-perf-sonda -f ./Dockerfile.sonda . | ||
|
|
||
| # perf-test.env | ||
| cat <<EOF > perf-test.env | ||
| RELAY_NODE_REST_ADDRESS=http://127.0.0.1:8645 | ||
| STORE_NODE_REST_ADDRESS=http://127.0.0.1:8644 | ||
| QUERY_DELAY=0.5 | ||
| STORE_NODES=/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n | ||
| CLUSTER_ID=66 | ||
| SHARD=0 | ||
| EOF | ||
|
|
||
| sleep 5 | ||
|
|
||
| docker rm -f sonda >/dev/null 2>&1 || true | ||
| docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda | ||
|
|
||
| cd ../lpt | ||
|
|
||
| # -------------------- Phase 1: 6 pub / 6 recv -------------------------------- | ||
| export NUM_PUBLISHER_NODES=6 | ||
| export NUM_RECEIVER_NODES=6 | ||
| docker compose down -v >/dev/null 2>&1 || true | ||
| docker compose up -d | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "[test] LPT is running with 6 publishers and 6 receivers + sonda from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| # -------------------- Phase 2: 3 pub / 12 recv ------------------------------- | ||
| docker compose down -v | ||
| export NUM_PUBLISHER_NODES=3 | ||
| export NUM_RECEIVER_NODES=12 | ||
| docker compose up -d | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "[test] LPT is running with 3 publishers and 12 receivers from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| # -------------------- Phase 3: 12 pub / 3 recv ------------------------------- | ||
| docker compose down -v | ||
| export NUM_PUBLISHER_NODES=12 | ||
| export NUM_RECEIVER_NODES=3 | ||
| docker compose up -d | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "[test] LPT is running with 12 publishers and 3 receivers from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| # -------------------- Phase 4: receivers down; keep publisher + sonda -------- | ||
| docker compose down -v | ||
| export NUM_PUBLISHER_NODES=12 | ||
| export NUM_RECEIVER_NODES=0 | ||
| docker compose up -d | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "[test] LPT receivers are down; sonda and lightpush publisher running from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| # -------------------- Phase 5: LPT down; only sonda -------------------------- | ||
| docker compose down -v | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "[test] LPT down; only sonda is working from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| # -------------------- Phase 6: final high-load burst ----------------- | ||
|
|
||
| export NUM_PUBLISHER_NODES=12 | ||
| export NUM_RECEIVER_NODES=12 | ||
| docker compose up -d | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "[test] Final burst: LPT running with 12 publishers and 12 receivers from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| cd .. | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "[test] Test finished at $current_time" | ||
|
|
||
| # finish | ||
| # exec ./stop_test.sh | ||
140 changes: 140 additions & 0 deletions
140
scripts/Lite_protocol_scripts/store/nodes_15_service_1.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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| # - waku-simulator: 15-node network, 1 service, 1 edge | ||
| # - Service node limited by env below (CPU cores 0-3; memory 512 MiB) | ||
| # - Phases driven by LPT; Sonda runs throughout to exercise Store | ||
| # - This variant stresses CPU more and uses 120s observe windows | ||
|
|
||
| echo "Running test..." | ||
|
|
||
| # -------------------- Bring up simulator ------------------------ | ||
| cd ./waku-simulator | ||
|
|
||
| export NWAKU_IMAGE=wakuorg/nwaku:latest | ||
| export NUM_NWAKU_NODES=15 | ||
| export RLN_ENABLED=false | ||
|
|
||
| export SERVICENODE_CPU_CORES="0-3" | ||
| export SERVICENODE_MEM_LIMIT=512m | ||
| export POSTGRES_CPU_CORES="0-3" | ||
| export POSTGRES_MEM_LIMIT=2g | ||
| export POSTGRES_SHM=1g | ||
|
|
||
| docker compose up -d | ||
|
|
||
| # Wait until service node is running | ||
| while true; do | ||
| sid="$(docker compose ps -q servicenode || true)" | ||
| if [[ -n "$sid" ]]; then | ||
| state="$(docker inspect --format '{{.State.Status}}' "$sid" 2>/dev/null || true)" | ||
| [[ "$state" == "running" ]] && break | ||
| fi | ||
| sleep 1 | ||
| done | ||
|
|
||
| cd ../lpt | ||
|
|
||
| # -------------------- LPT common knobs ------------------------- | ||
| export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest | ||
| export START_PUBLISHING_AFTER=15 | ||
| export NUM_MESSAGES=0 | ||
| export MESSAGE_INTERVAL_MILLIS=100 | ||
|
|
||
| export MIN_MESSAGE_SIZE=120Kb | ||
| export MAX_MESSAGE_SIZE=145Kb | ||
|
|
||
| export LIGHTPUSH_SERVICE_PEER=/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n | ||
| export FILTER_SERVICE_PEER=/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n | ||
|
|
||
| export PUBSUB=/waku/2/rs/66/0 | ||
| export CONTENT_TOPIC=/tester/2/light-pubsub-test/wakusim | ||
| export CLUSTER_ID=66 | ||
|
|
||
| # wait time before starting traffic | ||
| sleep 60 | ||
|
|
||
| # Start LPT for Phase 1 will happen after Sonda is up | ||
|
|
||
| # -------------------- Sonda (Store monitor) ----------------------------------- | ||
| cd ../sonda | ||
|
|
||
| docker build -t local-perf-sonda -f ./Dockerfile.sonda . | ||
|
|
||
| # perf-test.env | ||
| cat <<EOF > perf-test.env | ||
| RELAY_NODE_REST_ADDRESS=http://127.0.0.1:8645 | ||
| STORE_NODE_REST_ADDRESS=http://127.0.0.1:8644 | ||
| QUERY_DELAY=0.5 | ||
| STORE_NODES=/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n | ||
| CLUSTER_ID=66 | ||
| SHARD=0 | ||
| EOF | ||
|
|
||
| sleep 5 | ||
|
|
||
| docker rm -f sonda >/dev/null 2>&1 || true | ||
| docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda | ||
|
|
||
| cd ../lpt | ||
|
|
||
| # -------------------- Phase 1: 6 pub / 6 recv -------------------------------- | ||
| export NUM_PUBLISHER_NODES=6 | ||
| export NUM_RECEIVER_NODES=6 | ||
| docker compose down -v >/dev/null 2>&1 || true | ||
| docker compose up -d | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "LPT is running with 6 publishers and 6 receivers + sonda from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| # -------------------- Phase 2: 3 pub / 12 recv ------------------------------- | ||
| docker compose down -v | ||
| export NUM_PUBLISHER_NODES=3 | ||
| export NUM_RECEIVER_NODES=12 | ||
| docker compose up -d | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "LPT is running with 3 publishers and 12 receivers from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| # -------------------- Phase 3: 12 pub / 3 recv ------------------------------- | ||
| docker compose down -v | ||
| export NUM_PUBLISHER_NODES=12 | ||
| export NUM_RECEIVER_NODES=3 | ||
| docker compose up -d | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "LPT is running with 12 publishers and 3 receivers from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| # -------------------- Phase 4: receivers down; keep publisher + sonda -------- | ||
| docker compose down -v | ||
| export NUM_PUBLISHER_NODES=12 | ||
| export NUM_RECEIVER_NODES=0 | ||
| docker compose up -d | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "LPT receivers are down; sonda and lightpush publisher running from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| # -------------------- Phase 5: LPT down; only sonda -------------------------- | ||
| docker compose down -v | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "LPT down; only sonda is working from now: $current_time" | ||
|
|
||
| sleep 120 | ||
|
|
||
| cd .. | ||
|
|
||
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | ||
| echo "Test finished at $current_time" | ||
|
|
||
| # finish | ||
| # exec ./stop_test.sh | ||
| s |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on the test, but in this particular case, for pushing large messages (above 100k) in every 100ms... 500MB ram can be low for a service node.
I recommend at least 2GB... for such case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done