ArmSoM
← All stories

Why RKNN Inference Latency and Batch Throughput Disagree

A team evaluating CM7s may report more frames per second after batching even as the first result arrives later. Throughput measures completed work per unit time. Interactive latency also includes the wait for other samples to form the batch.

ArmSoM CM7s compute module product photo

ArmSoM CM7s compute module · ArmSoM

Account for the wait before inference

If independent inputs arrive every 40 ms and a worker waits for four before starting, the first sample waits about 120 ms just for its companions. Time preprocessing, queue residence, model execution and delivery individually. Confirm that the chosen model and runtime actually support the proposed batch shape before benchmarking it.

Batch size at a 40 ms arrival interval

Oldest sample waits before the batch fills

1

0 ms

2

40 ms

4

120 ms

Feed the benchmark with timestamps from a real or representative arrival trace. Pre-filling every batch removes the waiting time that a camera operator actually experiences.

Compare batch sizes using the same arrival trace and deadline. For a single live camera a smaller batch can meet the response target more consistently. For stored clips an offline worker can accept a longer first-result delay in exchange for increased throughput.

Reference material

ArmSoM CM7s hardware documentation

Rockchip RKNN-Toolkit2 and model conversion resources

Related ArmSoM guide

How to benchmark an SBC NPU without misleading tops comparisons

Explore ArmSoM CM7s