Files
mtusi2026lab5/evidence/worker/memory.md
T
ricoromaandClaude Opus 5.5 1373e7ddec docs: record exclusion evidence and move one-off probes into the driver
Adds worker-memory, freeze-sessions and freeze-lb driver commands, retakes
the evidence they produce, and fills the report header. src/ and bench/
are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:53:53 +03:00

66 lines
6.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Память контейнера worker
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 worker-memory` (два прогона подряд: разброс `memory.peak` важен для вывода)
- Дата: 2026-11-01, прогон 1 — 10:35:01–10:35:35 UTC, прогон 2 — 10:35:48–10:36:22 UTC; коды выхода 0
- Commit: `9639aa1` (ветка `feat/track1-queue-overload`), код `src/` и `bench/` тот же, что на `5ee3257`; на рабочем дереве изменён только `.claude/skills/run-mtusi-messenger/driver.py`: в нём и появилась эта команда
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`; worker 1 CPU / 1 ГБ без swap, конкуренция 2, `render_memory_limit_mib` 450
- Спеки: `attachment-processing` «Изображение в лимите пикселей», design change `pipeline-reliability`, решение 7, «Уточнения apply», п. 13 и 19
Что делает команда. Для каждого случая: `docker stop` worker, две одинаковые загрузки, `docker start` (новая cgroup: `memory.peak` с нуля), ожидание `ready` обоих, затем `/proc/1/status`, `memory.peak`, `memory.events` контейнера, `docker inspect`, журнал worker. Файлы — генераторы тестов `student-tests/images.py` в контейнере образа без сети. Worker и relay запускаются при любом исходе; при незавершённых заданиях на стенде — код 2, код 1 при расхождении таблицы проверок.
Столбцы: `render_peak_kib` записи «Attachment became ready» по двум заданиям; `overlap` — оба задания начаты раньше, чем первое стало `ready`; `VmHWM` и `VmRSS` — процесс 1 worker; `memory.peak` — вся cgroup контейнера с процессами обработки. Файлы «40 Mpx and ~10 MiB»: начало строк — шум, остальное — нули, поэтому обе границы контракта достигнуты разом.
## Прогон 1
```text
worker mtusi-lab5-worker-1: limit 1024 MiB, concurrency 2, render_memory_limit_mib 450
case | file MiB | render_peak MiB | render_ms | overlap | VmHWM | VmRSS | memory.peak | oom / oom_kill | OOMKilled | restarts
PNG noise 10 MiB, 1868 x 1868 | 9.99 | 84/84 | 1015/1006 | yes | 155 | 111 | 262 | 0 / 0 | false | 0
PNG RGBA 8 bit, 40 Mpx | 0.15 | 357/357 | 1064/1067 | yes | 111 | 111 | 795 | 0 / 0 | false | 0
PNG gray with alpha 8 bit, 40 Mpx | 0.07 | 357/357 | 797/800 | yes | 111 | 111 | 795 | 0 / 0 | false | 0
PNG RGB 8 bit with tRNS, 40 Mpx | 0.11 | 357/357 | 859/869 | yes | 111 | 111 | 795 | 0 / 0 | false | 0
PNG RGB 16 bit with tRNS, 40 Mpx | 0.22 | 357/357 | 1128/1139 | yes | 111 | 111 | 793 | 0 / 0 | false | 0
PNG palette with tRNS, 40 Mpx | 0.04 | 357/357 | 739/741 | yes | 111 | 111 | 796 | 0 / 0 | false | 0
PNG gray 16 bit, 40 Mpx | 0.07 | 404/404 | 634/645 | yes | 111 | 111 | 816 | 0 / 0 | false | 0
PNG RGBA 8 bit, 40 Mpx and ~10 MiB | 9.85 | 367/367 | 908/959 | yes | 159 | 112 | 832 | 0 / 0 | false | 0
PNG gray 16 bit, 40 Mpx and ~10 MiB | 9.79 | 414/414 | 684/743 | yes | 159 | 111 | 926 | 0 / 0 | false | 0
largest render_peak 414 MiB, largest memory.peak 926 MiB, sum of peaks 159 + 2 x 414 = 987 MiB
every generated file within the contract expected yes got yes
attachments ready expected 18 got 18
cases with both jobs at once expected 9 got 9
render_peak records expected 18 got 18
oom + oom_kill in all cases expected 0 got 0
OOMKilled in any case expected no got no
restarts in any case expected no got no
render_peak below 450 MiB expected yes got yes
memory.peak below 1024 MiB expected yes got yes
sum of peaks below 1024 MiB expected yes got yes
PASS: two files at once at the contract limits fit the worker container
worker and relay running at the end: yes
```
## Прогон 2
Таблица проверок та же, все совпали.
```text
PNG noise 10 MiB, 1868 x 1868 | 9.99 | 84/84 | 847/847 | yes | 158 | 111 | 262 | 0 / 0 | false | 0
PNG RGBA 8 bit, 40 Mpx | 0.15 | 357/357 | 867/873 | yes | 111 | 111 | 795 | 0 / 0 | false | 0
PNG gray with alpha 8 bit, 40 Mpx | 0.07 | 357/357 | 735/801 | yes | 111 | 111 | 792 | 0 / 0 | false | 0
PNG RGB 8 bit with tRNS, 40 Mpx | 0.11 | 357/357 | 907/950 | yes | 111 | 111 | 793 | 0 / 0 | false | 0
PNG RGB 16 bit with tRNS, 40 Mpx | 0.22 | 357/357 | 1037/1048 | yes | 112 | 111 | 794 | 0 / 0 | false | 0
PNG palette with tRNS, 40 Mpx | 0.04 | 357/357 | 727/728 | yes | 110 | 110 | 795 | 0 / 0 | false | 0
PNG gray 16 bit, 40 Mpx | 0.07 | 404/404 | 627/635 | yes | 111 | 111 | 833 | 0 / 0 | false | 0
PNG RGBA 8 bit, 40 Mpx and ~10 MiB | 9.85 | 367/367 | 890/933 | yes | 158 | 111 | 831 | 0 / 0 | false | 0
PNG gray 16 bit, 40 Mpx and ~10 MiB | 9.79 | 414/414 | 687/748 | yes | 155 | 111 | 705 | 0 / 0 | false | 0
largest render_peak 414 MiB, largest memory.peak 833 MiB, sum of peaks 158 + 2 x 414 = 986 MiB
```
## Итог
- все задания `ready`; ни одного `oom` и `oom_kill`, `OOMKilled` false, рестартов нет;
- самый дорогой файл в пределах контракта — серый 16 бит на обеих границах: `render_peak` 414 МиБ при лимите 450;
- `memory.peak` контейнера на нём — 926 МиБ в прогоне 1 и 705 МиБ в прогоне 2 при лимите 1024: пик зависит от того, насколько совпали по времени пики двух процессов обработки, поэтому одно значение его не описывает. Опора бюджета — не замер `memory.peak`, а верхняя оценка суммой пиков, которые на деле не совпадают по времени: 159 + 2 × 414 = 987 МиБ < 1 ГБ.
Сравнение с прежним снятием разовой пробой на `399da05` (2026-10-31): `render_peak` 84 / 357 / 404 / 366–367 / 414 МиБ и `VmHWM` до 159 МиБ — те же (±1 МиБ); `memory.peak` самого дорогого случая был 905 МиБ, теперь 705–926 МиБ, у серого 16 бит на 40 Мпкс 888 против 816–833 МиБ. Числа `REPORT.md` обновлены по этому файлу.