flybrain/docs
acamilo 8fa98b0b03 session: pin the sweep workers one per cpu in flysim-session (PERF-02)
CUT-01's speed probation fell back at a median realtime factor of 0.959.
With exactly as many cpus as sweep threads, the session's host threads
(dispatching tokio worker, coordinator, listeners) sleep and wake around
every transition, the sweep workers park and wake with them, and the
scheduler often stacks two workers on one cpu: the session's ticks ran
about 35% slower than the legacy loop's on the same frames (equal with a
spare cpu).

flybrain_core::pool::place_workers gives each spawned sweep worker a cpu
of its own and confines every other thread to the rest of the cpuset;
flysim-session calls it before spawning anything (in-process and thread
modes; FLY_SESSION_PIN=0 turns it off). Placement chooses cpus only, so
no result, trace or checkpoint changes; the legacy loop, process mode and
the shadow binary never call it. The compatibility string is unchanged.

On the release cpu model, 4 cpus, 4 threads, same frames: session 16.16
-> 12.98 ms/frame (legacy 10.53). The service's profile line prints the
measurement spans and the brain's phase split when FLY_SESSION_PROFILE is
set. Docs: legacy-gameboy-v1 section 12 amendment, implementation entry.
2026-10-01 12:16:59 +00:00
..
design session: pin the sweep workers one per cpu in flysim-session (PERF-02) 2026-10-01 12:16:59 +00:00
publish flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
architecture-tour.md docs: the damage reward, and the v7 migration in deploy examples 2026-09-30 02:11:45 +00:00
control-api.md docs(control-api): the chat ring's sidecar, in the [chat] section 2026-09-22 16:26:29 +00:00
dataset-format.md flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
feed-protocol.md docs: row 69, throw on low HP only and the fly names its catch 2026-09-29 18:54:57 +00:00
integration.md docs: the damage reward, and the v7 migration in deploy examples 2026-09-30 02:11:45 +00:00
limitations.md flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
loop-review.md loop recovery: an escalation ladder that unsticks a trap on its own 2026-09-28 21:23:33 +00:00
model.md flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
overview.md flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
plasticity.md flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
readout.md docs: PROF-02a and RT-01a, the legacy Game Boy composition on the session framework 2026-09-23 08:32:05 +00:00
rewards-learning.md docs: the stage folds a battle's damage hits into one ticker row 2026-09-30 02:41:58 +00:00
stream-mvp-plan.md docs: v0.7.3 status 2026-10-01 05:10:22 +00:00
streaming-plan.md flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
verification.md flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00