mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-01-02 14:03:08 +00:00
Merge 61a7a0c81b33f4cdca9ad8ae28645c8aedb7bacb into d6428af91dd320608d645be9bdcb3540e1cc9e54
This commit is contained in:
commit
ad8f52a5fc
@ -1,87 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
# Stress Store with multiple Store nodes while running phased LPT publishers/receivers.
|
||||
|
||||
STORE_NODES="/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n,/ip4/10.2.0.102/tcp/60001/p2p/16Uiu2HA7abcDEF451tGkbzz4Mjcg6DRnmAHxNeWyF4zp23RbpXYZ2,/ip4/10.2.0.103/tcp/60001/p2p/16Uiu2HA9LMNoPQ451tGkbww4Mjcg6DRnmAHxNeWyF4zp23Rbppppp"
|
||||
RELAY_NODE_REST_ADDRESS="http://127.0.0.1:8645"
|
||||
STORE_NODE_REST_ADDRESS="http://127.0.0.1:8644"
|
||||
PUBSUB_TOPIC="/waku/2/default-waku/proto"
|
||||
CONTENT_TOPIC="/sonda/2/polls/proto"
|
||||
PHASE_SLEEP=300
|
||||
|
||||
echo "Running test..."
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Bringing up simulator at $current_time"
|
||||
|
||||
cd ./waku-simulator
|
||||
export SERVICENODE_CPU_CORES=0
|
||||
export POSTGRES_CPU_CORES=1-3
|
||||
export GF_SECURITY_ADMIN_USER=admin
|
||||
export GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
docker compose up -d
|
||||
while [ "$(docker inspect --format "{{.State.Status}}" $(docker compose ps -q servicenode))" != "running" ]; do
|
||||
sleep 1
|
||||
done
|
||||
cd ..
|
||||
|
||||
cd ./sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
cat > ./perf-test.env <<EOF
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
QUERY_DELAY=0.25
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.9
|
||||
PUBSUB_TOPIC=${PUBSUB_TOPIC}
|
||||
CONTENT_TOPIC=${CONTENT_TOPIC}
|
||||
EOF
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
cd ..
|
||||
|
||||
cd ./lpt
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
export START_PUBLISHING_AFTER=15
|
||||
|
||||
export NUM_PUBLISHER_NODES=10
|
||||
export NUM_RECEIVER_NODES=10
|
||||
export MESSAGE_MIN_BYTES=2048
|
||||
export MESSAGE_MAX_BYTES=32768
|
||||
export LIGHTPUSH_INTERVAL_MS=100
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 1: 10 pub / 10 recv (100ms, 2–32KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=15
|
||||
export NUM_RECEIVER_NODES=15
|
||||
export MESSAGE_MIN_BYTES=4096
|
||||
export MESSAGE_MAX_BYTES=65536
|
||||
export LIGHTPUSH_INTERVAL_MS=80
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 2: 15 pub / 15 recv (80ms, 4–64KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=20
|
||||
export NUM_RECEIVER_NODES=10
|
||||
export MESSAGE_MIN_BYTES=2048
|
||||
export MESSAGE_MAX_BYTES=32768
|
||||
export LIGHTPUSH_INTERVAL_MS=80
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 3: 20 pub / 10 recv (80ms, 2–32KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down receivernode
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 4: receivers down, publishers + sonda $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
cd ..
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Scenario 2 finished at $current_time"
|
||||
151
scripts/Lite_protocol_scripts/store/nodes_15_scenario2.sh
Executable file
151
scripts/Lite_protocol_scripts/store/nodes_15_scenario2.sh
Executable file
@ -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=2g
|
||||
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
scripts/Lite_protocol_scripts/store/nodes_15_service_1.sh
Executable file
140
scripts/Lite_protocol_scripts/store/nodes_15_service_1.sh
Executable file
@ -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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
@ -1,111 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# This implements a waku-simulator with 15 nodes network, 1 service, 1 edge node added
|
||||
# service node is limited to 1 cpu core with only 512 MB
|
||||
# Runs different test phases with different load from sonda (STORE) side
|
||||
# 1. 2 sonda instances, query every 500ms
|
||||
# 2. 5 sonda instances, query every 200ms
|
||||
# 3. 10 sonda instances, query every 100ms
|
||||
|
||||
echo "Running test..."
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Bringing up simulator at $current_time"
|
||||
|
||||
cd ./waku-simulator
|
||||
|
||||
# simulator exports
|
||||
export NUM_NWAKU_NODES=15
|
||||
export TRAFFIC_DELAY_SECONDS=15
|
||||
export MSG_SIZE_KBYTES=10
|
||||
export SERVICENODE_CPU_CORES="0-3"
|
||||
export POSTGRES_CPU_CORES="0-3"
|
||||
|
||||
docker compose up -d
|
||||
cd ..
|
||||
|
||||
echo "Waiting 30s for service node to be ready..."
|
||||
sleep 30
|
||||
|
||||
cd ./sonda
|
||||
|
||||
# build sonda image
|
||||
docker build -t local-perf-sonda -f Dockerfile.sonda .
|
||||
|
||||
# 2 sondas 500ms
|
||||
|
||||
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/127.0.0.1/tcp/60001/p2p/<SERVICE_PEER_ID>
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.95
|
||||
EOF
|
||||
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
|
||||
echo "Phase 1 running 300s..."
|
||||
sleep 300
|
||||
docker kill $(docker ps -q -f "label=sonda") >/dev/null 2>&1 || true
|
||||
|
||||
#5 sondas 200ms
|
||||
|
||||
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.2
|
||||
STORE_NODES=/ip4/127.0.0.1/tcp/60001/p2p/<SERVICE_PEER_ID>
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.95
|
||||
EOF
|
||||
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
|
||||
echo "Phase 2 running 300s..."
|
||||
sleep 300
|
||||
docker kill $(docker ps -q -f "label=sonda") >/dev/null 2>&1 || true
|
||||
|
||||
#10 sondas 100ms
|
||||
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.1
|
||||
STORE_NODES=/ip4/127.0.0.1/tcp/60001/p2p/<SERVICE_PEER_ID>
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.95
|
||||
EOF
|
||||
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
|
||||
echo "Phase 3 running 300s..."
|
||||
sleep 300
|
||||
docker kill $(docker ps -q -f "label=sonda") >/dev/null 2>&1 || true
|
||||
|
||||
cd ..
|
||||
|
||||
cd ./waku-simulator
|
||||
docker compose down
|
||||
cd ..
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Test finished at $current_time"
|
||||
@ -1,59 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "Running test..."
|
||||
|
||||
# This implements a short version of 1st store scenario.
|
||||
# waku-simulator with 15 nodes network, 1 service, 1 edge node added
|
||||
# service node is limited to 1 cpu core with only 512 MB
|
||||
# Runs 1 phase with sonda load:
|
||||
# 1. 10 sonda instances, each queries in every 100ms
|
||||
|
||||
cd ./waku-simulator
|
||||
|
||||
export NUM_NWAKU_NODES=15
|
||||
export TRAFFIC_DELAY_SECONDS=10
|
||||
export MSG_SIZE_KBYTES=8
|
||||
|
||||
docker compose up -d
|
||||
cd ..
|
||||
|
||||
echo "Waiting 20s for service node..."
|
||||
sleep 20
|
||||
|
||||
cd ./sonda
|
||||
|
||||
docker build -t local-perf-sonda -f Dockerfile.sonda .
|
||||
|
||||
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.1
|
||||
STORE_NODES=/ip4/127.0.0.1/tcp/60001/p2p/<SERVICE_PEER_ID>
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.95
|
||||
EOF
|
||||
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
|
||||
echo "Phase running 300s..."
|
||||
sleep 300
|
||||
|
||||
docker kill $(docker ps -q -f "label=sonda") >/dev/null 2>&1 || true
|
||||
|
||||
cd ..
|
||||
|
||||
cd ./waku-simulator
|
||||
docker compose down
|
||||
cd ..
|
||||
@ -1,182 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# waku-simulator with 15 nodes network, 1 service, 1 edge node added
|
||||
# service node is limited to 1 cpu core with only 512 MB
|
||||
# This scenario intended to stress test service node STORE queries with high request frequency
|
||||
# Increasing number of sonda instances and decreasing query delay ms
|
||||
# 16 sondas 100ms
|
||||
# 16 sondas 50ms
|
||||
# 24 sondas 50ms
|
||||
# 24 sondas 20ms
|
||||
|
||||
set -e
|
||||
|
||||
echo "Running test..."
|
||||
|
||||
cd ./waku-simulator
|
||||
|
||||
export NUM_NWAKU_NODES=15
|
||||
export TRAFFIC_DELAY_SECONDS=10
|
||||
export MSG_SIZE_KBYTES=12
|
||||
|
||||
docker compose up -d
|
||||
cd ..
|
||||
|
||||
echo "Waiting 30s for service node..."
|
||||
sleep 30
|
||||
|
||||
cd ./sonda
|
||||
|
||||
docker build -t local-perf-sonda -f Dockerfile.sonda .
|
||||
|
||||
#16 sondas 100ms
|
||||
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.1
|
||||
STORE_NODES=/ip4/127.0.0.1/tcp/60001/p2p/<SERVICE_PEER_ID>
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.95
|
||||
EOF
|
||||
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
|
||||
echo "Phase 1 300s..."
|
||||
sleep 300
|
||||
docker kill $(docker ps -q -f "label=sonda") >/dev/null 2>&1 || true
|
||||
|
||||
# 16 sondas 50ms
|
||||
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.05
|
||||
STORE_NODES=/ip4/127.0.0.1/tcp/60001/p2p/<SERVICE_PEER_ID>
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.95
|
||||
EOF
|
||||
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
|
||||
echo "Phase 2 300s..."
|
||||
sleep 300
|
||||
docker kill $(docker ps -q -f "label=sonda") >/dev/null 2>&1 || true
|
||||
|
||||
# 24 sondas 50ms
|
||||
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.05
|
||||
STORE_NODES=/ip4/127.0.0.1/tcp/60001/p2p/<SERVICE_PEER_ID>
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.95
|
||||
EOF
|
||||
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
|
||||
echo "Phase 3 300s..."
|
||||
sleep 300
|
||||
docker kill $(docker ps -q -f "label=sonda") >/dev/null 2>&1 || true
|
||||
|
||||
#24 sondas 20ms
|
||||
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.02
|
||||
STORE_NODES=/ip4/127.0.0.1/tcp/60001/p2p/<SERVICE_PEER_ID>
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.95
|
||||
EOF
|
||||
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
# repeat 23 more times
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
|
||||
echo "Phase 4 300s..."
|
||||
sleep 300
|
||||
docker kill $(docker ps -q -f "label=sonda") >/dev/null 2>&1 || true
|
||||
|
||||
cd ..
|
||||
|
||||
cd ./waku-simulator
|
||||
docker compose down
|
||||
cd ..
|
||||
121
scripts/Lite_protocol_scripts/store/store_KPI_simple.sh
Executable file
121
scripts/Lite_protocol_scripts/store/store_KPI_simple.sh
Executable file
@ -0,0 +1,121 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo " Running test (store_kpi with LPT publishers)…"
|
||||
|
||||
# -------- 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=2g
|
||||
export POSTGRES_CPU_CORES="0-3"
|
||||
export POSTGRES_MEM_LIMIT=2g
|
||||
export POSTGRES_SHM=1g
|
||||
|
||||
docker compose up -d
|
||||
|
||||
# wait for servicenode
|
||||
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 ..
|
||||
|
||||
# -------- Shared exports --------
|
||||
export RELAY_NODE_REST_ADDRESS=http://127.0.0.1:8645
|
||||
export STORE_NODE_REST_ADDRESS=http://127.0.0.1:8644
|
||||
export STORE_NODES=/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n
|
||||
export QUERY_DELAY=0.25
|
||||
export CLUSTER_ID=66
|
||||
export SHARD=0
|
||||
export PUBSUB=/waku/2/rs/66/0
|
||||
export CONTENT_TOPIC=/tester/2/light-pubsub-test/wakusim
|
||||
|
||||
cd ./lpt
|
||||
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
|
||||
export NUM_PUBLISHER_NODES=5
|
||||
export NUM_RECEIVER_NODES=5
|
||||
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="$STORE_NODES"
|
||||
export FILTER_SERVICE_PEER="$STORE_NODES"
|
||||
export PUBSUB
|
||||
export CONTENT_TOPIC
|
||||
export CLUSTER_ID
|
||||
|
||||
docker compose up -d
|
||||
|
||||
cd ..
|
||||
|
||||
cd ./sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
|
||||
cat <<EOF > perf-test.env
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
QUERY_DELAY=${QUERY_DELAY}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
CLUSTER_ID=${CLUSTER_ID}
|
||||
SHARD=${SHARD}
|
||||
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 ..
|
||||
|
||||
echo "[store_kpi] warmup 60s to build history…"
|
||||
sleep 60
|
||||
|
||||
# -------- Store KPI (10-minute query loop, in parallel with LPT) --------
|
||||
URL="${STORE_NODE_REST_ADDRESS}/store/v3/messages"
|
||||
PEERADDR="${STORE_NODES%%,*}"
|
||||
|
||||
burst_once() {
|
||||
local now start par
|
||||
now=$(( $(date +%s) * 1000 ))
|
||||
start=$(( now - 600 * 1000 )) # 10-minute window
|
||||
par=20
|
||||
echo "[burst] 10m window, ${par} parallel → ${URL}"
|
||||
for i in $(seq 1 $par); do
|
||||
curl -s --get "$URL" \
|
||||
--data-urlencode "peerAddr=$PEERADDR" \
|
||||
--data-urlencode "pubsubTopic=$PUBSUB" \
|
||||
--data-urlencode "contentTopics=$CONTENT_TOPIC" \
|
||||
--data-urlencode "includeData=true" \
|
||||
--data-urlencode "startTime=$start" \
|
||||
> /dev/null &
|
||||
done
|
||||
wait
|
||||
}
|
||||
|
||||
RUN_MINUTES=10
|
||||
END_TS=$(( $(date +%s) + RUN_MINUTES*60 ))
|
||||
iter=0
|
||||
echo "[store_kpi] querying for ${RUN_MINUTES} minutes while LPT publishes…"
|
||||
while (( $(date +%s) < END_TS )); do
|
||||
iter=$((iter+1))
|
||||
burst_once
|
||||
echo "[burst] iter=$iter done; sleeping 10s"
|
||||
sleep 10
|
||||
done
|
||||
|
||||
# -------- Tidy --------
|
||||
echo "[store_kpi] 10min run complete. Stopping LPT stack…"
|
||||
( cd ./lpt && docker compose down )
|
||||
107
scripts/Lite_protocol_scripts/store/store_cpu_stress.sh
Executable file
107
scripts/Lite_protocol_scripts/store/store_cpu_stress.sh
Executable file
@ -0,0 +1,107 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
export SCENARIO_ID="cpu_store_stress"
|
||||
export TEST_NAME="${SCENARIO_ID}_$(date +%Y%m%d_%H%M%S)"
|
||||
echo "[${TEST_NAME}] start"
|
||||
|
||||
export GF_SECURITY_ADMIN_USER="admin"
|
||||
export GF_SECURITY_ADMIN_PASSWORD="admin"
|
||||
export NODEKEY="${NODEKEY:-}"
|
||||
export STORAGE_SIZE="${STORAGE_SIZE:-}"
|
||||
|
||||
export NWAKU_IMAGE="wakuorg/nwaku:latest"
|
||||
export NUM_NWAKU_NODES=15
|
||||
export RLN_ENABLED=false
|
||||
|
||||
# Service node
|
||||
export SERVICENODE_METRICS_PORT=8008
|
||||
export SERVICENODE_HTTP_PORT=8644
|
||||
export SERVICENODE_REST_PORT=8645
|
||||
|
||||
export POSTGRES_EXPORTER_PORT=9187
|
||||
export PROMETHEUS_PORT=9090
|
||||
export GRAFANA_PORT=3001
|
||||
|
||||
export SERVICENODE_CPU_CORES="0-1"
|
||||
export SERVICENODE_MEM_LIMIT=512m
|
||||
export POSTGRES_CPU_CORES="0-3"
|
||||
export POSTGRES_MEM_LIMIT=2g
|
||||
export POSTGRES_SHM=1g
|
||||
|
||||
export LPT_IMAGE="harbor.status.im/wakuorg/liteprotocoltester:latest"
|
||||
|
||||
# Topic / shard
|
||||
export CLUSTER_ID=66
|
||||
export SHARD=0
|
||||
export PUBSUB_TOPIC="/waku/2/rs/${CLUSTER_ID}/${SHARD}"
|
||||
|
||||
export RELAY_NODE_REST_ADDRESS="http://127.0.0.1:${SERVICENODE_REST_PORT}"
|
||||
export STORE_NODE_REST_ADDRESS="http://127.0.0.1:${SERVICENODE_HTTP_PORT}"
|
||||
|
||||
# Phase 0 — bring up simulator
|
||||
echo "[${TEST_NAME}] Phase 0: bring up simulator"
|
||||
cd ./waku-simulator
|
||||
docker compose up -d
|
||||
cd ..
|
||||
echo "[${TEST_NAME}] wait 30s"
|
||||
sleep 30
|
||||
|
||||
# =========================
|
||||
# Phase 1 — CPU-heavy writers (small msgs, high rate)
|
||||
# =========================
|
||||
export NUM_PUBLISHER_NODES=24
|
||||
export NUM_RECEIVER_NODES=8
|
||||
export MESSAGE_INTERVAL_MILLIS=10
|
||||
export MIN_MESSAGE_SIZE=256
|
||||
export MAX_MESSAGE_SIZE=1024
|
||||
export START_PUBLISHING_AFTER=10
|
||||
export NUM_MESSAGES=0
|
||||
|
||||
echo "[${TEST_NAME}] Phase 1: start writers"
|
||||
docker run -d --rm --name lpt_cpu \
|
||||
-e PUB_NODES=${NUM_PUBLISHER_NODES} \
|
||||
-e RCV_NODES=${NUM_RECEIVER_NODES} \
|
||||
-e MSG_INTERVAL_MS=${MESSAGE_INTERVAL_MILLIS} \
|
||||
-e MIN_MSG=${MIN_MESSAGE_SIZE} \
|
||||
-e MAX_MSG=${MAX_MESSAGE_SIZE} \
|
||||
-e PUBSUB_TOPIC=${PUBSUB_TOPIC} \
|
||||
--network host ${LPT_IMAGE}
|
||||
|
||||
# =========================
|
||||
# Phase 2
|
||||
# =========================
|
||||
echo "[${TEST_NAME}] Phase 2: build and start Sonda"
|
||||
cd ./sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
|
||||
cat <<EOF > perf-test.env
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
QUERY_DELAY=0.5
|
||||
STORE_NODES=/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n
|
||||
CLUSTER_ID=${CLUSTER_ID}
|
||||
SHARD=${SHARD}
|
||||
PUBSUB_TOPIC=/waku/2/rs/${CLUSTER_ID}/${SHARD}
|
||||
EOF
|
||||
|
||||
docker run --env-file perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
cd ..
|
||||
|
||||
echo "[${TEST_NAME}] hold 240s"
|
||||
sleep 240
|
||||
|
||||
# =========================
|
||||
# Phase 3 — recovery
|
||||
# =========================
|
||||
echo "[${TEST_NAME}] Phase 3: stop writers; observe 120s"
|
||||
docker kill lpt_cpu || true
|
||||
sleep 120
|
||||
|
||||
# =========================
|
||||
# Cleanup
|
||||
# =========================
|
||||
echo "[${TEST_NAME}] cleanup"
|
||||
docker kill $(docker ps -q --filter "label=sonda") || true
|
||||
cd ./waku-simulator
|
||||
docker compose down -v
|
||||
@ -1,82 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Scenario 6: Alternate tiny and huge payloads at fast rates to stress allocators and CPU.
|
||||
set -e
|
||||
|
||||
STORE_NODES="/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n"
|
||||
RELAY_NODE_REST_ADDRESS="http://127.0.0.1:8645"
|
||||
STORE_NODE_REST_ADDRESS="http://127.0.0.1:8644"
|
||||
PUBSUB_TOPIC="/waku/2/default-waku/proto"
|
||||
CONTENT_TOPIC="/sonda/2/polls/proto"
|
||||
PHASE_SLEEP=240
|
||||
|
||||
echo "Running test..."
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Bringing up simulator at $current_time"
|
||||
|
||||
cd ./waku-simulator
|
||||
export SERVICENODE_CPU_CORES=0
|
||||
export POSTGRES_CPU_CORES=1-3
|
||||
export GF_SECURITY_ADMIN_USER=admin
|
||||
export GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
docker compose up -d
|
||||
while [ "$(docker inspect --format "{{.State.Status}}" $(docker compose ps -q servicenode))" != "running" ]; do
|
||||
sleep 1
|
||||
done
|
||||
cd ..
|
||||
|
||||
cd ./sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
cat > ./perf-test.env <<EOF
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
QUERY_DELAY=0.2
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.9
|
||||
PUBSUB_TOPIC=${PUBSUB_TOPIC}
|
||||
CONTENT_TOPIC=${CONTENT_TOPIC}
|
||||
EOF
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
cd ..
|
||||
|
||||
cd ./lpt
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
export START_PUBLISHING_AFTER=10
|
||||
|
||||
export NUM_PUBLISHER_NODES=30
|
||||
export NUM_RECEIVER_NODES=15
|
||||
export MESSAGE_MIN_BYTES=256
|
||||
export MESSAGE_MAX_BYTES=512
|
||||
export LIGHTPUSH_INTERVAL_MS=25
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 1: tiny payloads (256–512B, 25ms) 30 pub / 15 recv $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=20
|
||||
export NUM_RECEIVER_NODES=10
|
||||
export MESSAGE_MIN_BYTES=32768
|
||||
export MESSAGE_MAX_BYTES=131072
|
||||
export LIGHTPUSH_INTERVAL_MS=30
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 2: huge payloads (32–128KB, 30ms) 20 pub / 10 recv $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=40
|
||||
export NUM_RECEIVER_NODES=20
|
||||
export MESSAGE_MIN_BYTES=1024
|
||||
export MESSAGE_MAX_BYTES=65536
|
||||
export LIGHTPUSH_INTERVAL_MS=20
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 3: mixed payloads (1–64KB, 20ms) 40 pub / 20 recv $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
cd ..
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Scenario 6 finished at $current_time"
|
||||
92
scripts/Lite_protocol_scripts/store/store_kpi_small_page.sh
Executable file
92
scripts/Lite_protocol_scripts/store/store_kpi_small_page.sh
Executable file
@ -0,0 +1,92 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
|
||||
|
||||
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=2g
|
||||
export POSTGRES_CPU_CORES="0-3"
|
||||
export POSTGRES_MEM_LIMIT=2g
|
||||
export POSTGRES_SHM=1g
|
||||
|
||||
docker compose up -d
|
||||
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 ..
|
||||
|
||||
export RELAY_NODE_REST_ADDRESS=http://127.0.0.1:8645
|
||||
export STORE_NODE_REST_ADDRESS=http://127.0.0.1:8644
|
||||
export STORE_NODES=/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n
|
||||
export QUERY_DELAY=0.5
|
||||
export CLUSTER_ID=66
|
||||
export SHARD=0
|
||||
export PUBSUB=/waku/2/rs/66/0
|
||||
export CONTENT_TOPIC=/tester/2/light-pubsub-test/wakusim
|
||||
|
||||
cd ./sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
|
||||
cat <<EOF > perf-test.env
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
QUERY_DELAY=${QUERY_DELAY}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
CLUSTER_ID=${CLUSTER_ID}
|
||||
SHARD=${SHARD}
|
||||
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 ..
|
||||
|
||||
echo "[store_kpi_smallpage] warmup 60s to build history…"
|
||||
sleep 60
|
||||
|
||||
URL="${STORE_NODE_REST_ADDRESS}/store/v3/messages"
|
||||
PEERADDR="${STORE_NODES%%,*}" # fixed to first entry
|
||||
|
||||
burst_once() {
|
||||
local now start
|
||||
now=$(( $(date +%s) * 1000 ))
|
||||
start=$(( now - 600 * 1000 )) # 10-minute window
|
||||
local par=20
|
||||
echo "[burst-smallpage] 10m window, ${par} parallel → ${URL}"
|
||||
for i in $(seq 1 $par); do
|
||||
curl -s --get "$URL" \
|
||||
--data-urlencode "peerAddr=$PEERADDR" \
|
||||
--data-urlencode "pubsubTopic=$PUBSUB" \
|
||||
--data-urlencode "contentTopics=$CONTENT_TOPIC" \
|
||||
--data-urlencode "includeData=true" \
|
||||
--data-urlencode "pageSize=5" \
|
||||
--data-urlencode "startTime=$start" \
|
||||
> /dev/null &
|
||||
done
|
||||
wait
|
||||
}
|
||||
|
||||
# run bursts for a full 10 minutes
|
||||
RUN_MINUTES=10
|
||||
END_TS=$(( $(date +%s) + RUN_MINUTES*60 ))
|
||||
iter=0
|
||||
echo "[store_kpi_smallpage] querying for ${RUN_MINUTES} minutes…"
|
||||
while (( $(date +%s) < END_TS )); do
|
||||
iter=$((iter+1))
|
||||
burst_once
|
||||
echo "[burst-smallpage] iter=$iter done; sleeping 10s"
|
||||
sleep 10
|
||||
done
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Scenario 4: Run Sonda on two pubsub topics (and shards) in parallel while LPT publishes/receives in phases.
|
||||
set -e
|
||||
|
||||
STORE_NODES="/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n"
|
||||
RELAY_NODE_REST_ADDRESS="http://127.0.0.1:8645"
|
||||
STORE_NODE_REST_ADDRESS="http://127.0.0.1:8644"
|
||||
PUBSUB_TOPIC_A="/waku/2/default-waku/proto"
|
||||
PUBSUB_TOPIC_B="/waku/2/extra-waku/proto"
|
||||
CONTENT_TOPIC="/sonda/2/polls/proto"
|
||||
PHASE_SLEEP=300
|
||||
|
||||
echo "Running test..."
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Bringing up simulator at $current_time"
|
||||
|
||||
cd ./waku-simulator
|
||||
export SERVICENODE_CPU_CORES=0
|
||||
export POSTGRES_CPU_CORES=1-3
|
||||
export GF_SECURITY_ADMIN_USER=admin
|
||||
export GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
docker compose up -d
|
||||
while [ "$(docker inspect --format "{{.State.Status}}" $(docker compose ps -q servicenode))" != "running" ]; do
|
||||
sleep 1
|
||||
done
|
||||
cd ..
|
||||
|
||||
cd ./sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
|
||||
cat > ./perf-topic-a.env <<EOF
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
QUERY_DELAY=0.25
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.9
|
||||
PUBSUB_TOPIC=${PUBSUB_TOPIC_A}
|
||||
CONTENT_TOPIC=${CONTENT_TOPIC}
|
||||
EOF
|
||||
|
||||
cat > ./perf-topic-b.env <<EOF
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
QUERY_DELAY=0.25
|
||||
CLUSTER_ID=66
|
||||
SHARD=1
|
||||
HEALTH_THRESHOLD=0.9
|
||||
PUBSUB_TOPIC=${PUBSUB_TOPIC_B}
|
||||
CONTENT_TOPIC=${CONTENT_TOPIC}
|
||||
EOF
|
||||
|
||||
docker run --env-file ./perf-topic-a.env -l sonda-a -d --network host local-perf-sonda
|
||||
docker run --env-file ./perf-topic-b.env -l sonda-b -d --network host local-perf-sonda
|
||||
cd ..
|
||||
|
||||
cd ./lpt
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
export START_PUBLISHING_AFTER=15
|
||||
|
||||
export NUM_PUBLISHER_NODES=15
|
||||
export NUM_RECEIVER_NODES=15
|
||||
export MESSAGE_MIN_BYTES=2048
|
||||
export MESSAGE_MAX_BYTES=32768
|
||||
export LIGHTPUSH_INTERVAL_MS=90
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 1: 15 pub / 15 recv (90ms, 2–32KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=25
|
||||
export NUM_RECEIVER_NODES=25
|
||||
export MESSAGE_MIN_BYTES=4096
|
||||
export MESSAGE_MAX_BYTES=65536
|
||||
export LIGHTPUSH_INTERVAL_MS=80
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 2: 25 pub / 25 recv (80ms, 4–64KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down receivernode
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 3: receivers down, publishers + sonda $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
cd ..
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Scenario 4 finished at $current_time"
|
||||
@ -1,130 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# This implements a simple Store scenario, matching scenario_1.sh style:
|
||||
# - Bring up waku-simulator
|
||||
# - Wait for servicenode to be running (tight while loop like scenario_1.sh)
|
||||
# - Start Sonda (publishes via relay & queries store) using perf-test.env
|
||||
# - Start LPT (publishers/receivers) in phases: 2x2 -> 1x5 -> 5x1 -> receivers down -> lpt down
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# >>> EDIT THESE IF YOUR SETUP DIFFERS <<<
|
||||
STORE_NODES="/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n"
|
||||
RELAY_NODE_REST_ADDRESS="http://127.0.0.1:8645"
|
||||
STORE_NODE_REST_ADDRESS="http://127.0.0.1:8644"
|
||||
PUBSUB_TOPIC="/waku/2/default-waku/proto"
|
||||
CONTENT_TOPIC="/sonda/2/polls/proto"
|
||||
# <<< EDIT ABOVE >>>
|
||||
|
||||
echo "Running test..."
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Bringing up simulator at $current_time"
|
||||
|
||||
cd ./waku-simulator
|
||||
|
||||
# same style: exports before compose
|
||||
export SERVICENODE_CPU_CORES=0 # 1 core for service node
|
||||
export POSTGRES_CPU_CORES=1-3 # keep DB off core 0
|
||||
export GF_SECURITY_ADMIN_USER=admin
|
||||
export GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
export NWAKU_IMAGE=wakuorg/nwaku:latest
|
||||
export NUM_NWAKU_NODES=15
|
||||
export RLN_ENABLED=false
|
||||
|
||||
docker compose up -d
|
||||
|
||||
# Wait for servicenode to be running (scenario_1.sh style)
|
||||
while [ "$(docker inspect --format "{{.State.Status}}" $(docker compose ps -q servicenode))" != "running" ]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
cd ..
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Start Sonda (like scenario_1.sh: build & run with env-file, host network)
|
||||
# ------------------------------------------------------------------------------
|
||||
cd ./sonda
|
||||
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
|
||||
cat > ./perf-test.env <<EOF
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
QUERY_DELAY=0.5
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.9
|
||||
PUBSUB_TOPIC=${PUBSUB_TOPIC}
|
||||
CONTENT_TOPIC=${CONTENT_TOPIC}
|
||||
EOF
|
||||
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
|
||||
cd ..
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Start LPT publishers/receivers in phases (exact same flow pattern as scenario_1.sh)
|
||||
# ------------------------------------------------------------------------------
|
||||
cd ./lpt
|
||||
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
|
||||
## Define number of publisher and receiver nodes to run.
|
||||
export NUM_PUBLISHER_NODES=2
|
||||
export NUM_RECEIVER_NODES=2
|
||||
|
||||
## Can add some seconds delay before SENDER starts publishing
|
||||
## Useful to let RECEIVER nodes to setup and subscribe ahead of expected messages being sent.
|
||||
export START_PUBLISHING_AFTER=15
|
||||
|
||||
docker compose up -d
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "LPT- is running with 2 publisher and 2 receiver + sonda from now: $current_time"
|
||||
|
||||
sleep 300
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=1
|
||||
export NUM_RECEIVER_NODES=5
|
||||
docker compose up -d
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "LPT- is running with 1 publisher and 5 receiver from now: $current_time"
|
||||
|
||||
sleep 300
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=5
|
||||
export NUM_RECEIVER_NODES=1
|
||||
docker compose up -d
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "LPT- is running with 5 publisher and 1 receiver from now: $current_time"
|
||||
|
||||
sleep 300
|
||||
|
||||
# switch off receiver (like scenario_1 “switch off filter” step)
|
||||
docker compose down receivernode
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "LPT- receiver nodes are down, sonda and lightpush publisher is working from now: $current_time"
|
||||
|
||||
sleep 300
|
||||
|
||||
# swtich off lightpush (leave only sonda)
|
||||
docker compose down
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "LPT down, only sonda is working from now: $current_time"
|
||||
|
||||
sleep 300
|
||||
|
||||
cd ..
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Test finished at $current_time"
|
||||
124
scripts/Lite_protocol_scripts/store/store_scenario_6.sh
Executable file
124
scripts/Lite_protocol_scripts/store/store_scenario_6.sh
Executable file
@ -0,0 +1,124 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# ID
|
||||
export SCENARIO_ID="cpu_store_stress"
|
||||
export TEST_NAME="${SCENARIO_ID}_$(date +%Y%m%d_%H%M%S)"
|
||||
echo "[${TEST_NAME}] start"
|
||||
|
||||
# Images (pin for comparability)
|
||||
export NWAKU_IMAGE="wakuorg/nwaku:stable"
|
||||
export LPT_IMAGE="wakuorg/liteprotocoltester:latest"
|
||||
export SONDA_IMAGE="wakuorg/sonda:latest"
|
||||
|
||||
# Service/DB resources (CPU bottleneck on service)
|
||||
export SERVICENODE_CPU_CORES=0
|
||||
export POSTGRES_CPU_CORES=1-3
|
||||
export SERVICE_MEM_LIMIT="2g"
|
||||
export POSTGRES_MEM_LIMIT="2g"
|
||||
export POSTGRES_SHM_SIZE="1g"
|
||||
|
||||
# Topic/shards
|
||||
export CLUSTER_ID=66
|
||||
export SHARD=0
|
||||
export PUBSUB_TOPIC="/waku/2/rs/${CLUSTER_ID}/${SHARD}"
|
||||
export CONTENT_TOPIC="/sonda/2/polls/proto"
|
||||
|
||||
# REST endpoints
|
||||
export RELAY_NODE_REST_ADDRESS="http://127.0.0.1:8645"
|
||||
export STORE_NODE_REST_ADDRESS="http://127.0.0.1:8644"
|
||||
export STORE_NODES="/ip4/127.0.0.1/tcp/30303/p2p/SERVICE_PEER_ID"
|
||||
|
||||
# Health
|
||||
export HEALTH_THRESHOLD=0.85
|
||||
|
||||
# ---------- Phase 0: up ----------
|
||||
echo "[${TEST_NAME}] up simulator"
|
||||
cd ./waku-simulator
|
||||
docker compose up -d
|
||||
cd ..
|
||||
echo "[${TEST_NAME}] wait 30s"
|
||||
sleep 30
|
||||
|
||||
# ---------- Phase 1: CPU write hammer (small msgs, high rate) ----------
|
||||
# Small payloads + high publisher count => per-message CPU (encode/verify/route) dominates.
|
||||
export NUM_PUBLISHER_NODES=24
|
||||
export NUM_RECEIVER_NODES=8
|
||||
export MESSAGE_INTERVAL_MILLIS=8
|
||||
export MIN_MESSAGE_SIZE=256
|
||||
export MAX_MESSAGE_SIZE=1024
|
||||
export START_PUBLISHING_AFTER=10
|
||||
export NUM_MESSAGES=0
|
||||
|
||||
echo "[${TEST_NAME}] phase1 writers: ${NUM_PUBLISHER_NODES} pubs @ ${MESSAGE_INTERVAL_MILLIS}ms, 256-1024B"
|
||||
docker run -d --rm --name lpt_cpu \
|
||||
-e PUB_NODES=${NUM_PUBLISHER_NODES} \
|
||||
-e RCV_NODES=${NUM_RECEIVER_NODES} \
|
||||
-e MSG_INTERVAL_MS=${MESSAGE_INTERVAL_MILLIS} \
|
||||
-e MIN_MSG=${MIN_MESSAGE_SIZE} \
|
||||
-e MAX_MSG=${MAX_MESSAGE_SIZE} \
|
||||
-e PUBSUB_TOPIC=${PUBSUB_TOPIC} \
|
||||
--network host ${LPT_IMAGE}
|
||||
|
||||
# ---------- Phase 2: Store read hammer (concurrent readers) ----------
|
||||
# Mix includeData true/false and page sizes to exercise CPU (serialization/JSON) & DB.
|
||||
echo "[${TEST_NAME}] phase2 store readers"
|
||||
docker run -d --rm --name sonda_idx \
|
||||
--network host ${SONDA_IMAGE} \
|
||||
--relay-node-rest-address "${RELAY_NODE_REST_ADDRESS}" \
|
||||
--store-node-rest-address "${STORE_NODE_REST_ADDRESS}" \
|
||||
--pubsub-topic "${PUBSUB_TOPIC}" \
|
||||
--store-nodes "${STORE_NODES}" \
|
||||
--delay-seconds 0.07 --health-threshold ${HEALTH_THRESHOLD} \
|
||||
--metrics-port 8004 --include-data=false --page-size 150
|
||||
|
||||
docker run -d --rm --name sonda_smallpages \
|
||||
--network host ${SONDA_IMAGE} \
|
||||
--relay-node-rest-address "${RELAY_NODE_REST_ADDRESS}" \
|
||||
--store-node-rest-address "${STORE_NODE_REST_ADDRESS}" \
|
||||
--pubsub-topic "${PUBSUB_TOPIC}" \
|
||||
--store-nodes "${STORE_NODES}" \
|
||||
--delay-seconds 0.05 --health-threshold ${HEALTH_THRESHOLD} \
|
||||
--metrics-port 8005 --include-data=true --page-size 5
|
||||
|
||||
docker run -d --rm --name sonda_bigpages \
|
||||
--network host ${SONDA_IMAGE} \
|
||||
--relay-node-rest-address "${RELAY_NODE_REST_ADDRESS}" \
|
||||
--store-node-rest-address "${STORE_NODE_REST_ADDRESS}" \
|
||||
--pubsub-topic "${PUBSUB_TOPIC}" \
|
||||
--store-nodes "${STORE_NODES}" \
|
||||
--delay-seconds 0.05 --health-threshold ${HEALTH_THRESHOLD} \
|
||||
--metrics-port 8006 --include-data=true --page-size 50
|
||||
|
||||
# Extra readers to push CPU on the service process:
|
||||
docker run -d --rm --name sonda_mix1 \
|
||||
--network host ${SONDA_IMAGE} \
|
||||
--relay-node-rest-address "${RELAY_NODE_REST_ADDRESS}" \
|
||||
--store-node-rest-address "${STORE_NODE_REST_ADDRESS}" \
|
||||
--pubsub-topic "${PUBSUB_TOPIC}" \
|
||||
--store-nodes "${STORE_NODES}" \
|
||||
--delay-seconds 0.03 --health-threshold ${HEALTH_THRESHOLD} \
|
||||
--metrics-port 8007 --include-data=true --page-size 25
|
||||
|
||||
docker run -d --rm --name sonda_mix2 \
|
||||
--network host ${SONDA_IMAGE} \
|
||||
--relay-node-rest-address "${RELAY_NODE_REST_ADDRESS}" \
|
||||
--store-node-rest-address "${STORE_NODE_REST_ADDRESS}" \
|
||||
--pubsub-topic "${PUBSUB_TOPIC}" \
|
||||
--store-nodes "${STORE_NODES}" \
|
||||
--delay-seconds 0.03 --health-threshold ${HEALTH_THRESHOLD} \
|
||||
--metrics-port 8008 --include-data=false --page-size 200
|
||||
|
||||
echo "[${TEST_NAME}] hold 12m"
|
||||
sleep 720
|
||||
|
||||
# ---------- Phase 3: plateau & recovery ----------
|
||||
echo "[${TEST_NAME}] phase3 stop writers; keep readers 2m (recovery CPU/GC)"
|
||||
docker kill lpt_cpu || true
|
||||
sleep 120
|
||||
|
||||
# ---------- Cleanup ----------
|
||||
echo "[${TEST_NAME}] cleanup"
|
||||
docker kill sonda_idx sonda_smallpages sonda_bigpages sonda_mix1 sonda_mix2 || true
|
||||
cd ./waku-simulator
|
||||
docker compose down -v
|
||||
@ -1,96 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
STORE_NODES="/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n,/ip4/10.2.0.102/tcp/60001/p2p/16Uiu2HA7abcDEF451tGkbzz4Mjcg6DRnmAHxNeWyF4zp23RbpXYZ2"
|
||||
RELAY_NODE_REST_ADDRESS="http://127.0.0.1:8645"
|
||||
STORE_NODE_REST_ADDRESS="http://127.0.0.1:8644"
|
||||
PUBSUB_TOPIC="/waku/2/default-waku/proto"
|
||||
CONTENT_TOPIC="/sonda/2/polls/proto"
|
||||
PHASE_SLEEP=300
|
||||
|
||||
echo "Running test..."
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Bringing up simulator at $current_time"
|
||||
|
||||
cd ./waku-simulator
|
||||
export SERVICENODE_CPU_CORES=0
|
||||
export POSTGRES_CPU_CORES=1-3
|
||||
export GF_SECURITY_ADMIN_USER=admin
|
||||
export GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
docker compose up -d
|
||||
while [ "$(docker inspect --format "{{.State.Status}}" $(docker compose ps -q servicenode))" != "running" ]; do
|
||||
sleep 1
|
||||
done
|
||||
cd ..
|
||||
|
||||
cd ./sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
cat > ./perf-test.env <<EOF
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
QUERY_DELAY=0.25
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.9
|
||||
PUBSUB_TOPIC=${PUBSUB_TOPIC}
|
||||
CONTENT_TOPIC=${CONTENT_TOPIC}
|
||||
EOF
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
cd ..
|
||||
|
||||
cd ./lpt
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
export START_PUBLISHING_AFTER=15
|
||||
export MESSAGE_MIN_BYTES=2048
|
||||
export MESSAGE_MAX_BYTES=32768
|
||||
export NUM_PUBLISHER_NODES=10
|
||||
export NUM_RECEIVER_NODES=10
|
||||
export LIGHTPUSH_INTERVAL_MS=100
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "LPT- Phase 1: 10 pub / 10 recv (100ms, 2–32KB). Start: $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=20
|
||||
export NUM_RECEIVER_NODES=5
|
||||
export MESSAGE_MIN_BYTES=4096
|
||||
export MESSAGE_MAX_BYTES=65536
|
||||
export LIGHTPUSH_INTERVAL_MS=80
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "LPT- Phase 2: 20 pub / 5 recv (80ms, 4–64KB). Start: $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=5
|
||||
export NUM_RECEIVER_NODES=20
|
||||
export MESSAGE_MIN_BYTES=1024
|
||||
export MESSAGE_MAX_BYTES=16384
|
||||
export LIGHTPUSH_INTERVAL_MS=120
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "LPT- Phase 3: 5 pub / 20 recv (120ms, 1–16KB). Start: $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=25
|
||||
export NUM_RECEIVER_NODES=25
|
||||
export MESSAGE_MIN_BYTES=2048
|
||||
export MESSAGE_MAX_BYTES=32768
|
||||
export LIGHTPUSH_INTERVAL_MS=90
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "LPT- Phase 4: 25 pub / 25 recv (90ms, 2–32KB). Start: $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down receivernode
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "LPT- Phase 5: receivers down, publishers + Sonda only. Start: $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
cd ..
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Scenario finished at $current_time"
|
||||
@ -1,97 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
STORE_NODES="/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n,/ip4/10.2.0.102/tcp/60001/p2p/16Uiu2HA7abcDEF451tGkbzz4Mjcg6DRnmAHxNeWyF4zp23RbpXYZ2"
|
||||
RELAY_NODE_REST_ADDRESS="http://127.0.0.1:8645"
|
||||
STORE_NODE_REST_ADDRESS="http://127.0.0.1:8644"
|
||||
PUBSUB_TOPIC="/waku/2/default-waku/proto"
|
||||
CONTENT_TOPIC="/sonda/2/polls/proto"
|
||||
PHASE_SLEEP=240
|
||||
|
||||
echo "Running test..."
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Bringing up simulator at $current_time"
|
||||
|
||||
cd ./waku-simulator
|
||||
export SERVICENODE_CPU_CORES=0
|
||||
export POSTGRES_CPU_CORES=1-3
|
||||
export GF_SECURITY_ADMIN_USER=admin
|
||||
export GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
docker compose up -d
|
||||
while [ "$(docker inspect --format "{{.State.Status}}" $(docker compose ps -q servicenode))" != "running" ]; do
|
||||
sleep 1
|
||||
done
|
||||
cd ..
|
||||
|
||||
cd ./sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
cat > ./perf-test.env <<EOF
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
QUERY_DELAY=0.15
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.9
|
||||
PUBSUB_TOPIC=${PUBSUB_TOPIC}
|
||||
CONTENT_TOPIC=${CONTENT_TOPIC}
|
||||
EOF
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
cd ..
|
||||
|
||||
cd ./lpt
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
export START_PUBLISHING_AFTER=15
|
||||
|
||||
export NUM_PUBLISHER_NODES=15
|
||||
export NUM_RECEIVER_NODES=15
|
||||
export MESSAGE_MIN_BYTES=2048
|
||||
export MESSAGE_MAX_BYTES=16384
|
||||
export LIGHTPUSH_INTERVAL_MS=50
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 1: 15 pub / 15 recv (50ms, 2–16KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=30
|
||||
export NUM_RECEIVER_NODES=30
|
||||
export MESSAGE_MIN_BYTES=4096
|
||||
export MESSAGE_MAX_BYTES=32768
|
||||
export LIGHTPUSH_INTERVAL_MS=30
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 2: 30 pub / 30 recv (30ms, 4–32KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=50
|
||||
export NUM_RECEIVER_NODES=25
|
||||
export MESSAGE_MIN_BYTES=8192
|
||||
export MESSAGE_MAX_BYTES=65536
|
||||
export LIGHTPUSH_INTERVAL_MS=20
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 3: 50 pub / 25 recv (20ms, 8–64KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
export NUM_PUBLISHER_NODES=25
|
||||
export NUM_RECEIVER_NODES=50
|
||||
export MESSAGE_MIN_BYTES=8192
|
||||
export MESSAGE_MAX_BYTES=65536
|
||||
export LIGHTPUSH_INTERVAL_MS=20
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 4: 25 pub / 50 recv (20ms, 8–64KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down receivernode
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 5: receivers down, publishers + Sonda only $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
cd ..
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Scenario finished at $current_time"
|
||||
@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
STORE_NODES="/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n"
|
||||
RELAY_NODE_REST_ADDRESS="http://127.0.0.1:8645"
|
||||
STORE_NODE_REST_ADDRESS="http://127.0.0.1:8644"
|
||||
PUBSUB_TOPIC="/waku/2/default-waku/proto"
|
||||
CONTENT_TOPIC="/sonda/2/polls/proto"
|
||||
PHASE_SLEEP=600
|
||||
|
||||
echo "Running test..."
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Bringing up simulator at $current_time"
|
||||
|
||||
cd ./waku-simulator
|
||||
export SERVICENODE_CPU_CORES=0
|
||||
export POSTGRES_CPU_CORES=1-3
|
||||
export GF_SECURITY_ADMIN_USER=admin
|
||||
export GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
docker compose up -d
|
||||
while [ "$(docker inspect --format "{{.State.Status}}" $(docker compose ps -q servicenode))" != "running" ]; do
|
||||
sleep 1
|
||||
done
|
||||
cd ..
|
||||
|
||||
cd ./sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
cat > ./perf-test.env <<EOF
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
QUERY_DELAY=5
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.9
|
||||
PUBSUB_TOPIC=${PUBSUB_TOPIC}
|
||||
CONTENT_TOPIC=${CONTENT_TOPIC}
|
||||
EOF
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
cd ..
|
||||
|
||||
cd ./lpt
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
export START_PUBLISHING_AFTER=15
|
||||
export NUM_PUBLISHER_NODES=20
|
||||
export NUM_RECEIVER_NODES=5
|
||||
export MESSAGE_MIN_BYTES=4096
|
||||
export MESSAGE_MAX_BYTES=65536
|
||||
export LIGHTPUSH_INTERVAL_MS=40
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Scenario 1 started (20 pub / 5 recv, 40ms, 4–64KB). Time: $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
docker compose down
|
||||
cd ..
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Scenario 1 finished at $current_time"
|
||||
@ -1,88 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Scenario 5 heavy publishing, then deep Store backfill queries with full JSON output.
|
||||
set -e
|
||||
|
||||
STORE_NODES="/ip4/10.2.0.101/tcp/60001/p2p/16Uiu2HAkyte8uj451tGkbww4Mjcg6DRnmAHxNeWyF4zp23RbpG3n"
|
||||
RELAY_NODE_REST_ADDRESS="http://127.0.0.1:8645"
|
||||
STORE_NODE_REST_ADDRESS="http://127.0.0.1:8644"
|
||||
PUBSUB_TOPIC="/waku/2/default-waku/proto"
|
||||
CONTENT_TOPIC="/sonda/2/polls/proto"
|
||||
PHASE_SLEEP=600
|
||||
|
||||
echo "Running test..."
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Bringing up simulator at $current_time"
|
||||
|
||||
cd ./waku-simulator
|
||||
export SERVICENODE_CPU_CORES=0
|
||||
export POSTGRES_CPU_CORES=1-3
|
||||
export GF_SECURITY_ADMIN_USER=admin
|
||||
export GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
docker compose up -d
|
||||
while [ "$(docker inspect --format "{{.State.Status}}" $(docker compose ps -q servicenode))" != "running" ]; do
|
||||
sleep 1
|
||||
done
|
||||
cd ..
|
||||
|
||||
cd ./sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
cat > ./perf-test.env <<EOF
|
||||
RELAY_NODE_REST_ADDRESS=${RELAY_NODE_REST_ADDRESS}
|
||||
STORE_NODE_REST_ADDRESS=${STORE_NODE_REST_ADDRESS}
|
||||
STORE_NODES=${STORE_NODES}
|
||||
QUERY_DELAY=3
|
||||
CLUSTER_ID=66
|
||||
SHARD=0
|
||||
HEALTH_THRESHOLD=0.9
|
||||
PUBSUB_TOPIC=${PUBSUB_TOPIC}
|
||||
CONTENT_TOPIC=${CONTENT_TOPIC}
|
||||
EOF
|
||||
docker run --env-file ./perf-test.env -l sonda -d --network host local-perf-sonda
|
||||
cd ..
|
||||
|
||||
cd ./lpt
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
export START_PUBLISHING_AFTER=15
|
||||
export NUM_PUBLISHER_NODES=30
|
||||
export NUM_RECEIVER_NODES=10
|
||||
export MESSAGE_MIN_BYTES=4096
|
||||
export MESSAGE_MAX_BYTES=65536
|
||||
export LIGHTPUSH_INTERVAL_MS=40
|
||||
docker compose up -d
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Warm-up: 30 pub / 10 recv (40ms, 4–64KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
docker compose down
|
||||
cd ..
|
||||
|
||||
NOW_TS=$(date +%s)
|
||||
START_TS_2H=$(( NOW_TS - 7200 ))
|
||||
START_TS_1H=$(( NOW_TS - 3600 ))
|
||||
START_TS_30M=$(( NOW_TS - 1800 ))
|
||||
|
||||
echo "Backfill 2h window"
|
||||
curl -G "${STORE_NODE_REST_ADDRESS}/store/v3/messages" \
|
||||
--data-urlencode "peerAddr=${STORE_NODES}" \
|
||||
--data-urlencode "pubsubTopic=${PUBSUB_TOPIC}" \
|
||||
--data-urlencode "contentTopics=[\"${CONTENT_TOPIC}\"]" \
|
||||
--data-urlencode "includeData=true" \
|
||||
--data-urlencode "startTime=${START_TS_2H}"
|
||||
|
||||
echo "Backfill 1h window"
|
||||
curl -G "${STORE_NODE_REST_ADDRESS}/store/v3/messages" \
|
||||
--data-urlencode "peerAddr=${STORE_NODES}" \
|
||||
--data-urlencode "pubsubTopic=${PUBSUB_TOPIC}" \
|
||||
--data-urlencode "contentTopics=[\"${CONTENT_TOPIC}\"]" \
|
||||
--data-urlencode "includeData=true" \
|
||||
--data-urlencode "startTime=${START_TS_1H}"
|
||||
|
||||
echo "Backfill 30m window"
|
||||
curl -G "${STORE_NODE_REST_ADDRESS}/store/v3/messages" \
|
||||
--data-urlencode "peerAddr=${STORE_NODES}" \
|
||||
--data-urlencode "pubsubTopic=${PUBSUB_TOPIC}" \
|
||||
--data-urlencode "contentTopics=[\"${CONTENT_TOPIC}\"]" \
|
||||
--data-urlencode "includeData=true" \
|
||||
--data-urlencode "startTime=${START_TS_30M}"
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Scenario 5 finished at $current_time"
|
||||
143
scripts/Lite_protocol_scripts/store/stress1_high_concurrency.sh
Executable file
143
scripts/Lite_protocol_scripts/store/stress1_high_concurrency.sh
Executable file
@ -0,0 +1,143 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Store stress via high Sonda concurrency & query rate,
|
||||
# while stepping message sizes and LPT counts to fill history fast.
|
||||
|
||||
cd ./waku-simulator
|
||||
|
||||
export NWAKU_IMAGE=wakuorg/nwaku:latest
|
||||
export NUM_NWAKU_NODES=15
|
||||
export RLN_ENABLED=false
|
||||
|
||||
# Service node config
|
||||
export SERVICENODE_CPU_CORES="0-3"
|
||||
export SERVICENODE_MEM_LIMIT=2g
|
||||
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 config ---------------------------
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
export START_PUBLISHING_AFTER=15
|
||||
export NUM_MESSAGES=0
|
||||
export MESSAGE_INTERVAL_MILLIS=100
|
||||
|
||||
# Service peers
|
||||
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
|
||||
|
||||
# Topics
|
||||
export PUBSUB=/waku/2/rs/66/0
|
||||
export CONTENT_TOPIC=/tester/2/light-pubsub-test/wakusim
|
||||
export CLUSTER_ID=66
|
||||
|
||||
# sleep before traffic
|
||||
sleep 60
|
||||
|
||||
cd ../sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
|
||||
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
|
||||
|
||||
# Clean up
|
||||
docker rm -f sonda1 sonda2 sonda3 sonda4 sonda5 >/dev/null 2>&1 || true
|
||||
|
||||
# Start a baseline Sonda (0.5s)
|
||||
docker run -d --name sonda1 --network host -l sonda \
|
||||
--env-file ./perf-test.env local-perf-sonda
|
||||
|
||||
cd ../lpt
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 1: Moderate traffic
|
||||
# LPT 6/6, 50–90 KB; Sonda x1 time 0.5s
|
||||
# ============================================================================ #
|
||||
export NUM_PUBLISHER_NODES=6
|
||||
export NUM_RECEIVER_NODES=6
|
||||
export MIN_MESSAGE_SIZE=50Kb
|
||||
export MAX_MESSAGE_SIZE=90Kb
|
||||
|
||||
docker compose down -v >/dev/null 2>&1 || true
|
||||
docker compose up -d
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "[scenario_6_store_stress] Phase 1: LPT 6/6, 50–90KB; Sonda x1 @0.5s — $current_time"
|
||||
sleep 120
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 2: Same traffic but triple query rate
|
||||
# Keep LPT, add Sonda x2 more time 0.1s
|
||||
# ============================================================================ #
|
||||
docker run -d --name sonda2 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.1 local-perf-sonda
|
||||
docker run -d --name sonda3 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.1 local-perf-sonda
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "[scenario_6_store_stress] Phase 2: add Sonda x2 @0.1s (total 3) — $current_time"
|
||||
sleep 120
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 3: Heavier traffic + peak query rate
|
||||
# LPT 10/10, 130–149 KB; add Sonda x2 more time 0.05s
|
||||
# ============================================================================ #
|
||||
docker compose down -v
|
||||
export NUM_PUBLISHER_NODES=10
|
||||
export NUM_RECEIVER_NODES=10
|
||||
export MIN_MESSAGE_SIZE=130Kb
|
||||
export MAX_MESSAGE_SIZE=149Kb
|
||||
docker compose up -d
|
||||
|
||||
docker run -d --name sonda4 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.05 local-perf-sonda
|
||||
docker run -d --name sonda5 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.05 local-perf-sonda
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "[scenario_6_store_stress] Phase 3: LPT 10/10, 130–149KB; Sonda total x5 (0.5s + 0.1s + 0.05s) — $current_time"
|
||||
sleep 120
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 4: Store-only
|
||||
# Stop LPT; keep all Sonda x5 times
|
||||
# ============================================================================ #
|
||||
docker compose down -v
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "[scenario_6_store_stress] Phase 4: LPT down; Store-only flood via Sonda x5 — $current_time"
|
||||
sleep 120
|
||||
|
||||
# -------------------- Cleanup -------------------------------------------------
|
||||
docker rm -f sonda1 sonda2 sonda3 sonda4 sonda5 >/dev/null 2>&1 || true
|
||||
|
||||
cd ..
|
||||
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "[scenario_6_store_stress] Test finished at $current_time"
|
||||
|
||||
# finish
|
||||
# exec ./stop_test.sh
|
||||
208
scripts/Lite_protocol_scripts/store/stress_alternate_high_concurrency_scenario3
Executable file
208
scripts/Lite_protocol_scripts/store/stress_alternate_high_concurrency_scenario3
Executable file
@ -0,0 +1,208 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd ./waku-simulator
|
||||
|
||||
export NWAKU_IMAGE=wakuorg/nwaku:latest
|
||||
export NUM_NWAKU_NODES=15
|
||||
export RLN_ENABLED=false
|
||||
|
||||
# Service node config
|
||||
export SERVICENODE_CPU_CORES="0-3"
|
||||
export SERVICENODE_MEM_LIMIT=2g
|
||||
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 config ---------------------------
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
export START_PUBLISHING_AFTER=15
|
||||
export NUM_MESSAGES=0
|
||||
export MESSAGE_INTERVAL_MILLIS=100
|
||||
|
||||
# Service peers
|
||||
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
|
||||
|
||||
# Topics
|
||||
export PUBSUB=/waku/2/rs/66/0
|
||||
export CONTENT_TOPIC=/tester/2/light-pubsub-test/wakusim
|
||||
export CLUSTER_ID=66
|
||||
|
||||
# Allow services to settle
|
||||
sleep 60
|
||||
|
||||
cd ../sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
|
||||
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
|
||||
|
||||
# Clean old
|
||||
docker rm -f sonda1 sonda2 sonda3 sonda4 sonda5 sonda6 sonda7 sonda8 sonda9 sonda10 sonda11 sonda12 >/dev/null 2>&1 || true
|
||||
|
||||
# Baseline Sonda (0.5s)
|
||||
docker run -d --name sonda1 --network host -l sonda \
|
||||
--env-file ./perf-test.env local-perf-sonda
|
||||
|
||||
cd ../lpt
|
||||
|
||||
# Helper echo
|
||||
ts() { date '+%F %T'; }
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE A: Wave burst #1 (short & intense), then cooldown
|
||||
# Idea: quick history fill + heavy query spike
|
||||
# ============================================================================ #
|
||||
export NUM_PUBLISHER_NODES=8
|
||||
export NUM_RECEIVER_NODES=8
|
||||
export MIN_MESSAGE_SIZE=80Kb
|
||||
export MAX_MESSAGE_SIZE=120Kb
|
||||
|
||||
docker compose down -v >/dev/null 2>&1 || true
|
||||
docker compose up -d
|
||||
echo " Phase A1: LPT 8/8, 80–120KB; Sonda x1 @0.5s — $(ts)"
|
||||
|
||||
# Add two fast Sonda for burst @0.05s
|
||||
docker run -d --name sonda2 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.05 local-perf-sonda
|
||||
docker run -d --name sonda3 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.05 local-perf-sonda
|
||||
|
||||
sleep 90
|
||||
|
||||
# Cooldown: remove the two fast ones
|
||||
docker rm -f sonda2 sonda3 >/dev/null 2>&1 || true
|
||||
echo "Phase A2: cooldown to Sonda x1 @0.5s — $(ts)"
|
||||
sleep 60
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE B: Wave burst #2 (bigger messages, more pubs/recvs), then cooldown
|
||||
# ============================================================================ #
|
||||
export NUM_PUBLISHER_NODES=10
|
||||
export NUM_RECEIVER_NODES=10
|
||||
export MIN_MESSAGE_SIZE=120Kb
|
||||
export MAX_MESSAGE_SIZE=160Kb
|
||||
|
||||
docker compose down -v
|
||||
docker compose up -d
|
||||
echo " Phase B1: LPT 10/10, 120–160KB; Sonda x1 — $(ts)"
|
||||
|
||||
# Heavier spike: three Sonda @0.02s
|
||||
docker run -d --name sonda4 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.02 local-perf-sonda
|
||||
docker run -d --name sonda5 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.02 local-perf-sonda
|
||||
docker run -d --name sonda6 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.02 local-perf-sonda
|
||||
|
||||
sleep 120
|
||||
|
||||
# Cooldown again: keep only baseline
|
||||
docker rm -f sonda4 sonda5 sonda6 >/dev/null 2>&1 || true
|
||||
echo "[scenario_7_store_wave] Phase B2: cooldown to Sonda x1 @0.5s — $(ts)"
|
||||
sleep 60
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE C: Microburst trains (while LPT steady)
|
||||
# Start/stop pairs rapidly to create sawtooth Store pressure.
|
||||
# ============================================================================ #
|
||||
export NUM_PUBLISHER_NODES=10
|
||||
export NUM_RECEIVER_NODES=10
|
||||
export MIN_MESSAGE_SIZE=60Kb
|
||||
export MAX_MESSAGE_SIZE=100Kb
|
||||
|
||||
docker compose down -v
|
||||
docker compose up -d
|
||||
echo " Phase C: microburst trains begin — $(ts)"
|
||||
|
||||
# Train 1 (two @0.01s for 45s)
|
||||
docker run -d --name sonda7 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.01 local-perf-sonda
|
||||
docker run -d --name sonda8 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.01 local-perf-sonda
|
||||
sleep 45
|
||||
docker rm -f sonda7 sonda8 >/dev/null 2>&1 || true
|
||||
|
||||
# Train 2 (two @0.02s for 60s)
|
||||
docker run -d --name sonda9 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.02 local-perf-sonda
|
||||
docker run -d --name sonda10 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.02 local-perf-sonda
|
||||
sleep 60
|
||||
docker rm -f sonda9 sonda10 >/dev/null 2>&1 || true
|
||||
|
||||
# Train 3 (three @0.01s for 60s)
|
||||
docker run -d --name sonda11 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.01 local-perf-sonda
|
||||
docker run -d --name sonda12 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.01 local-perf-sonda
|
||||
docker run -d --name sonda3 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.01 local-perf-sonda
|
||||
sleep 60
|
||||
docker rm -f sonda11 sonda12 sonda3 >/dev/null 2>&1 || true
|
||||
|
||||
echo "[scenario_7_store_wave] Phase C: microburst trains done — $(ts)"
|
||||
sleep 30
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE D: Store-only oscillation (LPT down), cycling query delays
|
||||
# Observe Store under alternating light/heavy read pressure.
|
||||
# ============================================================================ #
|
||||
docker compose down -v
|
||||
echo "Phase D: Store-only oscillation — $(ts)"
|
||||
|
||||
# Round 1: fast pair @0.02s
|
||||
docker run -d --name sonda4 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.02 local-perf-sonda
|
||||
docker run -d --name sonda5 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.02 local-perf-sonda
|
||||
sleep 60
|
||||
docker rm -f sonda4 sonda5 >/dev/null 2>&1 || true
|
||||
|
||||
# Round 2: very fast pair @0.01s
|
||||
docker run -d --name sonda6 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.01 local-perf-sonda
|
||||
docker run -d --name sonda7 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.01 local-perf-sonda
|
||||
sleep 60
|
||||
docker rm -f sonda6 sonda7 >/dev/null 2>&1 || true
|
||||
|
||||
# Round 3: light @0.1s for recovery view
|
||||
docker run -d --name sonda8 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.1 local-perf-sonda
|
||||
sleep 60
|
||||
docker rm -f sonda8 >/dev/null 2>&1 || true
|
||||
|
||||
echo "Final observe window — $(ts)"
|
||||
sleep 60
|
||||
|
||||
# -------------------- Cleanup -------------------------------------------------
|
||||
docker rm -f sonda1 sonda2 sonda3 sonda4 sonda5 sonda6 sonda7 sonda8 sonda9 sonda10 sonda11 sonda12 >/dev/null 2>&1 || true
|
||||
|
||||
cd ..
|
||||
|
||||
echo "Test finished at $(ts)"
|
||||
# exec ./stop_test.sh
|
||||
183
scripts/Lite_protocol_scripts/store/stress_high_concurrency_scenario2.sh
Executable file
183
scripts/Lite_protocol_scripts/store/stress_high_concurrency_scenario2.sh
Executable file
@ -0,0 +1,183 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Heavier Store stress by stacking more concurrent Sonda readers
|
||||
# and ramping LPT publishers/receivers & message sizes.
|
||||
|
||||
cd ./waku-simulator
|
||||
|
||||
export NWAKU_IMAGE=wakuorg/nwaku:latest
|
||||
export NUM_NWAKU_NODES=15
|
||||
export RLN_ENABLED=false
|
||||
|
||||
# Service node config
|
||||
export SERVICENODE_CPU_CORES="0-3"
|
||||
export SERVICENODE_MEM_LIMIT=2g
|
||||
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 config ---------------------------
|
||||
export LPT_IMAGE=harbor.status.im/wakuorg/liteprotocoltester:latest
|
||||
export START_PUBLISHING_AFTER=15
|
||||
export NUM_MESSAGES=0
|
||||
export MESSAGE_INTERVAL_MILLIS=100
|
||||
|
||||
# Service peers
|
||||
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
|
||||
|
||||
# Topics
|
||||
export PUBSUB=/waku/2/rs/66/0
|
||||
export CONTENT_TOPIC=/tester/2/light-pubsub-test/wakusim
|
||||
export CLUSTER_ID=66
|
||||
|
||||
# settle before traffic
|
||||
sleep 60
|
||||
|
||||
cd ../sonda
|
||||
docker build -t local-perf-sonda -f ./Dockerfile.sonda .
|
||||
|
||||
# Keep perf-test.env location and content
|
||||
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
|
||||
|
||||
# Clean old sonda
|
||||
docker rm -f sonda1 sonda2 sonda3 sonda4 sonda5 sonda6 sonda7 sonda8 sonda9 sonda10 >/dev/null 2>&1 || true
|
||||
|
||||
# Baseline Sonda (0.5s)
|
||||
docker run -d --name sonda1 --network host -l sonda \
|
||||
--env-file ./perf-test.env local-perf-sonda
|
||||
|
||||
cd ../lpt
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 0: Warmup, small messages, quick history fill
|
||||
# LPT 8/8, 20–40 KB; Sonda x1 @0.5s
|
||||
# ============================================================================ #
|
||||
export NUM_PUBLISHER_NODES=8
|
||||
export NUM_RECEIVER_NODES=8
|
||||
export MIN_MESSAGE_SIZE=20Kb
|
||||
export MAX_MESSAGE_SIZE=40Kb
|
||||
|
||||
docker compose down -v >/dev/null 2>&1 || true
|
||||
docker compose up -d
|
||||
|
||||
echo "Phase 0: LPT 8/8, 20–40KB; Sonda x1 @0.5s — $(date '+%F %T')"
|
||||
sleep 30
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 1: Moderate traffic
|
||||
# LPT 6/6, 50–90 KB; Sonda x1 @0.5s
|
||||
# ============================================================================ #
|
||||
export NUM_PUBLISHER_NODES=6
|
||||
export NUM_RECEIVER_NODES=6
|
||||
export MIN_MESSAGE_SIZE=50Kb
|
||||
export MAX_MESSAGE_SIZE=90Kb
|
||||
|
||||
docker compose down -v >/dev/null 2>&1 || true
|
||||
docker compose up -d
|
||||
|
||||
echo "Phase 1: LPT 6/6, 50–90KB; Sonda x1 @0.5s — $(date '+%F %T')"
|
||||
sleep 30
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 2: Triple query rate
|
||||
# Keep LPT; add Sonda x2 @0.1s (total 3)
|
||||
# ============================================================================ #
|
||||
docker run -d --name sonda2 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.1 local-perf-sonda
|
||||
docker run -d --name sonda3 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.1 local-perf-sonda
|
||||
|
||||
echo "Phase 2: +Sonda x2 @0.1s (total 3) — $(date '+%F %T')"
|
||||
sleep 30
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 3: Heavier traffic + peak query rate
|
||||
# LPT 10/10, 130–149 KB; +Sonda x2 @0.05s (total 5)
|
||||
# ============================================================================ #
|
||||
docker compose down -v
|
||||
export NUM_PUBLISHER_NODES=10
|
||||
export NUM_RECEIVER_NODES=10
|
||||
export MIN_MESSAGE_SIZE=130Kb
|
||||
export MAX_MESSAGE_SIZE=149Kb
|
||||
docker compose up -d
|
||||
|
||||
docker run -d --name sonda4 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.05 local-perf-sonda
|
||||
docker run -d --name sonda5 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.05 local-perf-sonda
|
||||
|
||||
echo "Phase 3: LPT 10/10, 130–149KB; Sonda total x5 — $(date '+%F %T')"
|
||||
sleep 30
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 3.5: Max Store pressure spike (Store-heavy while LPT still running)
|
||||
# Add Sonda x3 @0.02s (total 8)
|
||||
# ============================================================================ #
|
||||
docker run -d --name sonda6 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.02 local-perf-sonda
|
||||
docker run -d --name sonda7 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.02 local-perf-sonda
|
||||
docker run -d --name sonda8 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.02 local-perf-sonda
|
||||
|
||||
echo "Phase 3.5: +Sonda x3 @0.02s (total 8) — $(date '+%F %T')"
|
||||
sleep 30
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 4: Store-only flood
|
||||
# Stop LPT; observe pure Store query saturation
|
||||
# ============================================================================ #
|
||||
docker compose down -v
|
||||
|
||||
echo "Phase 4: LPT down; Store-only with Sonda x8 — $(date '+%F %T')"
|
||||
sleep 30
|
||||
|
||||
# ============================================================================ #
|
||||
# PHASE 5: Final squeeze
|
||||
# Add Sonda x2 more @0.01s (total 10) for short burst
|
||||
# ============================================================================ #
|
||||
docker run -d --name sonda9 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.01 local-perf-sonda
|
||||
docker run -d --name sonda10 --network host -l sonda \
|
||||
--env-file ../sonda/perf-test.env -e QUERY_DELAY=0.01 local-perf-sonda
|
||||
|
||||
echo "Phase 5: +Sonda x2 @0.01s (total 10) — $(date '+%F %T')"
|
||||
sleep 30
|
||||
|
||||
# brief post-run observation
|
||||
echo "Final observe window — $(date '+%F %T')"
|
||||
sleep 30
|
||||
|
||||
# -------------------- Cleanup -------------------------------------------------
|
||||
docker rm -f sonda1 sonda2 sonda3 sonda4 sonda5 sonda6 sonda7 sonda8 sonda9 sonda10 >/dev/null 2>&1 || true
|
||||
|
||||
cd ..
|
||||
|
||||
echo "Test finished at $(date '+%F %T')"
|
||||
# exec ./stop_test.sh
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user