Skip to content

chore: performance: establish hardware recording evidence and confirm noisy regressions #1305

Open

Description

@zackees

Part of #1295.

Context

The profiling report exposes a measurement gap that prevents attributing full-app frame loss to Rust. The two diagnostic runs below use llvmpipe under Xvfb, have large render-time variation, and include perf sampling overhead/lost samples. The Rust run had more render/encoder skips, but one such pair cannot establish causation or satisfy the 5% release bound. The shim measurements also ran on a shared host while other CPUs built the application.

Proposal

Produce reproducible release evidence with hardware rendering verified in the OBS log, matched C/Rust build options and target features, a fixed saved scene containing the sources required by release criteria, enough independent interleaved runs for a median/range, and no profiler in the timed control runs. Then capture a separate profile to explain a repeated difference. Validate actual library maps so the default C libobs is never mistaken for the Rust twin.

Acceptance criteria

  • Before implementation changes, record the current RED measurement failure: this Xvfb profile cannot prove the hardware release gate. Add a focused check of renderer selection and actual mapped libobs for any benchmark harness change; demonstrate it rejects software rendering or the wrong backend and passes on the intended setup.
  • Report independent-run medians/ranges for CPU, frame render time, rendered/output frame counts and render/encoder skips, at the same resolution/fps/encoder settings, with driver, CPU/GPU, source hashes and sample windows. Distinguish within-run observations from independent repetitions.
  • Resolve or isolate any repeated Rust/C difference seen here. Enforce the existing <=5% full-app recording regression gate, or seek explicit acceptance of measured user impact in a separate issue. Do not waive the gate based on these diagnostic numbers.
  • Preserve both Rust/C modes and record sampled stacks separately from measurements. Keep the existing <=10% shim gate. Rerun noisy tiny-function candidates on quiet release hardware before accepting them as confirmed defects.

Decisions

P2 release-validation task. Software rendering is an intentional consequence of this Xvfb setup and is not filed as a new driver bug. This task is distinct from the NixOS hardware-dependency research in #891 and the experimental harness discussion in #756. The public perf gates remain unchanged. No new GitHub Actions workflow is requested.

Full application profile

Built libobs-with-rust and obs-studio in the existing build_host RelWithDebInfo tree (cmake --build build_host --target libobs-with-rust obs-studio -j 4, pinned to CPUs 0–3). Missing propagated host include paths were supplied through process-scoped CPATH; no source fix was made. C and Rust libobs were selected by LD_LIBRARY_PATH; /proc/PID/maps verified the Rust twin for the ON run and its absence for the C control. Qt 6.11.1 plugin paths were isolated from the desktop's 6.11.2 plugins after an initial environment-related Qt abort. The config and X display were isolated; no desktop capture or microphone source was used.

Workload: Xvfb, 1920×1080 at 30 fps, color and FreeType text sources, x264 veryfast recording to MKV, 3 s warmup followed by a 30 s CPU sampling window and 15 GetStats observations. Recordings started/stopped successfully and processes exited; both logs report one remaining OBS allocation. No leak root cause or performance attribution is established here.

Run PID Observed window Median reported render ms (observation range) Render skips / frames during window Encoder skips / frames during window
Rust twin 2806160 31.35 s 37.780 (12.088–52.069) 116 / 910 39 / 951
C control 2812278 31.32 s 13.395 (11.615–66.577) 55 / 909 0 / 910

These are single diagnostic runs, not independent-run medians or a valid default-flip comparison. The log explicitly reports Mesa llvmpipe, despite detecting the RTX 3060. Perf attributes Rust-run sampled cycles to JIT code (54.91%), Mesa libgallium (18.56%), and x264 (16.28%); C control is similar (55.85%, 19.47%, 14.48%). Do not attribute JIT symbols to Rust: these are software-rendering JIT samples. The Rust capture has ~18K cycle samples and 70 lost samples; C ~19K and 82 lost samples, with kernel symbols unavailable. This identifies software rendering as the dominant workload cost and leaves the observed Rust/C frame difference unexplained. Xvfb software rendering is expected here; it does not establish a product driver regression. Hardware-backed repeated recording comparisons without sampling overhead remain necessary before applying the release criteria's 5% gate.

Sampling command for each application PID:

perf record -F 199 -g --call-graph dwarf,16384 -p PID -o perf.data -- sleep 30

Measurement context

Measured on 2026-10-17, AMD Ryzen 7 3700X, Linux x86_64, CPU affinity 7, Rust 1.98.1, GCC 15.2.0. Five complete passes of all 70 paired Criterion comparisons; 30 samples/case/pass, 0.1 s warmup, 0.4 s measurement, 10,000 resamples. Values below are medians of the five pass medians. The ratio range contains the five paired Rust/C ratios; the reported median ratio divides the two backend medians.

CARGO_PROFILE_BENCH_DEBUG=1 RUSTFLAGS='-C force-frame-pointers=yes' \
  uv run rust/tools/benchmarks/record.py --cpu 7 --repeats 5 --output baseline.json

The optimized profiling build completed in 40.99 s. Recorded end-of-run HEAD: b56092cc66a979b2f543da20846b965c3517ac36. The checkout was shared and HEAD moved during work; the recorder's source fingerprint stayed unchanged across all five timing passes: 5eea3716b30cf03831eacbc1f06711c2c622f915ebd8945a6940e6fab9d0d422. Source links use fetched master; the fingerprint identifies the measured benchmark/implementation input set. Baseline JSON SHA-256: 9517eb96c66a484cf305a13758a856d893f4608ee454c1a6ea16f693f62c4f26.

This was a shared host. The application build ran on CPUs 0–3 during part of the CPU-7 benchmark run, and other workloads were present. Wide ranges and nanosecond-scale differences require confirmation on quiet release hardware. A descriptive threshold crossing is not proof of statistical significance. The C oracle uses Cargo's optimized C build, rather than full OBS C IPO; profiling frame pointers also affect tiny call costs. No cross-platform or whole-application speedup/slowdown is inferred from shim benchmarks. dstr/printf_control remains C in both configurations and is excluded from Rust regression decisions.

Local evidence: /home/niteris/dev/obs-rust/reports/obs-profile-20261017/ contains baseline.json (per-run medians/confidence intervals), build logs, perf data/reports, assembly, runtime logs/maps/results, and the profiling harness. Raw Criterion samples are in target/criterion, baselines ports-20261017T172745Z-1 through ports-20261017T172745Z-5. Key evidence is reproduced here so triage does not depend on local file access.

Activity

  1. vpacher commented on Oct 18, 2026

    @vpacher
    Member

    Claiming: #1305 (hardware recording evidence)

    Setup for the evidence runs:

    • Debian 13 LXC on Proxmox, Ryzen host, RTX 3060 (NVIDIA proprietary driver, hardware OpenGL; no Xvfb/llvmpipe).
    • One build tree, two libobs: the installed C libobs and the libobs-with-rust twin, selected by LD_LIBRARY_PATH. Each run records the mapped libobs from /proc/<pid>/maps.
    • Fixed saved scene: 4K NDI source (DistroAV) + ALSA audio, 3840x2160 at 25 fps.
    • Recording with NVENC H.264 and HEVC (this GPU has no AV1 encoder).

    Plan:

    1. RED: a check that rejects a run when the OBS log shows a software renderer or the wrong backend, or when the mapped libobs is not the expected one. Show that it rejects llvmpipe and the wrong libobs, and passes on the hardware setup.
    2. Interleaved C/Rust runs (5 or more each), no profiler in the timed runs. Report median and range for CPU, render time, rendered/output frames and render/encoder skips, with driver, CPU/GPU, source hashes and sample windows.
    3. Only for a repeated difference: a separate profiling run to explain it.

    PRs:

    1. ci/recording_evidence_check.py + tests: the renderer, mapped-libobs and encoder check (RED test first). I expect to open it today.
    2. The run driver and report (interleaved C/Rust runs, medians and ranges), then the results on this issue.
  2. added
    claimed
    on Oct 18, 2026
  3. vpacher commented on Oct 18, 2026

    @vpacher
    Member

    First hardware recording evidence for the 5% gate (Linux x64), measured with the tools from #1405 and #1410.

    Setup

    • Build: fork master 9f573a9 (33.0.0-beta6-1609-g9f573a9b3), one install. C libobs.so.30 (SHA-256 90cc938e1114…) or the libobs-with-rust twin (4ce6136edc3d…), selected by LD_LIBRARY_PATH. libobs-opengl and the other modules are the same files in both.
    • Host: Debian 13 LXC (6 cores of a Ryzen 9 5950X), RTX 3060, NVIDIA 595.104.02. Renderer OpenGL NVIDIA Corporation NVIDIA GeForce RTX 3060/PCIe/SSE2, checked in every run by ci/recording_evidence_check.py together with the mapped libobs.
    • Scene: one 4K NDI camera source (DistroAV 6.2.2, NDI 6.3.2) + ALSA audio, 3840x2160 at 25 fps. An NDI output ran during all runs.
    • Recording: Simple mode, quality "Indistinguishable" = NVENC H.264, CQP 16, preset p5, MKV (about 150 Mbit/s).
    • Runs: 10 runs of 120 s, one OBS restart per run, 60 s warm-up after each start. Order C R R C C R R C C R. No profiler.

    Result (recording.py report, median and range of 5 runs per backend)

    metric C Rust Rust/C
    frame render time, median of run medians (ms) 3.482 (3.375-3.672) 3.348 (3.254-3.427) 0.962
    frame render time p95 (ms) 3.631 (3.548-4.178) 3.573 (3.476-3.672) 0.984
    OBS CPU (% of 6 cores) 13.010 (12.828-13.425) 13.095 (13.050-13.287) 1.007
    render / output / encoder skip rate 0 / 0 / 0 0 / 0 / 0 -
    rendered frames per run 3000 3000 1.000

    Gate: frame time PASS (0.962 <= 1.05), dropped frames PASS (none in any run).

    Host-side, outside OBS (sampled every 10 s, first 80 s of each run excluded): CPU package power median C 93.2 W / Rust 93.1 W; container CPU median C 0.820 / Rust 0.831 cores (+1.3%; the OBS CPU ratio is +0.7%, same direction). Package power follows the time of day in both backends, not the backend.

    Limits

    • One platform (Linux x64, NVIDIA). macOS and Windows need their own runs (release-criteria.md).
    • 4K at 25 fps uses about 3.4 ms of the 40 ms frame budget, so no run came near a skipped frame. The gate passes, but this workload does not stress rendering or encoding. @zackees, if you want a more sensitive frame-time comparison, a heavier case (60 fps, more sources) can use the same tools: recording.py run per backend, then report. I do not plan to run it now.
    • The CPU difference (+0.7% OBS, +1.3% container) is inside the run-to-run range of C, but it is in the same direction in both measurements. I will compare it again in later series.

    The raw run files (per-second samples, encoder log lines, identities) are available if someone wants them attached.

  4. swilk19 commented on Oct 18, 2026

    @swilk19
    Contributor

    A measurement note from verifying #1299. It applies to every tiny-function case in #1295.

    The profiling recipe in the #1295 report (CARGO_PROFILE_BENCH_DEBUG=1 RUSTFLAGS='-C force-frame-pointers=yes' uv run rust/tools/benchmarks/record.py ...) adds frame pointers to the Rust code only. obs-c-oracle's C is compiled by cc, which does not read RUSTFLAGS, so in that build Rust functions get push %rbp; mov %rsp,%rbp; ... pop %rbp and their C counterparts do not.

    vec2_abs compiles to the same three instructions in Rust and C. With the same binary, on Ice Lake:

    Build vec2/abs Rust/C
    Plain bench profile 1.11× (1.10–1.12)
    Issue's FP recipe 1.39× (1.36–1.41)

    Cascade Lake: 1.04× vs 1.25×. Details are on #1299.

    Suggested follow-up, either as part of this issue or separately: decide regressions from the plain bench profile only. If frame pointers are wanted for perf attribution, pass the matching C flag as well (CFLAGS=-fno-omit-frame-pointer, which cc honours) so both sides carry the same prologue. The recorder could enforce this by refusing force-frame-pointers in RUSTFLAGS unless CFLAGS has -fno-omit-frame-pointer.

  5. vpacher commented on Oct 20, 2026

    @vpacher
    Member

    Thanks, this matches what we saw on #1301: there a layout change moved the C oracle by 3-5 ns, so those numbers used the same alignment flags for both languages (RUSTFLAGS align flags plus CFLAGS=-falign-functions=64 -falign-loops=32). The #1305 recording evidence above is not affected: release builds, no profiler, no extra flags.

    I can take the recorder guard as a separate small PR: record.py stops when RUSTFLAGS has force-frame-pointers (or the function-alignment flags) and CFLAGS has no matching flag, and the report shows both. OK?

  6. removed
    claimed
    on Oct 22, 2026
  7. added
    P3
    size:M
    on Oct 25, 2026
  8. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    /ready

    Triage: the tooling is merged (#1405 checks the renderer and the mapped libobs, #1410 records full-app recording runs and reports against the 5% bound). Left: real hardware runs (a GPU renderer, not llvmpipe under Xvfb, on an idle host) of C versus Rust with the alignment flags noted above, then confirm or dismiss the noisy regressions. Acceptance: the report from #1410's harness on at least one hardware host, posted here, with each regression either reproduced (and filed) or dismissed. P3, size:M.

  9. added
    ready
    on Oct 25, 2026
  10. vpacher commented on Oct 31, 2026

    @vpacher
    Member

    Claiming: #1305 (the two items left after the 10-18 hardware report and the 10-25 triage)

    Since 10-18, all nine children of #1295 closed (#1296–#1304), the libobs layout changed (hybrid libobs plus the explicit libobs-c-reference, not the libobs-with-rust twin), and the oracle C is now built at the shipped level (#3130). The 10-18 numbers no longer describe master.

    Plan (one comment with the results, no code change expected):

    1. Noisy shim regressions. Run rust/tools/benchmarks/record.py at current master on the Ryzen 9 5950X host with no build or other benchmark running (pinned to one CPU, 5 repeats; the host load is recorded with the results). No profiling flags, so Rust and C have the same frame-pointer and alignment settings (the note from swilk19 above). Then give a verdict for each of the 22 rows of the meta: resolve OBS Rust profiling regressions and validate recording performance #1295 inventory: dismissed (inside the 1.10 bound now), or reproduced (filed as a new issue with the numbers).
    2. 5% recording gate at current master. The same host and workload as on 10-18 (RTX 3060, NVIDIA OpenGL, 4K25 NDI source + ALSA, NVENC H.264). One build with -DOBS_BUILD_C_REFERENCE=ON: hybrid libobs against libobs-c-reference, selected by the library path. At least 5 interleaved runs per backend through recording.py run, then recording.py report.

    Expected: results here within about 2 days. If a regression reproduces, I file it as its own issue and leave this one open on it.

  11. vpacher commented on Oct 31, 2026

    @vpacher
    Member

    Results for the two items of the 10-31 claim.

    1. The #1295 inventory: 21 of 22 rows dismissed, av1/metadata reproduced (#3175)

    rust/tools/benchmarks/record.py --cpu 31 --repeats 5 --max-ratio 1.10, master 538e920, Ryzen 9 5950X (Linux x86_64 LXC on the same host as part 2, no build or other benchmark running, load average about 2), Rust 1.98.1, GCC 14.2.0. No profiling flags: RUSTFLAGS and CFLAGS empty, so Rust and C have the same frame-pointer and alignment settings (swilk19's note above). The oracle C is at the shipped level (-O2 -ffp-contract=off -fno-strict-aliasing, #3127). Medians of the 5 pass medians; the last column is the range of the 5 paired Rust/C ratios. The 10-17 column is from the #1295 report (Ryzen 7 3700X): compare the ratios, not the nanoseconds.

    Benchmark 10-17 Rust/C Rust ns C ns Rust/C now paired run ratios verdict
    av1/extract/16384 1.259 218.626 366.099 0.597 0.578–0.619 dismissed
    av1/extract/256 1.477 40.474 84.123 0.481 0.468–0.489 dismissed
    av1/keyframe/16384 1.393 6.921 7.557 0.916 0.908–0.925 dismissed
    av1/keyframe/256 1.313 6.243 6.978 0.895 0.890–0.936 dismissed
    av1/metadata 1.506 39.734 35.440 1.121 1.111–1.185 reproduced, #3175
    av1/metadata_itu_t35 1.367 39.238 35.958 1.091 0.993–1.162 dismissed
    avc/extract/256 1.254 121.480 148.061 0.820 0.800–0.897 dismissed
    avc/keyframe/16384 1.332 16.603 22.059 0.753 0.746–0.755 dismissed
    avc/keyframe/256 1.256 16.594 22.073 0.752 0.745–0.829 dismissed
    bmem/alloc_free/64 1.188 7.616 7.850 0.970 0.963–1.031 dismissed
    bmem/count 1.207 1.137 1.136 1.001 0.631–1.587 dismissed
    dstr/cat/128 2.277 36.647 35.658 1.028 0.981–1.038 dismissed
    dstr/cat/4096 2.380 109.549 109.760 0.998 0.923–1.013 dismissed
    dstr/safe_printf/128 6.599 79.095 99.199 0.797 0.779–0.809 dismissed
    dstr/safe_printf/4096 58.200 225.595 246.910 0.914 0.899–0.972 dismissed
    hevc/extract/256 1.353 128.975 160.208 0.805 0.793–0.842 dismissed
    hevc/keyframe/16384 1.445 21.070 27.609 0.763 0.751–0.767 dismissed
    hevc/keyframe/256 1.441 20.941 27.601 0.759 0.746–0.762 dismissed
    vec2/abs 1.280 1.379 1.377 1.002 0.756–1.485 dismissed
    vec2/ceil 2.473 2.546 2.505 1.017 1.015–1.018 dismissed
    vec2/floor 1.716 2.542 2.492 1.020 1.018–1.021 dismissed
    vec3/rand/1 1.249 18.393 18.857 0.975 0.974–0.977 dismissed
    Outside the #1295 inventory: all pairs above 1.10 in this run

    The full suite now has 321 pairs; most were added by ports after #1295. I did not check these one by one and did not file them: the list is for whoever decides how the 1.10 bound applies to them (#3138 set the pattern: a fix, or an exemption with its measured cost). The format/* rows are the SIMD gap of #3004/#3008.

    101 of 321 pairs above 1.10 (0 exempt).

    Benchmark Rust ns C ns Rust/C
    source_transition_clock/ratio_ties 14182.1 2709.3 5.23
    scene_item_order/reorder2/16 98.4 36.3 2.71
    format/uyvx_to_i444/1080p 1151758.4 435690.6 2.64
    format/uyvx_to_nv12/1080p 849694.0 336036.3 2.53
    conversions/utf8_to_wcs/64 155.5 65.7 2.37
    service/get_name 3.2 1.4 2.35
    conversions/utf8_to_wcs/4096 9104.3 3975.3 2.29
    signal/emit_global/4 173.7 76.0 2.29
    source_deinterlace_draw/render_frame 25347.4 11424.9 2.22
    video_copy_plan/rgbx_and_reuse/1024 9858.0 4477.7 2.20
    signal/emit/4 155.7 73.2 2.13
    output_start/start_and_begin/1024 20981.9 10009.2 2.10
    audio_discard/pending_tick_stereo 10.5 5.1 2.05
    format/yuy2_to_uyvx/1080p 1190728.4 607340.8 1.96
    format/yuy2_to_uyvx_c_scalar/1080p 1191912.4 608080.8 1.96
    format/uyvy_to_uyvx/1080p 1192625.6 610257.6 1.95
    format/uyvy_to_uyvx_c_scalar/1080p 1192740.5 611557.2 1.95
    format/uyvx_to_i420/1080p 857927.3 457788.4 1.87
    source_async_upload/texrender 23153.2 12662.4 1.83
    conversions/wcs_to_utf8/4096 7137.4 3965.3 1.80
    canvas_rules/setters 20500.0 11425.4 1.79
    video_copy_plan/gpu_copy_plan/1024 18893.9 11048.4 1.71
    module_names/listed/miss 79.6 46.6 1.71
    module_names/listed/last 76.2 44.9 1.70
    encoder_roi/scale/16 177.9 105.4 1.69
    module_locale/is_default/same 12.0 7.1 1.68
    source_media_admission/admission 4940.5 2940.1 1.68
    module_names/file_name 7.5 4.5 1.65
    conversions/wcs_to_utf8/64 116.4 70.6 1.65
    source_conversion_plan/plan 29746.9 18750.4 1.59
    service/get_id 3.2 2.1 1.57
    source_async_upload/frame 24925.4 15954.3 1.56
    module_names/manifest_path 72.5 46.7 1.55
    conversions/utf8_to_wcs_ptr/64 217.7 140.9 1.54
    module_source_rules/check 1.8 1.2 1.50
    source_draw_plan/async_frame 17141.4 11497.5 1.49
    dstr/to_upper/4096 39605.6 26617.2 1.49
    dstr/to_upper/128 1298.8 879.9 1.48
    module_locale/is_default/other 6.6 4.6 1.46
    nix_x11_hotkeys/route_and_decode/1024 5950.1 4098.1 1.45
    scene_item_names/load/16 1209.9 846.5 1.43
    source_filter_chain/restore 925.5 647.6 1.43
    graphics_sprite/subregion_sprite 23860.6 16855.1 1.42
    service/can_try_to_connect 3.2 2.3 1.41
    nix_system_info/dmesg 14367.8 10379.5 1.38
    module_source_rules/versioned_id/unversioned 34.7 25.1 1.38
    format/nv12_to_uyvx_c_scalar/1080p 606067.8 439772.6 1.38
    format/nv12_to_uyvx/1080p 605749.2 439763.2 1.38
    conversions/utf8_to_mbs_ptr/ascii 265.3 193.0 1.37
    encoder_gpu_rescale/start_and_release/1024 16004.1 11723.9 1.37
    gif/scan_decode_5x1080p 59254135.0 44157437.0 1.34
    canvas_draw/display_begin 6883.1 5141.6 1.34
    signal/emit/0 87.7 65.6 1.34
    gif_frame/decode_1080p_simple 11739057.2 8793358.0 1.33
    scene_render_plan/texcoords_centered/16 79.1 59.3 1.33
    canvas_rules/create 8505.6 6380.9 1.33
    video_frame_timing/frame/1024 12497.9 9385.5 1.33
    lzw/decode_map_1080p 11725157.5 8816085.5 1.33
    win_crash_report/modules 2626.3 1977.4 1.33
    encoder_group_reconfig/frame/1024 10563.8 7985.5 1.32
    source_filter_chain/moves 2013.8 1522.5 1.32
    effect_params/set_float_new 3.7 2.8 1.31
    module_names/config_path 70.5 53.7 1.31
    source_deinterlace_select/select_tick 26814.9 20764.1 1.29
    module_type_rules/protocol_listed 20.3 15.8 1.29
    source_async_pacing/unbuffered_tick 3873.2 3010.2 1.29
    win_crash_report/frames 12991.4 10179.3 1.28
    lzw/decode_stack_1080p 11102619.0 8711958.2 1.27
    nix_system_info/cpuinfo 31708.9 24914.8 1.27
    portal_shortcut_status/sync/64 11620.7 9148.2 1.27
    effect_params/set_float_same 3.3 2.6 1.26
    source_deinterlace_select/long_queue 37121.7 29488.4 1.26
    scene_crop/scale_crop/16 113.9 90.6 1.26
    module_register_copy/whole_size 3.4 2.7 1.25
    source_draw_plan/source_render 8508.6 6848.0 1.24
    canvas_draw/canvas_texture 6625.2 5426.0 1.22
    effect_params/set_matrix4_new 4.7 3.8 1.22
    nix_wayland_keys/keymap_and_keys/248 8018.8 6620.8 1.21
    source_async_pacing/buffered_tick 4198.8 3476.4 1.21
    source_duplicate/scene 422.3 352.5 1.20
    core_setup_rules/mix_step 8.2 6.9 1.20
    gif_frame/decode_1080p_interlaced 11678235.0 9823222.5 1.19
    source_async_pacing/walk_30 24812.2 21061.1 1.18
    vec2/close 1.6 1.4 1.16
    output_pause/pause_unpause/256 10273.1 8878.4 1.16
    output_reconnect/disconnect/256 28514.8 24647.6 1.16
    source_deinterlace_pacing/unbuffered_tick 9395.0 8156.6 1.15
    module_load_rules/routes 5.4 4.7 1.15
    module_type_rules/output_check 1.8 1.6 1.14
    audio_mix/time_to_frames 1.8 1.6 1.14
    encoder_packet_ts/packet/1024 7486.5 6630.9 1.13
    calldata/heap/set_get_4 177.7 157.8 1.13
    state_stacks/scene_1000_items 63904.5 56827.9 1.12
    service/load_state 23.5 20.9 1.12
    av1/metadata 39.7 35.4 1.12
    core_setup_rules/latest_newer 2.0 1.8 1.12
    audio_discard/discard_tick_stereo 89.6 80.2 1.12
    windows_keys/init_and_names/64 3748.7 3359.5 1.12
    effect_params/set_vec4_same 3.3 3.0 1.11
    encoder_roi/admit/16 33.2 29.8 1.11
    view/set_source swap 26.1 23.6 1.11

    2. The 5% recording gate at current master: PASS

    Setup

    • Build: master 1b3a74f, one build tree (RelWithDebInfo, OBS_LIBOBS_BACKEND=HYBRID, -DOBS_BUILD_C_REFERENCE=ON), one install. Rust: the hybrid libobs.so.30 (SHA-256 e581c4db81ca…). C: libobs-c-reference from the same tree, copied as libobs.so.30 into a separate directory first in LD_LIBRARY_PATH (111d76b1b864…, no Rust code in it). libobs-opengl and all modules are the same files in both runs. The build needed -DCMAKE_CXX_FLAGS=-Wno-error=float-conversion with Debian's Qt 6.8 (build(frontend): the app does not compile with Qt 6.8 since properties-view passes -Wfloat-conversion to its consumers (#3067) #3164); that changes no generated code.
    • Host and workload: the same as on 10-18. Debian 13 LXC (6 cores of a Ryzen 9 5950X), RTX 3060, NVIDIA 595.112.07, renderer OpenGL NVIDIA Corporation NVIDIA GeForce RTX 3060/PCIe/SSE2, checked in every run by ci/recording_evidence_check.py with the mapped libobs. One 4K NDI camera source (DistroAV) + ALSA audio, base 3840x2160, output 1920x1080, 25 fps, an NDI output active during all runs. Recording: Simple mode, quality "Indistinguishable" (NVENC H.264), MKV.
    • Runs: 10 runs of 120 s, one OBS restart per run, 60 s warm-up. Order C R R C C R R C C R. No profiler.

    Result (recording.py report, median and range of 5 runs per backend)

    metric C Rust Rust/C
    frame render time, median of run medians (ms) 2.206 (2.128–2.811) 2.177 (2.102–2.580) 0.987
    frame render time p95 (ms) 2.383 (2.325–3.246) 2.360 (2.228–2.855) 0.990
    OBS CPU (% of 6 cores) 10.561 (10.231–11.111) 10.561 (10.231–11.016) 1.000
    render / output / encoder skip rate 0 / 0 / 0 0 / 0 / 0 -
    rendered frames per run 3000 3000 1.000

    Gate: frame time PASS (0.987 <= 1.05), dropped frames PASS (none in any run).

    Outside OBS (sampled every 10 s, first 80 s of each run left out): container CPU median C 0.65 / Rust 0.66 cores; CPU package power median C 94.0 W / Rust 96.3 W, with overlapping run ranges (91.0–94.7 / 92.4–97.3 W). On 10-18 the package power followed the time of day in both backends, so I do not read the 2.3 W as a backend difference.

    Compared with 10-18 (9f573a9, the twin layout), both backends are faster on the same scene: frame render time 3.48 / 3.35 ms then, 2.21 / 2.18 ms now; container CPU 0.82 / 0.83 cores then, 0.65 / 0.66 now. The earlier +0.7 % OBS CPU difference is not there in this series (1.000).

    Limits: the same as on 10-18. One platform (Linux x64, NVIDIA), and a light workload for the frame budget (about 2.2 ms of 40 ms), so no run came near a skipped frame.

    Raw data (the record.py JSON with every pass and confidence interval, the run JSONs of recording.py with the per-second samples and encoder log lines) is available if someone wants it attached.

  12. moved this from Ready to In progress in obs-rust Multiviewon Oct 31, 2026
  13. moved this from In progress to Ready in obs-rust Multiviewon Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3readysize:M

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions