Verba/Rapida

Esperimenti #173kc

The end-of-turn `mlx_clear_cache` the socket waits on (row 173ks: 3.0 ms a request): finishSlot clears...

done

Il testo degli esperimenti resta in inglese, come l'ha scritto il laboratorio.

Cosa è stato provato

The end-of-turn `mlx_clear_cache` the socket waits on (row 173ks: 3.0 ms a request): finishSlot clears MLX's buffer pool after the terminator (`src/scheduler.zig:4725`) and `complete()` (`src/server.zig:7639`) waits for that pass before the socket closes. Step 1: its time against the pool's size per request; the fix moves the clear off the socket's wait or skips it while the pool is small (issue #110's footprint ratchet must stay fixed), then its own pair

Modello e configurazione

the scheduler

Guadagno atteso

up to 3.0 ms a request, about 0.22% of the replay's window (inferred)

Da dove viene l'idea

row 173ks

Esito

done 2026-11-20 20:07 (engine-rows): the clear costs 3.0 and 3.4 ms a request on both sets, 1.3 to 1.7 ms a GiB of pool; small pools under 1 ms, so only the move; fix row 173kd (`2026-11-20-mac-r173kt-trim-copy/README.md` § Result, rows 173kt and 173kc step 1)

Lezione

the end-of-turn `mlx_clear_cache` that the socket's close waits on costs 3.0 to 3.4 ms a request on both text sets, rising about 1.3 to 1.7 ms a GiB of pooled buffers; clears of small pools cost under 1 ms, so moving the clear off the wait is the lever, not skipping it.

Adottato

no (diagnostics; their fix rows are queued as rows 173km, 173kv and 173kd).

Vuoi vedere cosa hanno prodotto questi esperimenti? Lesto, il motore di inferenza per Gemma 4 sui Mac con Apple silicon, è su lestoengine.com

Creato da Federico Andrioli, @fedeandri su X Le misure di un laboratorio di ricerca, ricavate direttamente dai suoi file. Dati aggiornati al