8x1 with the image of edc091d (before) and the one-statement write
(after), alternating per repeat, three repeats at 3 600, 5 400 and
8 100 rps. At 3 600 rps, below the knee, p95 falls from 64.5 ms
(35.7..142.5) to 3.7 ms (2.8..5.4) and p99 from 122 to 13 ms; the API
spends 391 instead of 457 % CPU and PostgreSQL 102 instead of 137 %;
connections waiting for a chat lock drop from 12.8 to 0.15 and none is
idle in transaction any more. Past the knee the peak rises from 4 252
(4 054..4 396) to 4 894 rps (4 494..5 104), +15 %, and at 8 100 rps
from 4 104 to 4 841 (+18 %); the ranges do not overlap. Saturated, the
lock holders now wait for the WAL flush (LWLock WALWrite) instead of
the application.
The switch to the after image for the third repeat failed in compose
while another lab was running tests on the shared VM, so that repeat
was run alone with --first-repeat 3 on the same database; apply now
retries compose up twice and prints its stderr. Two after rows were
still marked disturbed after three reruns and are kept; they are the
lower ones.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2.4 KiB
2.4 KiB
1. Стенд под измерения
- 1.1
compose.yaml: закрепление CPU каждого сервиса через*_CPUSET(пусто по умолчанию),.env.example - 1.2 Проверка группы:
docker compose --profile bench config --quiet,make limitsпо-прежнемуPASS
2. Сэмплеры и оркестратор
- 2.1
scripts/docker-stats.sh,scripts/lb-stats.sh,scripts/pg-stats.sh(activity, statements, reset, размер базы) - 2.2
scripts/scaling.py: конфигурацияRxCс воркерами, пулом, очередью LB на реплику и закреплением CPU; ожидание ровно R реплик в LB; поиск колена с повторами; варианты «до/после» с чередованием;summary.csvи сырьё шага - 2.3
tools/plot_track1.pyиmake plots; целиmake track1-a,track1-b,track1-compare,track1 - 2.4 Проверка группы:
make lint,make check, пробный шагscaling.pyна одной интенсивности
3. Серии
- 3.1 Снимок
docker statsвсего хоста, версии и лимиты →evidence/track1/ - 3.2 Серия A: 1×4, 2×2, 4×1 при 4 CPU / 2 GiB, ≥3 повтора
- 3.3 Серия B: 1×1, 2×1, 8×1 (4×1 — из серии A), ≥3 повтора
- 3.4 Проверка группы: насыщенное звено названо по метрикам
summary.csvи топуpg_stat_statements
4. Улучшение
- 4.1 Выбор улучшения по узкому месту серии B, запись в
design.md: запись сообщения одним оператором SQL - 4.2 Реализация улучшения
- 4.3
make track1-compare: до и после на той же конфигурации и интенсивностях, ≥3 повтора - 4.4 Проверка группы:
make lint,make student-test,make test
5. Отчёт
- 5.1
make plots,evidence/track1/README.mdс картой файлов - 5.2
REPORT.md: раздел трека 1 — гипотезы, методика, таблицы серий, насыщение, улучшение, ограничения, выводы - 5.3 Проверка группы:
make check,make lint,make student-test,make test