feat(app): log the graphics card's free memory after the LLM starts and while each answer is written

The app logs how much of the card is free once the model answers, and the
voice worker reads the card once a second while an answer or a scheduled task
is written and logs the least free memory seen (no text, llm tab), so a slow
answer can be matched to a full card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-17 15:40:20 +09:00
parent ce03424ba4
commit f1600f09c2
6 changed files with 129 additions and 7 deletions

View File

@@ -531,3 +531,10 @@ cancel, and engine failures. The category names the service, so the app's log sc
in its tab (`app/src/admin.spec.md`, "Logs"): `stt` (utterance ends, STT batches, the Whisper model),
`tts` (sentences, cancels, MeloTTS), `llm` (the brain's replies, prepares and judgements),
`voice_worker` for the rest (connections, sessions, channels).
Without debug logging too, each answer and each scheduled task logs one `llm` line once the LLM is
done with it: the least free graphics memory read while it was written, the card's total, how many
readings and how long it took (`answer <id> card: least N MiB free of T MiB (k readings, ms)`). The
card is read with `nvidia-smi` once a second while the answer is written, in a thread, so the answer
never waits for it; without `nvidia-smi` nothing is read or logged. The line carries no text, so a
slow answer can be matched to a full card (the engine log has the same answer's timings).