Persist disjoint Strata and Qwen CPU placement with bounded TTS threads

This commit is contained in:
Mikei386 committed 2026-10-22 14:12:30 +02:00
1 parent 0e3ad518d3
commit ba4904ea78
13 files changed
+356 -11

No files matched your search

@@ -0,0 +1,106 @@
# Strata/TTS CPU partition ·22 October2026
Michael requested eight logical CPUs for Strata and the remaining four for
Qwen-TTS, without sharing physical cores between them. Ryzen5 5600 has six
physical cores and twelve SMT threads. The saved allocation is Strata0–3/6–9
(four physical cores), Qwen4–5/10–11(two physical cores).
The shared Deck quota must be12, not8. Otherwise a cgroup-wide eight-CPU time
budget still couples the two workers. The host install manifest persists12;
`DECK_STATE_DIR/cpu-partition.json` persists their independent placements.
RAM remains59GiB; GPU order, split16, reserves1024MiB each, Strata IQ3 dual
slots/context, QwenQ4/codec/Anna and all Hermes settings are unchanged.
## Implementation and persistence
Deck's small exec launcher sets initial Linux affinity. Official Strata flags
place its host on the first allowed core, pool workers on1/2/3, helpers on6–9.
The installed engine expects `--host-core first`, not a numericCPU ID. An
initial numeric argument caused startup rejection; the previous container and
manifest were restored before the corrected version was activated. No user
chat/profile/model files were changed during that recovery.
The original upstream engine/server and native Qwen library remain unmodified.
Qwen inherits its process affinity; its separate native per-thread masks remain
off. The final explicit settings use2generation/2codec threads and disable
CPU-Flash-Attention on this two-core allocation, preserving2codecframes/Nice10.
Without a partition file, the old4/4/CPU-Flash-Attention defaults remain intact.
Deck holds Strata's helper placement on per request.
Settings validation rejects shared physical cores, missing SMT siblings,
unavailable IDs and malformed masks. No partition file means previous behavior.
The new file is part of validated encrypted settings backup; its real settings
restore and removal when restoring an older backup were tested locally.
Maintenance stage:`/opt/athena-deck-dev/cpu-partition-20261022`. Public source
transfers have old/new SHA256 checks; originals are scoped code-only copies.
The only private rollback artifact is the previous installation manifest.
No broad state/appdata backup, private audio copy or new auxiliary service.
Activation checks the normal authenticated API twice for0active requests.
Only the existing Deck container is restarted. A minimal code-only image layer
uses the normal explicit installer FILES list on the current runtime; no apt,
compiler, model download, image flattening or Hermes image build is involved.
Prior image remains available; stale stopped maintenance containers are removed
after successful verification.
See[CPU configuration and native restore](../CPU_PARTITION.md) for the complete
file, Linux/systemd requirements, host-affinity limitations and rollback. The
full native installer/host restore remains an existing open qualification.
## Validation
32 focused CPU/Qwen/Strata/settings-backup tests passed with the existing
bundled Python/cryptography runtime. The broader98-test attempt passed the
streaming/endpoint tests with2pre-existing skips; its2backup cases initially
needed the already installed cryptography dependency and then passed in the
focused run. Python compilation and diff whitespace checks passed.
The bounded benchmark sends synthetic LLM and TTS requests through the existing
normal Athena API. It discards PCM after counting bytes/arrival times; no user
utterance or recording is inspected. `before.json` and `after.json` contain
technical results only. It is not an actual Conduit phone/playback test.
Before partitioning:18.08s PCM in18.855s (RTF1.043), firstPCM0.660s,
longest arrival gap1.500s, computed additional startup reserve6.718s. Strata
ran10.764s/566completion tokens, with10.032s overlap. The initial process-tree
observer missed thread-owned children and recorded no baseline masks; that
observer was fixed before the final affinity test. Baseline timing is unaffected.
This single request pair is not a replicated causal throughput benchmark.
The initial partition trial with4/4threads and native per-thread masks produced
the same18.08s PCM in133.568s (RTF7.388); the trace confirmed all Strata threads
stayed on0–3/6–9 and Qwen on4–5/10–11. Allowing the existing Qwen threads to
move within its four logical CPUs did not fix it:163.544s/18.08s, RTF9.046.
These intermediate worker settings were rejected. They must not be documented
as successful realtime speech merely because the CPU sets were disjoint.
A separate bounded native CPU test with2/2threads, no explicit per-thread mask
and no CPU-Flash-Attention environment override generated18.08s in22.488s
(RTF1.244), firstPCM0.384s, load3.032s. It used the existing host CPU venv,
the same public Q4/Q8-codec files and existing private Anna reference in place,
without copying/saving audio. The transient unit was limited to90s,6GiB/no swap,
the same four TTS logical CPUs, private devices/network andNice10. This host
Python test is not identical to the production container runtime or evidence
of a complete Conduit fix. An additional2/1test with explicit CPU-Flash-Attention
did not finish successfully within its bounded probe;1/1was therefore not run.
Thread count and the CPU attention path were not independently isolated in
these trials, so do not assign their speed difference to only one setting.
## Final production verification
Active image:`athena-deck-standalone:c7daa70ee03cd944`, shared quota12,
saved2/2thread/CPU-Flash-Attention-off settings. Original Strata dual model
reloaded through the normal one-token API:HTTP200,46.292s including loading.
The final test sent only the synthetic TTS passage because an existing Strata
request was active and Michael said“jetzt los”. No additional LLM request was
started; the existing request was not read or cancelled. Its exact generation
overlap and load characteristics were not measured, so this is not a matched
comparison with the earlier synthetic pair.
Final TTS:17.76s PCM in22.068s, RTF1.243, firstPCM0.571s, longest packet gap
0.425s, calculated extra startup reserve3.875s. All observed Qwen threads had
mask4–5/10–11. Strata host0, experts1/2/3, all other observed native threads6–9.
No observed physical-core overlap. This verifies the requested partition;
**two physical TTS cores still did not sustain realtime speech**. No actual
Conduit call/handset playback was triggered or claimed fixed. The separate
thread/attention tuning changed the sample's duration slightly; no audio-
identity or perceptual-quality equivalence claim is made.