mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-06 21:04:21 +01:00
SGLang Diffusion's scheduler polls its request socket without ever waiting, so a video lane with nothing to do held one CPU core at 100%. On the reference box (2026-10-06) the box's CPU sat near 6 % through an evening with the lane loaded and idle, against near 1.3 % on quiet hours the day before, and its hottest zone near 61 C at rest against 43 C with no lane loaded: enough to keep the fans loud. py-spy put the core in recv_reqs() under event_loop(), every other thread idle. The image lane has carried scheduler-idle-poll.patch since it was measured there; this lane was left on the cookbook's code by choice (2026-09-25), reversed now that the cost is measured. Applied by hand to the box's video source first, 3 min after ready: 1.05 cores -> 0.05, the hottest zone 67 C -> 54 C; a 4 s 480P request picked up in the second it arrived, done in 691 s (592 to 760 s before), MP4 h264 864x480 with aac audio; the scheduler idle again after it; a stop at rest 0.24 s. install-video.sh now applies the patch as install-image.sh does (one file in image-sglang/ for both lanes, at the same SGLang commit): applied, already applied, or a note when a new pin no longer fits it, taken off before a new pin's checkout; its at-rest measurement notes a lane past half a core. The CI step that checks the patches against the real upstream file now covers both lanes, each at its own pin. The test that held "no local patch on this lane" now holds this patch and no other; TheIdlePatch runs the installer's own lines against a throwaway tree. Four hand-made mutants (never applied, the HTTP patch too, no take-off before a new pin, no note) each fail the suite. An update does not restart a serving video lane: the patch takes effect at its next start, so that no video being made is ended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>