arXiv:2609.03457cs.LGSep 2026

Manuscript Offprint

arXiv:2609.03457

A Two-Stage Forecasting System for CPU Workload Prediction in Private Clouds

Ashir Javeed, Anton Borg, Håkan Grahn, Lars Lundberg, Dhyey Patel, Sogand Shirinbab

Abstract

Accurate cloud resource forecasting is essential for proactive resource provisioning, maintaining Quality of Service (QoS), and reducing operational costs in dynamic cloud environments. The existing forecasting approaches predominantly estimate future CPU workload directly from historical resource traces, which often overlook the relationship between customer service demand and subsequent resource consumption. This study proposes a two-stage integrated forecasting model that explicitly models this dependency by first forecasting customer service requests, expressed as Transactions Per Second (TPS), and subsequently estimating future CPU workload from the TPS forecast. Both the forecasting component and resource prediction component employed the XGBoost model within a cascaded learning architecture, complemented by adaptive online retraining using an expanding-window strategy to address concept drift in continuously evolving cloud workloads. The proposed work was evaluated using real-world traces collected from a private cloud environment comprising ten applications. Experimental results demonstrate robust forecasting performance by achieving Symmetric Mean Absolute Percentage Error (SMAPE) below 7% for most applications, with the best-performing application achieving an MAE of 0.7372, RMSE of 1.1866, SMAPE of 3.57%, and an R2R^2 of 0.9185. Horizon-wise drift analysis confirmed stable recursive forecasting behavior with controlled error accumulation across a 60-step prediction horizon. Compared with the conventional direct CPU forecasting method, the newly developed two-stage integrated model gives improved forecasting robustness, computational efficiency, and interpretability, making it well-suited for proactive resource management and intelligent auto-scaling in cloud computing environments.

*Corresponding author. Email: anton.borg@bth.se

i

1 Introduction

Cloud computing has experienced tremendous growth in recent years, driven by lower operating costs and increased productivity [1]. The recent advancements in artificial intelligence (AI) and Big data also contribute to the steadily rising demand for cloud computing, as these technologies require significant computational resources [2]. To maintain the Quality of Service (QoS), cloud service providers should allocate and manage computing resources efficiently while respecting energy and sustainability factors. Over-provisioning of cloud resources costs in terms of energy waste, and under-provisioning affects QoS [3]. Therefore, cloud computing resources such as processing (CPU) power, memory, and storage should be allocated efficiently to meet cloud customers' needs and energy. Consequently, maintaining smooth cloud operations and efficiency requires accurate forecasting of future demand for cloud resources.

Cloud service providers rely on workload forecasting to proactively allocate computing resources and maintain QoS under dynamic workload conditions [4]. In this regard, historical data can be utilized for building a predictive model for forecasting an estimated demand of computing resources such as CPU, storage, memory, and network bandwidth for future needs. However, accurately estimating future demand for computing resources is not an easy task because workload in data centers is highly dynamic and rapidly changing for demanded resources. For instance, 5% to 80% variation in cloud workload is observed in Alibaba cloud datacentres [5]. Similar variation in cloud workload is also studied in this study, where data is obtained from a private cloud services provider company. Developing an efficient method that can accurately address high variance in cloud resource demand requires an in-depth understanding and knowledge of workload patterns [6]. Through acquired knowledge, we can construct an algorithm that is robust and precise for forecasting the future workload of the cloud.

Generally, cloud data is sequential in nature and collected over time, which turns resource forecasting into a time-series problem [7]. Therefore, researchers have utilized statistical methods such as the ARIMA model and machine learning models, including linear regression, decision, and most recent methods based on deep learning, such as recurrent neural network (RNN) and Long Short-Term Memory (LSTM), to deal with the problem as a time series task [8, 9]. These models successfully predict future cloud workload, but they do not account for the uncertainty of such forecasts due to limited data on cloud customer behavior. Furthermore, few studies in the literature considered the factor of services requested by the cloud customers for future workload forecasting [10, 11, 12]. Additionally, forecasting resource requirements across cloud applications based on customer demand remains a challenge for cloud researchers. Moreover, the presence of high fluctuations across different services based on customers' demand at various time-steps, and their impact on cloud resources such as CPU utilization in the future, poses a significant challenge for accurate forecasting of future resource (CPU). Hence, there is a need for a mechanism that accounts for customer service requests at a given time step for a particular cloud application

ii and accurately forecasts the future resources needed to handle customer demand. Existing forecasting methods directly model future CPU utilization from historical CPU traces. However, CPU consumption is primarily a downstream consequence of incoming service demand. Ignoring this causal dependency limits forecasting robustness under highly dynamic cloud workloads.

To overcome these limitations, this study proposes a two-stage integrated forecasting system for proactive CPU resource prediction in cloud environments. We build on our previous work [10], where customer requests were used as input features to train a machine learning model for CPU workload prediction in cloud applications. In the present study, a dedicated forecasting model is developed to predict future customer requests, which are subsequently utilized as input features for downstream CPU workload estimation. The integration of the CPU model with the forecasting model provides a comprehensive understanding of feature (customer requests) interactions over time, thereby enhancing the model's forecasting capabilities. Contrary to computationally expensive deep sequential forecasting architectures such as LSTM and Transformer-based forecasting models [8], the proposed XGBoost-based framework supports lightweight adaptive learning with lower retraining overhead and faster inference for streaming cloud environments. The contributions and findings of our work are summarised as follows:

  • The study presents an integrated forecasting system that models customer service requests and downstream CPU utilization in two sequential learning stages.
  • Developed a TPS-driven forecasting mechanism that captures workload dynamics prior to CPU estimation for proactive cloud resource management.
  • Adaptive online retraining and rolling maximum (Rolling_Max) smoothing were integrated into the proposed system to enhance forecasting stability under highly dynamic cloud computing workloads.
  • Demonstrated computationally efficient forecasting using XGBoost-based learning suitable for lightweight streaming deployment.
  • Validated the proposed system using real-world private cloud traces and showed improved forecasting accuracy and robustness compared with conventional forecasting approaches.

The rest of the study is structured as follows. Section 2 presents related work. Section 3 presents the methodology. The experimental results and the statistical analysis are elaborated in Section 4. Section 5 provides a detailed discussion of the given work. Finally, Section 6 presents the conclusion.

iii

References (17)