Tail-Latency-Aware Execution Configuration for Edge AI under Resource Contention

Authors

  • Fengyuan Zhang New York University, New York, NY, USA
  • Jianbo Ding SonicWall, CA, USA

DOI:

https://doi.org/10.62051/aaecme29

Keywords:

Edge AI; Tail latency; Resource contention; Execution configuration; ONNX Runtime; Online adaptation.

Abstract

Edge AI services are increasingly deployed in single-vCPU execution slots—containers and microVMs that share one virtual core with data-collection, compression, and telemetry processes. In this setting, the latency measured on an idle device says little about the latency under contention: co-located programs and request bursts produce occasional long delays that dominate the p95/p99 tail. This paper studies how the execution configuration of an inference runtime—the intra-op thread count, the concurrency cap, and the thread-wait policy—should be selected online to keep response times stable while model weights, precision, and input size remain fixed. A measurement study on ONNX Runtime with MobileNetV2 and ResNet-18 shows that no static configuration is adequate: spin-waiting reduces throughput by 1.6–3.7×, fair-share scheduling cuts the capacity of the framework default to one half or one third under co-runners, and the concurrency that restores capacity under contention inflates the quiet-state service time about fourfold. We present TASC, a tail-aware selector of execution configurations that profiles a Pareto-pruned candidate set offline, estimates the external runnable load from per-thread scheduler statistics with explicit compensation for the service’s own threads, predicts the p99 response time of every candidate from backlog, burstiness, and profiled service-time distributions, and switches under a switching-cost-aware asymmetric hysteresis. In open-loop experiments driven by production Azure arrival traces, real ImageNet payloads, and real co-located programs, TASC is the most robust of four policies across eight model–scenario combinations: its p99 latency stays within 1.15× of the per-combination best (best static configuration: 1.44×, threshold rule: 1.52×, framework default: 7.33×), it lowers the p99 latency by up to 6.4× relative to the default, and its controller consumes about 0.25% of the CPU.

Downloads

Download data is not yet available.

References

[1] Zhou, Z., Chen, X., Li, E., Zeng, L., Luo, K., & Zhang, J. (2019). Edge intelligence: Paving the last mile of artificial intelligence with edge computing. Proceedings of the IEEE, 107(8), 1738–1762. DOI: https://doi.org/10.1109/JPROC.2019.2918951

[2] Agache, A., Brooker, M., Iordache, A., Liguori, A., Neugebauer, R., Piwonka, P., & Popa, D.-M. (2020). Firecracker: Lightweight virtualization for serverless applications. In Proceedings of the 17th USENIX Symposium on Networked Systems Design and Implementation (NSDI) (pp. 419–434).

[3] Dean, J., & Barroso, L. A. (2013). The tail at scale. Communications of the ACM, 56(2), 74–80. DOI: https://doi.org/10.1145/2408776.2408794

[4] ONNX Runtime. (n.d.). Thread management. ONNX Runtime documentation. https://onnxruntime.ai/docs/performance/tune-performance/threading.html

[5] Crankshaw, D., Wang, X., Zhou, G., Franklin, M. J., Gonzalez, J. E., & Stoica, I. (2017). Clipper: A low-latency online prediction serving system. In Proceedings of the 14th USENIX Symposium on Networked Systems Design and Implementation (NSDI) (pp. 613–627).

[6] Gujarati, A., Karimi, R., Alzayat, S., Hao, W., Kaufmann, A., Vigfusson, Y., & Mace, J. (2020). Serving DNNs like Clockwork: Performance predictability from the bottom up. In Proceedings of the 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI) (pp. 443–462).

[7] Romero, F., Li, Q., Yadwadkar, N. J., & Kozyrakis, C. (2021). INFaaS: Automated model-less inference serving. In Proceedings of the USENIX Annual Technical Conference (ATC) (pp. 397–411).

[8] Zhang, C., Yu, M., Wang, W., & Yan, F. (2019). MArk: Exploiting cloud services for cost-effective, SLO-aware machine learning inference serving. In Proceedings of the USENIX Annual Technical Conference (ATC) (pp. 1049–1062).

[9] Mars, J., Tang, L., Hundt, R., Skadron, K., & Soffa, M. L. (2011). Bubble-Up: Increasing utilization in modern warehouse scale computers via sensible co-locations. In Proceedings of the 44th IEEE/ACM International Symposium on Microarchitecture (MICRO) (pp. 248–259). DOI: https://doi.org/10.1145/2155620.2155650

[10] Lo, D., Cheng, L., Govindaraju, R., Ranganathan, P., & Kozyrakis, C. (2015). Heracles: Improving resource efficiency at scale. In Proceedings of the 42nd ACM/IEEE Annual International Symposium on Computer Architecture (ISCA). DOI: https://doi.org/10.1145/2749469.2749475

[11] Chen, S., Delimitrou, C., & Martínez, J. F. (2019). PARTIES: QoS-aware resource partitioning for multiple interactive services. In Proceedings of the 24th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS) (pp. 107–120). DOI: https://doi.org/10.1145/3297858.3304005

[12] Lozi, J.-P., Lepers, B., Funston, J., Gaud, F., Quéma, V., & Fedorova, A. (2016). The Linux scheduler: A decade of wasted cores. In Proceedings of the 11th European Conference on Computer Systems (EuroSys). DOI: https://doi.org/10.1145/2901318.2901326

[13] McCalpin, J. D. (1995). Memory bandwidth and machine balance in current high performance computers. IEEE Computer Society Technical Committee on Computer Architecture (TCCA) Newsletter, 19–25.

[14] Karlin, A. R., Li, K., Manasse, M. S., & Owicki, S. (1991). Empirical studies of competitive spinning for a shared-memory multiprocessor. In Proceedings of the 13th ACM Symposium on Operating Systems Principles (SOSP) (pp. 41–55). DOI: https://doi.org/10.1145/121132.286599

[15] Allen, A. O. (1990). Probability, statistics, and queueing theory with computer science applications (2nd ed.). Academic Press.

[16] Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., & Chen, L.-C. (2018). MobileNetV2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 4510–4520). DOI: https://doi.org/10.1109/CVPR.2018.00474

[17] He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 770–778). DOI: https://doi.org/10.1109/CVPR.2016.90

[18] Patel, P., Choukse, E., Zhang, C., Shah, A., Goiri, Í., Maleki, S., & Bianchini, R. (2024). Splitwise: Efficient generative LLM inference using phase splitting. In Proceedings of the 51st ACM/IEEE Annual International Symposium on Computer Architecture (ISCA) (pp. 118–132). DOI: https://doi.org/10.1109/ISCA59077.2024.00019

[19] Schroeder, B., Wierman, A., & Harchol-Balter, M. (2006). Open versus closed: A cautionary tale. In Proceedings of the 3rd USENIX Symposium on Networked Systems Design and Implementation (NSDI) (pp. 239–252).

[20] Zhang, Y., Meisner, D., Mars, J., & Tang, L. (2016). Treadmill: Attributing the source of tail latency through precise load testing and statistical inference. In Proceedings of the 43rd ACM/IEEE Annual International Symposium on Computer Architecture (ISCA) (pp. 456–468). DOI: https://doi.org/10.1109/ISCA.2016.47

[21] Mendoza, D., Romero, F., Li, Q., Yadwadkar, N. J., & Kozyrakis, C. (2021). Interference-aware scheduling for inference serving. In Proceedings of the 1st Workshop on Machine Learning Systems (EuroMLSys) (pp. 80–88). DOI: https://doi.org/10.1145/3437984.3458837

[22] Pusukuri, K. K., Gupta, R., & Bhuyan, L. N. (2011). Thread reinforcer: Dynamically determining number of threads via OS level monitoring. In Proceedings of the IEEE International Symposium on Workload Characterization (IISWC) (pp. 116–125). DOI: https://doi.org/10.1109/IISWC.2011.6114208

[23] Kang, Y., Hauswald, J., Gao, C., Rovinski, A., Mudge, T., Mars, J., & Tang, L. (2017). Neurosurgeon: Collaborative intelligence between the cloud and mobile edge. In Proceedings of the 22nd International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS) (pp. 615–629). DOI: https://doi.org/10.1145/3037697.3037698

[24] Zhang, L. L., Han, S., Wei, J., Zheng, N., Cao, T., Yang, Y., & Liu, Y. (2021). nn-Meter: Towards accurate latency prediction of deep-learning model inference on diverse edge devices. In Proceedings of the 19th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys) (pp. 81–93). DOI: https://doi.org/10.1145/3458864.3467882

[25] Wang, M., Ding, S., Cao, T., Liu, Y., & Xu, F. (2021). AsyMo: Scalable and efficient deep-learning inference on asymmetric mobile CPUs. In Proceedings of the 27th Annual International Conference on Mobile Computing and Networking (MobiCom) (pp. 215–228). DOI: https://doi.org/10.1145/3447993.3448625

[26] Sang, Q., He, P., Liang, H., Gong, Y., Hu, C., Zhou, X., & Cheng, D. (2026). Unleash all cores: Asymmetry-aware scalable DNN inference on mobile CPUs. In Proceedings of the USENIX Symposium on Operating Systems Design and Implementation (OSDI).

[27] Kasture, H., & Sanchez, D. (2016). TailBench: A benchmark suite and evaluation methodology for latency-critical applications. In Proceedings of the IEEE International Symposium on Workload Characterization (IISWC) (pp. 1–10). DOI: https://doi.org/10.1109/IISWC.2016.7581261

[28] Zhang, H., Ge, Y., Zhao, X., & Wang, J. (2025). Hierarchical deep reinforcement learning for multi-objective integrated circuit physical layout optimization with congestion-aware reward shaping. IEEE Access, 13, 162533–162551. DOI: https://doi.org/10.1109/ACCESS.2025.3610615

Downloads

Published

23-11-2026