VELTAIR: towards high-performance multi-tenant deep learning services via adaptive compilation and scheduling

Zihan Liu, Jingwen Leng, Zhihui Zhang, Quan Chen, Chao Li, Minyi Guo

Introduction

Modern cloud environments increasingly rely on multi-tenancy—co-locating multiple deep learning (DL) models on the same hardware—to maximize resource utilization and energy efficiency. However, this practice introduces significant resource contention, particularly within the shared L3 cache, leading to unpredictable latency and missed Quality of Service (QoS) targets. Existing solutions often struggle with scheduling granularity: model-wise scheduling wastes cores, while layer-wise scheduling incurs high overhead. Furthermore, standard DL compilers optimize for isolated execution, resulting in code that performs poorly under interference.

Adaptive Compilation: Handling Interference

VELTAIR addresses the shortcomings of static compilation by generating multiple code versions for each neural network layer. The system recognizes a fundamental trade-off between parallelism and data locality. While locality-optimized code excels in solo runs, it is highly sensitive to cache contention. In contrast, versions with higher parallelism and smaller data blocks are more resilient to interference.

Performance of different code implementations under varying levels of interference pressure.

As shown in the figure above, no single implementation is optimal across all interference levels. VELTAIR's offline compiler identifies a Pareto frontier of implementations and stores a small set (3-5 versions) for runtime selection. This approach avoids the overhead of Just-In-Time (JIT) compilation while maintaining performance within 10% of the theoretical optimum.

Adaptive Scheduling: Dynamic Layer-Blocks

To optimize hardware utilization, VELTAIR introduces dynamic "layer-blocks." This approach moves away from fixed scheduling granularities. By monitoring system load via an interference proxy (L3 cache miss rates), the runtime scheduler adjusts the size of these blocks.

Impact of scheduling granularity on CPU requirements and speed-up across different layer configurations.

When the system load is low, VELTAIR uses larger blocks to maximize efficiency. Under high load, it switches to smaller blocks to minimize scheduling conflicts. This "Goldilocks" granularity balances the low overhead of model-wise scheduling with the high utilization of layer-wise scheduling, effectively mitigating the ~2.86ms overhead typically seen in fine-grained scheduling for models like ResNet-50.

Key Results and Evaluation

Evaluated against the MLPerf benchmark suite (including ResNet-50, Bert-Large, and SSD), VELTAIR demonstrates substantial improvements over state-of-the-art spatial multiplexing systems like Planaria:

  • Throughput: Query throughput (QPS) increased by an average of 71% for light workloads and 68% for mixed workloads while maintaining 95% QoS satisfaction.
  • Latency: Average execution latency was reduced by 50%.
  • Efficiency: VELTAIR achieves performance within 1.1× of isolated execution, nearly eliminating the multi-tenancy penalty.

The synergy between adaptive compilation and scheduling is vital; while compilation alone provides significant gains, the full performance boost is only realized when combined with dynamic scheduling.

Conclusion

VELTAIR presents a robust framework for high-performance multi-tenant DL serving on CPUs. By combining multi-version adaptive compilation with dynamic layer-block scheduling, it effectively navigates the complexities of resource contention. Future work may extend these principles to heterogeneous architectures and more complex microservice-based workloads.

Summary updated

BibTeX
@inproceedings{liu2022veltair,
  author = {Zihan Liu and Jingwen Leng and Zhihui Zhang and Quan Chen and Chao Li and Minyi Guo},
  title = {{VELTAIR: towards high-performance multi-tenant deep learning services via adaptive compilation and scheduling}},
  booktitle = {ASPLOS},
  year = {2022},
  doi = {10.1145/3503222.3507752},
}
Figure