T1: one-shot switch przy timeoutcie mid-embed (ścieżka asyncio.wait_for, dotąd nieprzetestowana — scenariusz 'SOLARIA wisi'). T2: breaker zostaje 'down' po mid-embed failure — kolejne requesty w oknie TTL idą prosto na fallback bez probe'a. T3: noga fallbacku nie dziedziczy twardego timeoutu primary. T4 pominięty (semantyka granicy TTL identyczna, wg raportu). Pytest kb-query: 42/42 PASS. S4: pomiar kalibracji 2026-07-27 (peak ~983 MiB, GO) dopisany do override'u i sekcji Calibration w README — master mówił dotąd 'Confirm/trim after live calibration'; konfiguracja kontenera identyczna z mierzoną, pomiar się przenosi. Raport dedup: status zaktualizowany na 'salvage wykonany'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22 lines
1.3 KiB
YAML
22 lines
1.3 KiB
YAML
# PIHA-specific overrides for ollama-piha (KB module 5, phase 4 — embed fallback).
|
||
#
|
||
# RESOURCE CONTEXT: PIHA is the RAM-bound 8 GB box shared with Home Assistant.
|
||
# bge-m3 is ~1.2 GB on disk, estimated 1.5–2 GB resident during an embed burst
|
||
# (plan §2 decision 2). OLLAMA_KEEP_ALIVE=0 (base compose) makes that a short
|
||
# per-call spike, not a resident cost — but the spike lands exactly when other
|
||
# SOLARIA-fallback consumers (e.g. paperless fallback OCR) may also be awake,
|
||
# so it gets a hard ceiling.
|
||
services:
|
||
ollama-piha:
|
||
# Plan §2 D2 starting value — the cgroup OOM killer restarts this container
|
||
# on breach instead of the host OOM killer picking a victim (which could be
|
||
# Home Assistant). Confirmed by live calibration 2026-07-27 (plan §5 step 4,
|
||
# docs/sessions/2026-07-27-kb-f4-fallback.md §4): peak ~983 MiB during an
|
||
# embed burst at a normal-load hour, ~66 MiB idle — comfortably inside this
|
||
# ceiling, verdict GO. Same container config as measured (image,
|
||
# OLLAMA_KEEP_ALIVE=0, this limit), so the number carries over.
|
||
mem_limit: 2560m
|
||
# Deliberately no mem_reservation: the working set is a transient spike and
|
||
# the idle daemon is ~100 MB — soft-reserving gigabytes would permanently
|
||
# take them from HA for a backend that mostly sleeps.
|