Evaluating the Impact of Server-Side Batching on Inference Performance of CNN Architectures: A Comparative Study Using TensorFlow Serving
DOI:
https://doi.org/10.61173/rger7h76Keywords:
Convolutional neural network, TensorFlow serving, flower classificationAbstract
This study investigates the deployment and performance evaluation of Convolutional Neural Network (CNN) models for image classification using TensorFlow Serving. Four pretrained models—including ResNet-50, InceptionV3, and MobileNetV2—as well as two custom CNN models were implemented and served in Docker containers. Each model was tested under two batching configurations: no batching and batching with a size of two. Server-side batching was managed through a custom configuration file, and inference performance was measured using a concurrent client setup with 10 threads. A primary focus of this project was on the ResNet-50 model, which was initialized with ImageNet weights and fine-tuned on the tf_flowers dataset. The training process followed a two-stage approach: initial training of the classification head with frozen base layers, followed by fine-tuning of deeper layers to enhance generalization. The model was exported in SavedModel format and deployed for testing. Experimental results show a clear trade-off between latency and throughput across different models and batching strategies. Batching improved throughput in most cases but occasionally increased per-request latency. This study highlights the importance of choosing suitable batching strategies based on specific application requirements, offering insights into optimizing CNN-based image classifiers for real-world deployment scenarios.
References
[1] He K, Zhang X, Ren S, Sun J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016: 770–778.
[2] Szegedy C, Vanhoucke V, Ioffe S, Shlens J, Wojna Z. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016: 2818–2826.
[3] Sandler M, Howard A, Zhu M, Zhmoginov A, Chen LC. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018: 4510–4520.
[4] Olston C, Fiedel N, Gorovoy K, Harmsen J, Lao L, Li F, Rajashekhar V, Ramesh S, Soyke J. Tensorflow-serving: Flexible, high-performance ML serving. arXiv preprint arXiv:1712.06139, 2017.
[5] TensorFlow Datasets. “tf_flowers Dataset.” Available online: https://www.tensorflow.org/datasets/catalog/tf_flowers, 2019.
[6] Li Z, Liu F, Yang W, Peng S, Zhou J. A survey of convolutional neural networks: Analysis, applications, and prospects. IEEE Transactions on Neural Networks and Learning Systems, 2021, 33(12): 6999–7019.
[7] Wu J. Introduction to convolutional neural networks. National Key Lab for Novel Software Technology, Nanjing University, 2017, 5(23): 495.
[8] Ajit A, Acharya K, Samanta A. A review of convolutional neural networks. In 2020 International Conference on Emerging Trends in Information Technology and Engineering (ic-ETITE), 2020: 1–5.
[9] Mannor S, Peleg D, Rubinstein R. The cross entropy method for classification. In Proceedings of the 22nd International Conference on Machine Learning, 2005: 561–568.
[10] Mao A, Mohri M, Zhong Y. Cross-entropy loss functions: Theoretical analysis and applications. In International Conference on Machine Learning, 2023: 23803–23828.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 by the authors.

This work is licensed under a Creative Commons Attribution 4.0 International License.
