Abstract
Deep learning (DL) models have become core modules for many applications. However, deploying these models without careful performance benchmarking that considers both hardware and software's impact often leads to poor service and costly operational expenditure. To facilitate DL models' deployment, we implement an automatic and comprehensive benchmark system for DL developers. To accomplish benchmark-related tasks, the developers only need to prepare a configuration file consisting of a few lines of code. Our system, deployed to a leader server in DL clusters, will dispatch users' benchmark jobs to follower workers. Next, the corresponding requests, workload, and even models can be generated automatically by the system to conduct DL serving benchmarks. Finally, developers can leverage many analysis tools and models in our system to gain insights into the trade-offs of different system configurations. In addition, a two-tier scheduler is incorporated to avoid unnecessary interference and improve average job compilation time by up to 1.43x (equivalent of 30% reduction). Our system design follows the best practice in DL clusters operations to expedite day-to-day DL service evaluation efforts by the developers. We conduct many benchmark experiments to provide in-depth and comprehensive evaluations. We believe these results are of great values as guidelines for DL service configuration and resource allocation.
Introduction
Deploying a deep learning (DL) model into production is often a "black box" exercise. Developers must navigate a complex maze of choices: Which GPU should I use? Which serving software (TensorFlow Serving vs. NVIDIA Triton) is best? How do batch size and model depth affect tail latency? Existing benchmarking tools like MLPerf are excellent for high-level comparisons but often lack the configurability needed for day-to-day development. They frequently require weeks of manual setup and provide limited insights into why a specific configuration fails or succeeds. This leads to "trial-and-error" deployment, resulting in either poor user experience or wasted operational expenditure.
The InferBench System
To address these challenges, we introduce InferBench, an automated, end-to-end benchmarking framework. InferBench is a distributed system based on a Leader/Follower architecture. Developers provide a simple YAML configuration file, and the system automatically dispatches jobs, generates synthetic workloads, and manages model artifacts.
The system can automatically generate "canonical models"—standardized versions of CNNs or Transformers—to explore how hyper-parameters like layer count and neuron density impact hardware utilization. It also supports real-world models such as BERT-Large, ResNet50, and VGG16/19, using standard datasets like ImageNet for realistic request generation.
Multi-Tier Evaluation Framework
InferBench analyzes three distinct layers to provide a holistic view of performance:
- Hardware Tier: Testing across various GPUs (V100, T4, P4, etc.) and CPUs.
- Software Tier: Comparing serving infrastructures like TensorFlow Serving (TFS), NVIDIA Triton (TrIS), and FastAPI-based wrappers.
- Pipeline Tier: Decomposing the entire request lifecycle—from transmission and pre-processing to inference and post-processing—to find the true bottleneck.
To prevent benchmark jobs from interfering with each other and to speed up the process, we implemented a two-tier scheduler consisting of a "Queue-Aware" load balancer and a "Shortest-Job-First" local scheduler. This approach achieved a 1.43x speedup in job completion time compared to standard round-robin approaches.
Key Insights and Results
Our comprehensive evaluations revealed several critical trade-offs in DL serving:
- Software Stack Sensitivity: NVIDIA’s Triton (TrIS) significantly outperformed TensorFlow Serving in handling concurrent requests but suffered from a much longer "cold start" time (over 10 seconds), which is critical for serverless applications.
- Hyper-parameter Impact: CNN utilization scales well with both batch size and depth, whereas Transformers are much more sensitive to model depth regarding GPU resource consumption.
- The Hidden Cost of Transmission: In mobile scenarios (e.g., 4G LTE), the time spent sending data to the cloud can be comparable to the inference time itself. Optimizing the model is ineffective if the network bottleneck remains unaddressed.
- Cost vs. Performance: While powerful GPUs like the V100 are expensive, they can be more cost-effective per request than cheaper cards if the batch size is high enough to maximize throughput. However, large batch sizes significantly degrade tail latency (P95/P99), requiring developers to find a quantitative "sweet spot."
Conclusion
InferBench facilitates the deployment of DL models by automating the benchmarking process across hardware and software stacks. By providing in-depth evaluations, it serves as a valuable guideline for DL service configuration and resource allocation. Future work will focus on handling stochastic processing times and expanding the system to cover the "training-to-serving" transition more holistically.
Summary updated