Files
mtusi2026lab3/evidence/tests/bench-self-checks.md
T
ricoromaandClaude Opus 5.5 cb14586a19 docs: retake replicas-lb evidence from a4ca9ef after verify
The stand was recreated from a4ca9ef (make down, make run_docker) and
all evidence of the change was taken again on it: stand, distribution,
LB errors, test-persistence, test-failover for each replica (stop and
kill), stop-one refusals, make test and student_test through the LB,
test_isolated, failure_checks and bench self-checks.

New evidence closes scenarios verify found without proof: a real git
clone on non-default ports, a hung replica (docker pause: DOWN after
7.7 s, in-flight request 504), PostgreSQL outage behind the LB, replica
tests failing against one process, aborted responses via
driver.py kill-inflight. REPORT.md gets the corrected detection
formula, the measured cost of the 1 CPU limit for Argon2id and the new
rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 22:09:15 +03:00

4.3 KiB
Raw Blame History

Самопроверки стенда bench/ на compose с балансировщиком

Спеки load-benchmark «Запуск одной командой», «Фиксированный стенд» — «Лимиты в паспорте» (стенд остаётся одним API без LB до change graceful-failover)
Change replicas-lb, задачи 4.2, 6.1 и 7.2 (прогон apply на 4e0cc4e — в истории git этого файла)
Дата 2026-10-10 15:53:58–15:59:38 UTC
Commit a4ca9ef, dirty: false в паспортах обеих меток
Стенд проект compose mtusi-bench: docker-compose.yml + bench/bench.compose.yml; api — одна реплика (deploy.replicas: 1, container_name: mtusi-bench-api), haproxy не запускается; лимиты в форме deploy.resources.limits
Хост Docker Desktop 29.8.1, macOS arm64; ВМ Docker: 12 CPU, 7,7 GiB RAM; host_warnings паспорта: «host on battery power», «swap used 2582 MiB > 1024 MiB» — самопроверка, не замер

Основной compose задаёт лимиты в deploy.resources.limits, а cpus / mem_limit рядом с ними compose не принимает (can't set distinct values on 'mem_limit' and 'deploy.resources.limits.memory'). Override стенда переведён на ту же форму, те же переменные BENCH_*, и держит одну реплику api (container_name с replicas > 1 compose тоже не принимает). Каталоги quick-* в git не идут (bench.md).

make bench_quick

$ make bench_quick                                      # exit 0, 3 мин 27 с
[00:00:00] WARNING: host on battery power: CPU may be throttled
[00:00:00] WARNING: swap used 2582 MiB > 1024 MiB: reboot before a full run
[00:00:00] image mtusi-messenger:bench built (sha256:5b01fe54cc99…), compose project mtusi-bench
[00:00:11] size 1k: 62 background chats, 4500 messages to prefill
...
[00:03:26] complete: 18/18 runs, results in evidence/bench/quick-20261010T155358Z

18 из 18 прогонов, во всех err 0.

make bench_restore_quick

$ make bench_restore_quick                              # exit 0, 2 мин 9 с
[00:00:29] size 1k: backup 0.6 MiB in 0.11s during 1000 writes (0 failed)
[00:00:35] size 1k: restored 4590 of 5501 messages (911 lost after the snapshot), restore 0.07s, ANALYZE 0.10s, API 2.10s, RTO 3.22s; stale chat GET 200 POST 500, after FLUSHALL 404
[00:01:10] size 5k: backup 1.1 MiB in 0.14s during 1000 writes (0 failed)
[00:01:16] size 5k: restored 8586 of 9501 messages (915 lost after the snapshot), restore 0.12s, ANALYZE 0.13s, API 2.18s, RTO 3.38s; stale chat GET 200 POST 500, after FLUSHALL 404
[00:02:00] size 10k: backup 1.7 MiB in 0.18s during 1000 writes (0 failed)
[00:02:07] size 10k: restored 13578 of 14501 messages (923 lost after the snapshot), restore 0.12s, ANALYZE 0.12s, API 2.21s, RTO 3.38s; stale chat GET 200 POST 500, after FLUSHALL 404
[00:02:08] complete: 0/0 runs, results in evidence/bench/quick-restore-20261010T155730Z

«Потерянные после снимка» сообщения и POST 500 на устаревший чат — наблюдения методики трека 2 лабы 2, как в bench-restore-quick.md, а не ошибки стенда.

Лимиты в паспорте до и после

meta.json → limits (из docker inspect запущенных контейнеров):

Метка Commit api postgres valkey
quick-20261008T140114Z (до change, cpus / mem_limit) 0ab3a34, dirty 1 CPU, 2048 / 2048 MiB 4 CPU, 3072 / 3072 MiB 2 CPU, 512 / 512 MiB
quick-20261010T155358Z a4ca9ef 1 CPU, 2048 / 2048 MiB 4 CPU, 3072 / 3072 MiB 2 CPU, 512 / 512 MiB
quick-restore-20261010T155730Z a4ca9ef 1 CPU, 2048 / 2048 MiB 4 CPU, 3072 / 3072 MiB 2 CPU, 512 / 512 MiB

(CPU — NanoCpus / 1e9, память — Memory / MemorySwap.) Лимиты контейнеров те же, что до смены формы записи: метки bench до и после change сравнимы по этому полю паспорта.