DeepRT: A Soft Real Time Scheduler for Computer Vision Applications on the Edge

Zhe Yang, Klara Nahrstedt, Hongpeng Guo, Qian Zhou

TL;DR

DeepRT is a specialized GPU scheduler designed to provide soft real-time guarantees for computer vision applications running on edge servers. By replacing unpredictable concurrent GPU execution with a novel "DisBatcher" mechanism and sequential Earliest Deadline First (EDF) scheduling, it achieves significantly lower deadline miss rates while maintaining high system throughput.

What Problem Does This Paper Address?

Edge computing is increasingly used to process video data from IoT devices and smartphones to ensure privacy and low latency. However, edge servers often host multiple "tenants" (different applications) sharing a single, limited GPU.

The authors identify a major gap: current inference servers (like NVIDIA Triton or Clipper) focus on maximizing total throughput or minimizing average latency, but they struggle with soft real-time guarantees—ensuring that specific requests are processed within a designated deadline. On a GPU, running multiple models concurrently causes "interference," where kernels from different applications compete for resources in a way that makes execution times unpredictable. This unpredictability is the enemy of real-time scheduling.

Methods

The authors propose DeepRT, a system built on the insight that batching data is more efficient than running models concurrently. Its core components include:

  • DisBatcher: Instead of batching a fixed number of images, it uses "time windows." It collects all frames arriving within a window (set to half of the tightest deadline) and groups them into a single "job instance." This mathematically ensures that if the job meets its own deadline, all individual frames within it will also meet theirs.
  • Sequential EDF Scheduling: DeepRT avoids the chaos of concurrent GPU execution. It schedules batches one by one using the Earliest Deadline First algorithm, which is optimal for non-preemptive scheduling.
  • Two-Phase Admission Control: Before accepting a new application, the system runs a fast "utilization test" followed by a detailed "EDF imitator" simulation to ensure the new load won't cause existing applications to miss deadlines.
  • Adaptation Module: If a task takes longer than expected (an "overrun"), this module temporarily reduces the input resolution for that application to "punish" it and allow the system to return to a stable state quickly.

Datasets

The system was evaluated using the DAVIS dataset, a standard benchmark for video object segmentation. The authors used video frames at various resolutions (1080p, 480p, and downsampled versions like 360x640 and 224x224) to simulate diverse real-world workloads.

Key Insights and Ideas

  • Concurrency is a Trap: A major "aha moment" in the paper is the finding that executing multiple model instances concurrently on a GPU doesn't significantly improve throughput but does cause execution times to grow linearly and unpredictably.
  • Batching > Concurrency: The authors prove that batching multiple requests into a single larger kernel call is superior to running multiple smaller kernels in parallel, both for throughput and for making latency predictable.
  • The Power of 1/2: By setting the batching window to half the minimum relative deadline, the authors created a simple but robust buffer that transforms a complex online arrival problem into a manageable periodic scheduling problem.

Key Results

The researchers tested DeepRT on both a high-end desktop (RTX 2080) and a resource-constrained edge device (NVIDIA Jetson TX2).

  • Deadline Misses: DeepRT consistently showed the lowest deadline miss rates. In scenarios where systems like Clipper or Triton-style batching had miss rates of 15-25%, DeepRT often stayed below 5%.
  • Throughput: DeepRT significantly outperformed standard Sequential EDF (which doesn't batch). Because of its intelligent batching, it could handle more concurrent requests while still meeting deadlines.
  • Predictability: The "EDF imitator" was found to be highly accurate, with latency predictions usually falling within a few milliseconds of real-world execution.

Limitations and Future Work

  • Hardware Specificity: The current implementation is tailored for NVIDIA GPUs and the CUDA framework. The authors note that supporting other accelerators like FPGAs or TPUs is a goal for future work.
  • Pre-processing Overhead: The study assumes frames arrive as raw data. In real-world scenarios, the CPU overhead for decompressing video (e.g., H.264) could impact the overall timing, which isn't fully explored here.
  • Framework Agnosticism: While implemented in PyTorch, the logic is framework-agnostic, but further testing with TensorFlow or TensorRT could reveal different interference patterns.

Summary updated

BibTeX
@inproceedings{yang2021deeprt,
  author = {Zhe Yang and Klara Nahrstedt and Hongpeng Guo and Qian Zhou},
  title = {{DeepRT: A Soft Real Time Scheduler for Computer Vision Applications on the Edge}},
  booktitle = {SEC},
  year = {2021},
  url = {https://openreview.net/forum?id=lhfJBvDJII},
}
Figure