Graphics & Input: Minimizing Latency #39

Open
opened 2026-02-03 17:12:25 +00:00 by Quaternions · 0 comments
Owner

The optimal latency strategy is to individually identify each component in the pipeline (link in the chain) and recognize when the pipeline is bottlenecked and throttle to keep the weakest link fully loaded, but without inducing a buffering snowball.

The pipeline is a baton pass. Each stage has to wait for the next to finish to give its output to the next stage (pass the baton). Care has to be taken when scheduling work into this pipeline.

The pipeline should be scheduled at the latest possible kick-off moment for which it is predicted that the pipeline will complete just before a frame is displayed. The scheduler may need to identify the stage which bottlenecks throughput when the fps cannot keep up with the monitor refresh rate. This is because eagerly scheduling work at the beginning of the pipeline will cause the work to bunch up at the bottleneck point, causing maximum latency. The optimal strategy is use the display time minus end-to-end latency as the optimal kick off point, but rate-limit scheduling according to the pipeline stage with the lowest throughput.

The individual latency is not necessarily the inverse of throughput, for example the GPU can have multiple frames in flight, so may have higher throughput than can be calculated from the latency. Throughput can be calculated as concurrency/latency. If the gpu can handle drawing 3 frames simultaneously without a latency penalty, then this is its concurrency.

The optimal latency strategy is to individually identify each component in the pipeline (link in the chain) and recognize when the pipeline is bottlenecked and throttle to keep the weakest link fully loaded, but without inducing a buffering snowball. The pipeline is a baton pass. Each stage has to wait for the next to finish to give its output to the next stage (pass the baton). Care has to be taken when scheduling work into this pipeline. The pipeline should be scheduled at the latest possible kick-off moment for which it is predicted that the pipeline will complete just before a frame is displayed. The scheduler may need to identify the stage which bottlenecks throughput when the fps cannot keep up with the monitor refresh rate. This is because eagerly scheduling work at the beginning of the pipeline will cause the work to bunch up at the bottleneck point, causing maximum latency. The optimal strategy is use the display time minus end-to-end latency as the optimal kick off point, but rate-limit scheduling according to the pipeline stage with the lowest throughput. The individual latency is not necessarily the inverse of throughput, for example the GPU can have multiple frames in flight, so may have higher throughput than can be calculated from the latency. Throughput can be calculated as concurrency/latency. If the gpu can handle drawing 3 frames simultaneously without a latency penalty, then this is its concurrency.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: StrafesNET/strafe-project#39