Skip to content

FAQ Performance

G.J.R. Timmer edited this page Jun 16, 2026 · 1 revision

FAQ — Performance

← Back to FAQ · See also Thread Safety Model

WITH_NVUTILS CPU usage looks ~20% higher

Symptom. CPU usage measured with the newer NvBufSurface/NvUtils path (WITH_NVUTILS, JetPack 5+) appears ~20% higher than the legacy nvbuf_utils path.

Cause. This is largely a measurement-methodology difference, not a real regression — different buffer APIs and accounting, different sampling. The delta reported upstream is sensitive to how CPU is measured.

Resolution. Compare like-for-like: same clocks, same tegrastats/top methodology, steady state. The build auto-selects the buffer API by probing for nvbufsurface.h; you do not choose it manually. See the NvUtils vs nvbuf_utils notes.

References. Keylost#11.

Decode is slow — max performance mode

Symptom. Decode throughput is far below the hardware's capability.

Cause. Without max-clock/performance hints the engine and DPB defaults leave performance on the table.

Resolution. This fork enables setMaxPerfMode and supports optional DPB disable and poc-type=2, yielding up to ~6× decode speedup (#9). Also run the board in its max clocks (nvpmodel / jetson_clocks) for benchmarking.

References. local #9, upstream perf discussion in the fork analysis.

CPU rises during long h264_nvmpi decode sessions

Symptom. During long-running H.264 decode, CPU usage climbs over time.

Cause. Under investigation — possible buffer-recycling or accounting growth over a long session.

Resolution. Tracked in #24 (upstream Keylost#41). If you can reproduce with a minimal stream + duration, attach tegrastats over time to that issue.

References. #24, Keylost#41.

Tuning the buffer pools

Symptom. EAGAIN under load, or memory/latency you want to trade off.

Cause. The frame/packet pools and decoder input chunk size are fixed at compile time upstream.

Resolution. This fork exposes frame_pool_size, packet_pool_size, and chunk_size as AVOptions (#11). Boundary behavior (min=1, max=32) is regression-guarded by the hw-decoder-pool / hw-encoder-pools suites — see Testing.

References. local #11, upstream Keylost#38.

Clone this wiki locally