ref:main

REQ-NFR-001: Capture-to-packet latency budget

draft high

Host processing latency (QEMU display call received to encoded frame sent, as reported in Moonlight frame headers) at 1080p60, measured by tests/e2e/qemu/e2e_stream.sh (E2E_WIDTH=1920 E2E_HEIGHT=1080 E2E_FPS=60 E2E_FRAMES=600). Targets: shm path with a hardware encoder p95 <= 12 ms; DMABUF path with a hardware encoder p95 <= 10 ms. Phase 0 (#2, fixed capture tick): NVENC p50 11.1 ms, p95 20.4 ms (Unix.Map). Phase 1a (#3, damage-driven capture), Release + CUDA, NVENC, KVM, WSL2, RTX 4090, 640x400 guest framebuffer, Unix.Map: before p50 10.9-13.7 ms, p95 17.8-21.8 ms (5 runs); after p50 3.8-4.0 ms, p95 4.4-5.4 ms on a quiet host (7 runs), p50 3.9-4.5 ms, p95 9.4-10.0 ms while other work loaded the host (3 runs); D-Bus message path (QEMU 8.2) p95 8.7 ms; software x264 p95 6.4 ms. The shm target is met. The DMABUF target is unmeasured: WSL2 has no DRM render node, so it needs a native Linux GPU host before this requirement is set active. Issues #2, #3.

Category: performance
Version: 1.0

Linked Tests (6)

Test Name Source Last Status Last Verified
e2e_stream.sh tests/e2e/qemu/e2e_stream.sh:2 never run
QemuCaptureTest.BurstsOfDamagePushAtMostOneFramePerInterval tests/unit/platform/linux/qemu/test_capture.cpp:287 never run
QemuCaptureTest.NoDamageRepeatsNoFrames tests/unit/platform/linux/qemu/test_capture.cpp:325 never run
QemuCaptureTest.PushesDamageWithinMillisecondsNotAtTheNextTick tests/unit/platform/linux/qemu/test_capture.cpp:247 never run
QemuFrameStoreTest.DmabufWithoutReadbackKeepsNoFrameInSystemMemory tests/unit/platform/linux/qemu/test_frame_store.cpp:602 never run
QemuFrameStoreTest.WaitForChangeWakesOnDamageAndTimesOut tests/unit/platform/linux/qemu/test_frame_store.cpp:307 never run

History (5)

When Change Fields Version By
2026-09-12 23:09 UTC updated description 1.0 system
2026-09-12 23:09 UTC updated description 1.0 system
2026-09-12 21:30 UTC updated description 1.0 system
2026-09-12 21:13 UTC updated description 1.0 system
2026-09-12 19:28 UTC created 1.0 system