Predicting CPU and Memory Usage in Code Execution Using Machine Learning Models

Efficient management of CPU time and memory usage is essential in software development for optimizing performance and resource allocation. This paper focuses on using the XGBoost model to predict these metrics, comparing its performance with Decision Tree, GBDT, and LightGBM. The dataset, sourced from Project CodeNet, was preprocessed to handle missing data and scale features. We evaluated each model's performance with and without hyperparameter tuning. Results indicate that XGBoost outperformed other models in terms of MAE and <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$R^{2}$</tex> values for both CPU time and memory consumption predictions. While the Decision Tree model showed improvement, especially in CPU time prediction after tuning, and GBDT performed reasonably well, neither matched the predictive power of XGBoost. LightGBM, on the other hand, showed weaker performance across tasks. Our findings highlight the importance of hyperparameter tuning for performance enhancement. Future work could explore advanced feature engineering, deep learning methods, and ensemble strategies. Testing these models on other datasets could also validate their generalizability, with more interpretable models offering valuable insights from the predictions.

Authors

Institutions

Publication Details

Published
2024-12-27
DOI
https://doi.org/10.1109/auteee62881.2024.10869647
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Predicting CPU and Memory Usage in Code Execution Using Machine Learning Models

X. Zhu, Yi Yang
Parallel Computing and Optimization Techniques
article

Predicting CPU and Memory Usage in Code Execution Using Machine Learning Models

X. Zhu, Yi Yang
article en

Abstract

Efficient management of CPU time and memory usage is essential in software development for optimizing performance and resource allocation. This paper focuses on using the XGBoost model to predict these metrics, comparing its performance with Decision Tree, GBDT, and LightGBM. The dataset, sourced from Project CodeNet, was preprocessed to handle missing data and scale features. We evaluated each model's performance with and without hyperparameter tuning. Results indicate that XGBoost outperformed other models in terms of MAE and <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$R^{2}$</tex> values for both CPU time and memory consumption predictions. While the Decision Tree model showed improvement, especially in CPU time prediction after tuning, and GBDT performed reasonably well, neither matched the predictive power of XGBoost. LightGBM, on the other hand, showed weaker performance across tasks. Our findings highlight the importance of hyperparameter tuning for performance enhancement. Future work could explore advanced feature engineering, deep learning methods, and ensemble strategies. Testing these models on other datasets could also validate their generalizability, with more interpretable models offering valuable insights from the predictions.

Lancaster University (GB), Lanzhou University (CN)
Openalex Percentile: Top 70%
Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.