# Profit-Efficient Elastic Allocation of Cloud Resources Using Two-Stage Adaptive Workload Prediction
## 6 Performance Evaluation
### Resource Allocation Performance Evaluation  
To evaluate the VM allocation performance of the MaxCSPR algorithm, the parameters were set as follows: \(m=36,000\), average task execution time = 5 ms (i.e., the processing ability of the VM was 1000 MIPS (million instructions per second, MIPS) and the average task instruction length was 5 million instructions), maximum allowed processing time of the task = 100 ms, and maximum system load = 90%. According to the AWS price list, the rental cost of a VM was set as 1.1279 RMB/h, and the profit of a task was 0.00001. Based on the ergodic process and the definition of the Poisson distribution, the task arrival rate of each \(\Delta_{\tau}\) was calculated using Equations (20) and (21). The task arrival number was generated from the Poisson distribution according to the task arrival rate.  
First, we compared the performance of the MaxCSPR algorithm with that of other algorithms. Generally, the on-demand and elastic allocation of cloud resources improves task processing and QoS; for example, this was the case for the algorithms presented in [46]. These resource allocation and scheduling algorithms, which take the QoS guarantee as  
Figure 23: Binary classification neural network outputs with the original data.  
Figure 22: Binary classification neural network outputs with the first-order gradient feature.  
a target, can be called QoS guarantee (QoS-G) algorithms. To evaluate the service loss (S.Loss), system load (S.Load), and service delay (S.Delay) in the MaxCSPR algorithm, we compared the performance of MaxCSPR and QoS-G, as shown in Figures 24-26.  
According to Figure 24, the QoS-G algorithm takes the QoS guarantee of the tasks as the target and does not consider the best match between the number of VMs and task profit, while MaxCSPR takes the minimum cloud service loss as the target; thus, MaxCSPR can minimize the cloud service loss. Therefore, MaxCSPR can improve the profit of the cloud service.  
Figure 25 shows that MaxCSPR minimizes the cloud service loss as the target and considers the system stability (i.e., the upper limit of the VM system load); thus, MaxCSPR can guarantee that the cloud server load is lower than the required upper cloud server load limit (90%), which guarantees system stability.  
According to Figure 26, although QoS-G can guarantee the QoS of the task (i.e., the average task delay is lower than 100 ms), QoS-G does not consider the stability of the VM system. Therefore, the VM system load of QoS-G may be higher than 90%, which can lead to VM overloading or software errors. Additionally, Figure 25 shows that the average task delay of QoS-G is higher than that of MaxCSPR. This is because MaxCSPR not only considers the QoS of the task, but also the stability of the VM system. Thus, MaxCSPR can guarantee that the VM system load does not exceed the allowed upper system load and allocates the optimal number of VMs in the cloud center to avoid an overload of tasks to be processed by a few VMs. However, QoS-G only considers the QoS of the task. Therefore, if the VM can satisfy the average delay requirement for tasks, these tasks will be scheduled to a few VMs, increasing the average task delay compared to MaxCSPR.  
Overall, MaxCSPR can guarantee the system's stability and the QoS of the task better than QoS-G. Importantly, MaxCSPR can improve the profit of the cloud service, which proves the effectiveness of design requirements and theoretical analysis.