Machine Learning Based Thread Pool Tuning via Program Analysis

L. Akash, Duneesha Fernando, Malith Jayasinghe, Chamath Keppitiyagama, Kishanthan Thangarajah · 2021

Intelligent tuning of parameters affecting performance can improve the performance of applications thereby improving the user experience. In this paper, we present a methodology which estimates the optimal thread pool size for an API integration during compile time by parsing its Abstract Syntax Tree (AST). Towards this, we trained 4 Machine Learning (ML) models using performance data and program features extracted by parsing the AST, and then used the models to estimate the optimal thread pool size. Out of the evaluated ML models; Random Forest Regression (RFR) provides 7.78%, 1.29 and 0.87 as MAPE, MSE and MAE values respectively, which correspond to highly accurate forecasts. Decision Tree and Extreme Gradient Boost (XGBoost) models also provide highly accurate forecasts. The optimal thread pool size predicted by our approach results in a lower average latency for a given API integration. For certain use cases, we achieve a latency improvement of 36% compared to the latency obtained when analytical models are used.

Read the paper · More papers on PaperTik