Доработать инструменты экспериментов: чередовать повторы, останавливать лестницу на первой проваленной ступени, задавать maxconn и CPU базы в сериях, записывать замер скорости хоста и контроль шума, сократить комментарии

This commit is contained in:
2026-11-04 12:39:04 +03:00
parent ce47c138e4
commit baa5995938
24 changed files with 253 additions and 240 deletions
+6 -16
View File
@@ -1,21 +1,12 @@
#!/bin/sh
# Level 4: a rolling update under a constant write load. The generator sends
# messages at RATE for DURATION, retrying uncertain sends with the same key;
# at UPDATE_AT seconds `scripts/rollout.sh` replaces every replica. Afterwards
# the generator reads the history back: every confirmed message once.
# Level 4: scripts/rollout.sh replaces every replica at UPDATE_AT under a
# constant write load that retries uncertain sends with the same key; then
# every confirmed message must be in the history once.
#
# sh scripts/bench/rollout-under-load.sh
#
# Environment: RATE (50), DURATION (60s), UPDATE_AT (15), OUT (default
# evidence/rollout). Results in <OUT>/: timeline.json, seconds.csv,
# rollout.log, update.json (when it ran, which containers it replaced),
# compose.log, instances-*.txt.
#
# Times for the analysis come from the Docker VM's clock, as the generator's
# do: log timestamps and the start times of the new containers. The host
# clock of Windows runs apart from it and is kept for reference only. The
# old replicas are removed by the update; their stop shows in compose.log as
# their "shutdown started" lines.
# Environment: RATE (50), DURATION (60s), UPDATE_AT (15), OUT (evidence/rollout).
# Times come from the Docker VM clock, as in failover.sh.
set -eu
cd "$(dirname "$0")/../.."
. scripts/bench/lib.sh
@@ -29,8 +20,7 @@ export MSYS_NO_PATHCONV=1
rm -rf "$dir"
mkdir -p "$dir"
docker compose up -d --wait >/dev/null 2>&1
# Build first, as a delivery pipeline would: the update under load then
# measures the replacement of the replicas, not the compiler.
# Built beforehand, as by a delivery pipeline: the update replaces replicas.
docker compose build api >/dev/null 2>&1
meta "$dir/meta.json" "experiment=rolling-update" "rate=$rate" "duration=$duration" "update_at_s=$update_at"
sh scripts/instances.sh >"$dir/instances-before.txt"