Packrat: Automatic Reconfiguration for Latency Minimization in CPU-based DNN Serving
Bhardwaj, Ankit, Phanishayee, Amar, Narayanan, Deepak, Tarta, Mihail, Stutsman, Ryan
–arXiv.org Artificial Intelligence
In this paper, we investigate how to push the performance limits of serving Deep Neural Network (DNN) models on CPU-based servers. Specifically, we observe that while intra-operator parallelism across multiple threads is an effective way to reduce inference latency, it provides diminishing returns. Our primary insight is that instead of running a single instance of a model with all available threads on a server, running multiple instances each with smaller batch sizes and fewer threads for intra-op parallelism can provide lower inference latency. However, the right configuration is hard to determine manually since it is workload- (DNN model and batch size used by the serving system) and deployment-dependent (number of CPU cores on server). We present Packrat, a new serving system for online inference that given a model and batch size ($B$) algorithmically picks the optimal number of instances ($i$), the number of threads each should be allocated ($t$), and the batch sizes each should operate on ($b$) that minimizes latency. Packrat is built as an extension to TorchServe and supports online reconfigurations to avoid serving downtime. Averaged across a range of batch sizes, Packrat improves inference latency by 1.43$\times$ to 1.83$\times$ on a range of commonly used DNNs.
arXiv.org Artificial Intelligence
Nov-29-2023
- Country:
- Asia
- China > Shanghai
- Shanghai (0.04)
- India > Maharashtra
- Mumbai (0.04)
- Japan > Honshū
- Kantō > Tokyo Metropolis Prefecture > Tokyo (0.04)
- Middle East > Jordan (0.04)
- China > Shanghai
- Europe
- Austria > Vienna (0.14)
- Ireland > Leinster
- County Dublin > Dublin (0.04)
- Italy > Calabria
- Catanzaro Province > Catanzaro (0.04)
- North America
- Canada > Ontario (0.04)
- United States
- New York > New York County
- New York City (0.04)
- California
- Los Angeles County > Long Beach (0.04)
- Monterey County > Pacific Grove (0.04)
- San Diego County > Carlsbad (0.04)
- San Francisco County > San Francisco (0.14)
- Santa Clara County > Santa Clara (0.04)
- Washington > King County
- Georgia
- Chatham County > Savannah (0.04)
- Fulton County > Atlanta (0.04)
- Colorado > Broomfield County
- Broomfield (0.04)
- Massachusetts > Suffolk County
- Boston (0.04)
- Utah (0.04)
- Texas > Dallas County
- Dallas (0.04)
- Nevada > Clark County
- Las Vegas (0.04)
- New York > New York County
- Asia
- Genre:
- Research Report (0.64)
- Industry:
- Information Technology (0.93)
- Technology: