mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-01-02 05:53:13 +00:00
Adding store scripts (#135)
* Adding store scripts * Fix old scripts & add new store stress scripts * Add filter stress scenarios & store * Adding last set of tests --------- Co-authored-by: fbarbu15 <florin@status.im>
This commit is contained in:
parent
966830acc2
commit
d764dd392b
79
scripts/Lite_protocol_scripts/filter/filter_scenario1.sh
Normal file
79
scripts/Lite_protocol_scripts/filter/filter_scenario1.sh
Normal file
@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
# Stress Filter with high receiver (subscribe/unsubscribe) while publishing continuously.
|
||||
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=120
|
||||
|
||||
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.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=12
|
||||
export NUM_RECEIVER_NODES=30
|
||||
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 1: up recv, 12 pub / 30 recv (80ms, 2–32KB) $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down receivernode
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 2: down recv, publishers + sonda $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose up -d receivernode
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 3: up recv again $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down receivernode
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 4: down recv again $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose up -d receivernode
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Phase 5: up recv final $current_time"
|
||||
sleep ${PHASE_SLEEP}
|
||||
|
||||
docker compose down
|
||||
cd ..
|
||||
current_time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Scenario 3 finished at $current_time"
|
||||
87
scripts/Lite_protocol_scripts/store/Store_multinodes.sh
Normal file
87
scripts/Lite_protocol_scripts/store/Store_multinodes.sh
Normal file
@ -0,0 +1,87 @@
|
||||
#!/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"
|
||||
111
scripts/Lite_protocol_scripts/store/store_15nodes_scenario1.sh
Normal file
111
scripts/Lite_protocol_scripts/store/store_15nodes_scenario1.sh
Normal file
@ -0,0 +1,111 @@
|
||||
#!/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"
|
||||
@ -0,0 +1,59 @@
|
||||
#!/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 ..
|
||||
@ -0,0 +1,182 @@
|
||||
#!/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 ..
|
||||
@ -0,0 +1,82 @@
|
||||
#!/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_multi-topic.sh
Normal file
92
scripts/Lite_protocol_scripts/store/store_multi-topic.sh
Normal file
@ -0,0 +1,92 @@
|
||||
#!/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"
|
||||
130
scripts/Lite_protocol_scripts/store/store_scenario1.sh
Executable file
130
scripts/Lite_protocol_scripts/store/store_scenario1.sh
Executable file
@ -0,0 +1,130 @@
|
||||
#!/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"
|
||||
96
scripts/Lite_protocol_scripts/store/store_stress1.sh
Normal file
96
scripts/Lite_protocol_scripts/store/store_stress1.sh
Normal file
@ -0,0 +1,96 @@
|
||||
#!/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"
|
||||
97
scripts/Lite_protocol_scripts/store/store_stress2.sh
Normal file
97
scripts/Lite_protocol_scripts/store/store_stress2.sh
Normal file
@ -0,0 +1,97 @@
|
||||
#!/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"
|
||||
57
scripts/Lite_protocol_scripts/store/store_stress3.sh
Normal file
57
scripts/Lite_protocol_scripts/store/store_stress3.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#!/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"
|
||||
@ -0,0 +1,88 @@
|
||||
#!/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"
|
||||
Loading…
x
Reference in New Issue
Block a user