Report track 1 with plots and the checks after the improvement

make plots draws throughput and latency against offered load for both
series and the comparison, CPU per component, peak RPS against API
CPU with the USL fit and the improved 8x1 point, and the utilisation of
every link at each peak; capacity.md tabulates the ceilings.

after-checks.txt holds the level 3 and 4 checks on the new image:
student tests 240 passed, smoke PASS, 20 same-key races of 8 through
the balancer with 160 x 201 and one copy each, failover with 131
writes and no failure in 2.73 s, persistence PASS.

REPORT.md gains the track section: hypotheses as stated before the
runs, the method and its equal-resource rules, both series in tables,
the saturation point with database, balancer and pool figures, the
USL reading, the before and after table, conclusions per hypothesis
and the limits of a shared single host. The idempotent send section
now describes the one-statement write, the evidence table has the
track rows and the commands are in the clean clone section.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
This commit is contained in:
Artyom
2026-10-29 01:42:08 +03:00
co-authored by Claude Opus 5.5
parent dde113b4ed
commit 3e63b16ca6
16 changed files with 262 additions and 20 deletions
+2 -2
View File
@@ -3,11 +3,11 @@
| Файл | Что внутри | Чем получен |
| --- | --- | --- |
| `host.txt` | `docker stats --all` всего хоста, контейнеры, версии Docker и образов перед серией A | `make track1-host` |
| `host-others.csv` | раз в 10 с весь период замеров: суммарный CPU чужих контейнеров (стенды других лаб) и самый загруженный из них | цикл `docker stats` (команда в `REPORT.md`) |
| `host-others.csv` | раз в 10 с весь период замеров: суммарный CPU чужих контейнеров (стенды других лаб) и самый загруженный из них | цикл `docker stats --no-stream` по контейнерам не из проекта `mtusi2026lab3`, запущенный рядом с сериями |
| `aborted/series-a-1-summary.csv` | первая попытка серии A, прерванная из-за сборки образа соседней лабы: шаги с API 410 % при 1 350 rps и паузами Docker API по 15 мин | `make track1-a` до добавления отбраковки |
| `series-a/summary.csv` | серия A: 1×4, 2×2, 4×1 при 4 CPU / 2 GiB API, строка на прогон | `make track1-a` |
| `series-b/summary.csv` | серия B: 1×1, 2×1, 8×1 по 1 CPU / 512 MiB (4×1 — из серии A) | `make track1-b` |
| `compare/summary.csv` | улучшение: «до» и «после» на 8×1, чередование по повторам | `make track1-compare` |
| `compare/summary.csv` | улучшение: «до» (образ `edc091d`) и «после» на 8×1, чередование по повторам; третий повтор «после» снят отдельно после сбоя `compose up` при работе соседних тестов | `make track1-compare`, затем `python3 scripts/scaling.py --out evidence/track1/compare --configs 8x1 --api-memory 512 --rates 3600,5400,8100 --variant after --repeats 1 --first-repeat 3` |
| `*/disturbed.csv` | отбракованные прогоны (чужой CPU в VM > 1 ядра, разрыв сэмплов > 10 с или k6 дольше нагрузки на 90 с); каждый повторён после 15 с тишины | `scripts/scaling.py` |
| `<серия>/<вариант>-<RxC>_rate<N>_rep<K>/` | сырьё прогона: `k6/summary.json` (итог k6 без токенов), `k6/k6.txt`, `docker_stats.csv`, `vm_stat.csv` (счётчики `/proc/stat` всей VM), `lb_stats.csv` (HAProxy CSV), `pg_activity.csv` (`pg_stat_activity` по state/wait_event), `pg_statements.csv` (топ-20 `pg_stat_statements` за прогон) | `scripts/scaling.py` |
| `plots/*.png`, `plots/capacity.csv`, `plots/capacity.md` | графики и сводка потолков | `make plots` |
+29
View File
@@ -0,0 +1,29 @@
date: 2026-10-28T22:38:18Z commit: dde113b image: sha256:946c868dc7f4
$ make test BASE_URL=http://localhost:18083
python3 tests/smoke.py --base-url "http://localhost:18083"
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
$ python3 scripts/probe.py check --rounds 20 # 40 GET одним токеном + 20 раундов по 8 POST с одним ключом
{"instances_one_token": {"d078349e7c33": 20, "1de09c7a8c9d": 20}, "same_key": {"rounds": 20, "parallel": 8, "statuses": {"201": 160}, "instances": {"d078349e7c33": 80, "1de09c7a8c9d": 80}, "identical_bodies_rounds": 20, "single_copy_rounds": 20, "conflict_rounds": 20}, "pass": true}
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh BASE_URL=http://localhost:18083
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 131, "failed_attempts": 0, "first_recovery_seconds": 2.728}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
$ docker ps -a --filter label=com.docker.compose.service=api
mtusi2026lab3-api-6 Exited (0) 12 seconds ago
mtusi2026lab3-api-1 Up About a minute (healthy)
$ make restore
Container mtusi2026lab3-api-1 Healthy
mtusi2026lab3-api-1 Up About a minute (healthy)
mtusi2026lab3-api-6 Up 2 seconds (healthy)
$ make test-persistence ACTION_SCRIPT=scripts/restart.sh BASE_URL=http://localhost:18083
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
$ make student-test
240 passed, 10 deselected in 19.71s
+22
View File
@@ -780,3 +780,25 @@ ts,others_cpu_pct,busiest
1793227017,0.0,
1793227030,0.0,
1793227042,0.0,
1793227055,0.0,
1793227067,0.0,
1793227080,0.0,
1793227093,0.0,
1793227105,0.0,
1793227118,0.0,
1793227131,0.0,
1793227144,0.0,
1793227157,0.0,
1793227169,0.0,
1793227182,0.0,
1793227195,0.0,
1793227207,0.0,
1793227220,0.8,mtusi-lab3-test-13cde6f0
1793227232,0.0,
1793227245,0.0,
1793227258,0.0,
1793227270,0.0,
1793227283,0.0,
1793227296,0.0,
1793227309,0.0,
1793227321,0.0,
1 ts others_cpu_pct busiest
780 1793227017 0.0
781 1793227030 0.0
782 1793227042 0.0
783 1793227055 0.0
784 1793227067 0.0
785 1793227080 0.0
786 1793227093 0.0
787 1793227105 0.0
788 1793227118 0.0
789 1793227131 0.0
790 1793227144 0.0
791 1793227157 0.0
792 1793227169 0.0
793 1793227182 0.0
794 1793227195 0.0
795 1793227207 0.0
796 1793227220 0.8 mtusi-lab3-test-13cde6f0
797 1793227232 0.0
798 1793227245 0.0
799 1793227258 0.0
800 1793227270 0.0
801 1793227283 0.0
802 1793227296 0.0
803 1793227309 0.0
804 1793227321 0.0
+9
View File
@@ -0,0 +1,9 @@
series,variant,config,rates,capacity_rate,capacity_ok_rps,capacity_p95_ms,capacity_p99_ms,peak_rate,peak_ok_rps,peak_ok_min,peak_ok_max,peak_p95_ms,peak_failed_ratio,peak_dropped,cpu_api,cpu_api_limit,cpu_postgres,cpu_lb,cpu_k6,pg_active_avg,pg_lock_avg,pg_idle_tx_avg,pg_idle_avg,pool_total,pg_backends_max,lb_qcur_max
compare,before,8x1,3600 5400 8100,3600,3595.5,64.47,121.74,5400,4251.9,4053.57,4395.83,295.93,0.0,34444.0,474.76,800,177.86,40.67,75.16,49.96,46.65,7.04,6.73,64,64.0,744.0
compare,after,8x1,3600 5400 8100,3600,3600.07,3.7,12.62,5400,4894.23,4494.23,5103.67,246.02,0.0,15174.0,478.56,800,178.68,45.91,75.67,57.23,46.38,0.0,6.77,64,64.0,743.0
series-a,base,4x1,600 900 1350 2020 3040 4560 6830,4560,4525.23,150.28,195.8,6830,4723.67,4685.7,4794.17,254.94,0.0,63186.0,380.86,400,163.82,39.5,71.24,18.12,15.35,6.81,6.27,32,32.0,872.0
series-a,base,2x2,600 900 1350 2020 3040 4560 6830,4560,4553.57,68.8,115.62,6830,4964.13,4893.8,5103.7,253.24,0.0,55978.0,378.58,400,173.09,41.25,76.1,19.27,16.0,6.93,6.38,32,32.0,872.0
series-a,base,1x4,600 900 1350 2020 3040 4560 6830,4560,4559.87,9.32,38.81,6830,5375.13,5332.13,5383.9,225.42,0.0,43645.0,377.52,400,177.68,41.5,76.07,19.46,15.74,6.19,6.48,32,32.0,871.0
series-b,base,1x1,450 680 1010 1520 2280 3420,1520,1516.93,93.16,128.96,3420,1719.57,1674.03,1722.2,706.11,0.0,51015.0,101.57,100,47.27,12.91,27.32,1.04,0.23,3.37,3.7,8,8.0,968.0
series-b,base,2x1,900 1350 2020 3040 4560,2020,2019.87,46.61,83.49,4560,2935.7,2867.83,2998.07,424.71,0.0,48731.0,200.56,200,93.62,23.41,45.1,4.42,2.35,6.3,5.81,16,16.0,936.0
series-b,base,8x1,3600 5400 8100,3600,3600.03,38.93,99.29,5400,4260.13,4216.63,4423.8,292.0,0.0,34197.0,473.48,800,177.62,39.65,71.33,51.5,47.46,6.81,6.0,64,64.0,744.0
1 series variant config rates capacity_rate capacity_ok_rps capacity_p95_ms capacity_p99_ms peak_rate peak_ok_rps peak_ok_min peak_ok_max peak_p95_ms peak_failed_ratio peak_dropped cpu_api cpu_api_limit cpu_postgres cpu_lb cpu_k6 pg_active_avg pg_lock_avg pg_idle_tx_avg pg_idle_avg pool_total pg_backends_max lb_qcur_max
2 compare before 8x1 3600 5400 8100 3600 3595.5 64.47 121.74 5400 4251.9 4053.57 4395.83 295.93 0.0 34444.0 474.76 800 177.86 40.67 75.16 49.96 46.65 7.04 6.73 64 64.0 744.0
3 compare after 8x1 3600 5400 8100 3600 3600.07 3.7 12.62 5400 4894.23 4494.23 5103.67 246.02 0.0 15174.0 478.56 800 178.68 45.91 75.67 57.23 46.38 0.0 6.77 64 64.0 743.0
4 series-a base 4x1 600 900 1350 2020 3040 4560 6830 4560 4525.23 150.28 195.8 6830 4723.67 4685.7 4794.17 254.94 0.0 63186.0 380.86 400 163.82 39.5 71.24 18.12 15.35 6.81 6.27 32 32.0 872.0
5 series-a base 2x2 600 900 1350 2020 3040 4560 6830 4560 4553.57 68.8 115.62 6830 4964.13 4893.8 5103.7 253.24 0.0 55978.0 378.58 400 173.09 41.25 76.1 19.27 16.0 6.93 6.38 32 32.0 872.0
6 series-a base 1x4 600 900 1350 2020 3040 4560 6830 4560 4559.87 9.32 38.81 6830 5375.13 5332.13 5383.9 225.42 0.0 43645.0 377.52 400 177.68 41.5 76.07 19.46 15.74 6.19 6.48 32 32.0 871.0
7 series-b base 1x1 450 680 1010 1520 2280 3420 1520 1516.93 93.16 128.96 3420 1719.57 1674.03 1722.2 706.11 0.0 51015.0 101.57 100 47.27 12.91 27.32 1.04 0.23 3.37 3.7 8 8.0 968.0
8 series-b base 2x1 900 1350 2020 3040 4560 2020 2019.87 46.61 83.49 4560 2935.7 2867.83 2998.07 424.71 0.0 48731.0 200.56 200 93.62 23.41 45.1 4.42 2.35 6.3 5.81 16 16.0 936.0
9 series-b base 8x1 3600 5400 8100 3600 3600.03 38.93 99.29 5400 4260.13 4216.63 4423.8 292.0 0.0 34197.0 473.48 800 177.62 39.65 71.33 51.5 47.46 6.81 6.0 64 64.0 744.0
+12
View File
@@ -0,0 +1,12 @@
| серия | вариант | конфигурация | потолок по SLO, rps | p95 там, мс | пик успешных RPS [min–max] | при нагрузке | CPU API / лимит | CPU PG | CPU LB | ждут блокировку / пул |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| compare | before | 8x1 | 3600 | 64.47 | 4252 [4054–4396] | 5400 | 475 / 800 | 178 | 41 | 46.6 / 64 |
| compare | after | 8x1 | 3600 | 3.7 | 4894 [4494–5104] | 5400 | 479 / 800 | 179 | 46 | 46.4 / 64 |
| series-a | base | 4x1 | 4560 | 150.28 | 4724 [4686–4794] | 6830 | 381 / 400 | 164 | 40 | 15.3 / 32 |
| series-a | base | 2x2 | 4560 | 68.8 | 4964 [4894–5104] | 6830 | 379 / 400 | 173 | 41 | 16.0 / 32 |
| series-a | base | 1x4 | 4560 | 9.32 | 5375 [5332–5384] | 6830 | 378 / 400 | 178 | 42 | 15.7 / 32 |
| series-b | base | 1x1 | 1520 | 93.16 | 1720 [1674–1722] | 3420 | 102 / 100 | 47 | 13 | 0.2 / 8 |
| series-b | base | 2x1 | 2020 | 46.61 | 2936 [2868–2998] | 4560 | 201 / 200 | 94 | 23 | 2.4 / 16 |
| series-b | base | 8x1 | 3600 | 38.93 | 4260 [4217–4424] | 5400 | 473 / 800 | 178 | 40 | 47.5 / 64 |
USL по серии B: σ = 0.0137, κ = 0.03798, пик при N* = 5.1 CPU
Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB