^{1}

^{1}

^{*}

In a cloud computing environment, users using the pay-as-you-go billing model can relinquish their services at any point in time and pay accordingly. From the perspective of the Cloud Service Providers (CSPs), this is not beneficial as they may lose the opportunity to earn from the relinquished resources. Therefore, this paper tackles the resource assignment problem while considering users relinquishment and its impact on the net profit of CSPs. As a solution, we first compare different ways to predict user behavior (i.e. how likely a user will leave the system before its scheduled end time) and deduce a better prediction technique based on linear regression. Then, based on the RACE (Relinquishment-Aware Cloud Economics) model proposed in [ 1], we develop a relinquishment-aware resource optimization model to estimate the amount of resources to assign on the basis of predicted user behavior. Simulations performed with CloudSim show that cloud service providers can gain more by estimating the amount of resources using better prediction techniques rather than blindly assigning resources to users. They also show that the proposed prediction-based resource assignment scheme typically generates more profit for a lower or similar utilization.

Cloud computing is known as the most widespread paradigm of distributed and parallel computing. The core feature of cloud computing is to provide reliable and consistent services to users. Users request services from the Cloud Service Providers (CSPs) with certain requirements and deadlines. The prices for these services are negotiated and then finalized into a Service Level Agreement (SLA) [

The basic advantage for a user to use the computing resources in the form of a service from a CSP is the pay-as-you-go model [

In addition, the arrival rate of users varies throughout the day, leading to variable server utilization. For example, servers may be over-provisioned during peak hours or under-provisioned during non-peak hours. Likewise, when a user relinquishes, the server remains idle until the next request arrives. This idle time could be utilized better (by being assigned to other requests, for instance) if the provider can accurately guess when the user may potentially relinquish [

Moreover, user behavior also plays an important part and varies along with the varying arrival rate of the users. Here, the term user behavior refers to how likely the user will be to relinquish the requested cloud services. Therefore, for optimal assignment of resources, CSPs must be aware of user behavior by predicting the duration for which they may use the service. To deal with this, various algorithms have been proposed to predict user behavior by simply computing an average based on the user history [

Based on the problems discussed above, the goal of this paper is to work in the subtle stream of interdisciplinary research between computer science and economics. More precisely, we:

• Propose a new technique based on linear regression to predict user behavior. Compared to other available methods (such as [

• Propose a new mathematical model to optimally assign resources so that the net profit of cloud providers can be maximized. The novelty of the model is that it considers historical user behavior when making a decision, while maintaining the market value of the provider by entertaining the maximum number of users requesting resources. The model combines the technical and economical aspects of resource management in cloud computing;

• Compare various existing resource assignment schemes and show that the best results are obtained with the proposed model.

The rest of the paper is organized as follows. In Section 2, we review the related work. Then, we present the implementation of linear regression to predict the user behavior in Section 3 followed by the proposed optimization model in Section 4. The experimental results are shown in Section 5 and finally, the paper is concluded in Section 6.

With the emergence of cloud computing, the resource pool has expanded, but is still limited since it must be shared by multiple users at once. No matter which type of cloud is deployed, efficient resource management strategies are needed to harness the power of the underlying resource pool of the cloud [

A. Resource management in clouds using various prediction techniques

The study of Farahnakian et al. [

Several researchers have used prediction techniques to estimate the amount of resources to be dynamically allocated. For example, Aazam et al. [

Putting more weight on the same idea of [

Sadeka et al. [

B. Resource management schemes for batch workloads

The authors in [

C. Concluding remarks

Different resource management schemes for predicting the workload were discussed in the previous sub-sections however, most of the work amongst them is done for predicting the collective workload on the system. Furthermore, the resource management techniques using batch processing do not carry out prediction of user behavior to allocate resources. Instead, most of the researchers worked in the area of scheduling the jobs after the batch is processed. Additionally, the techniques using the batch workload showed an increase in CSPs profits by scaling the resources. However, none of the approaches increased the profit by considering the finite capacity environment of a CSP. Therefore, it becomes necessary to propose a resource management mechanism which maximizes the net profit in a finite capacity environment. This is the focus of attention for this paper along with the objective of maintaining the market value by maximizing the number of users to be processed in each batch, All in all, none of the existing works have dealt with all the aspects of the problems of concern of our study.

Many researchers have focused on the allocation problem while considering various aspects such as VM migration [

Linear regression [

Two methods can be used to make predictions, namely the gradient descent and the normal equation method. The gradient descent method is generally used when there are multiple features and a large history (>100 k) [

In this section, a mathematical model is proposed to optimize the net profit of cloud providers in an environment where users can leave the system at any point in time. The model is derived from the RACE (Relinquishment-Aware Cloud Economics) model that was published in [

To formulate the mathematical model, we assume the following:

• Users are able to determine and specify the amount of resources required to process and complete their jobs.

• Cloud providers store information about the behavior of their users over time. This information is used to calculate the relinquish probability.

• Cloud providers know, in real-time, the remaining amount of resources (i.e. the remaining capacity), the amount of power used by their servers and the price of electricity in their region.

In the following sections, we present the notation, derive the profit function, and present the objective function and the constraints of the model.

A. Notation

1) Sets

• J, set of all resource types j where j ∈ J .

• N, set of users in a given batch where n ∈ N . It is assumed that users collectively arrive into the system and are divided into batches.

• L, set of geographical locations for the data centers in a cloud federation where l ∈ L .

2) Constants

• p j , price for service j ∈ J .

• C l , unit price of electricity at location l ∈ L in $/kWh.

• P l , power used to operate all the servers at location l ∈ L when fully utilized.

• V, remaining capacity of the cloud when an incoming batch is processed.

3) Input Parameters

• R j n , amount of resources requested by user n ∈ N for service j ∈ J .

• r n , predicted value of the relinquish probability for user n (done through linear regression as discussed in the previous section).

• D n , requested duration by user n.

4) Decision Variables

• a j n , amount of allocated resources for service j ∈ J to user n ∈ N of the batch.

• x j n , binary variable such that x j n = 1 if and only if user n ∈ N in the batch is allocated resources for service j ∈ J , otherwise x j n = 0 if the request is not processed.

B. Objective Function

The aim of the objective function is to maximize the net profit by allocating the optimal amount of resources while considering the current available capacity of the resource pool, the relinquish probability, and the arrival rate of the requests. The objective function is first divided into three different parts: income, electricity expenses and relinquishment loss.

The first term of the objective function, shown in Equation (3), calculates the expected income generated by user n. When users arrive, they request resources for a specific duration D n . At the same time, the cloud provider will look at the history of the users and will predict their relinquish probability ( r n ). Then, the users will be assigned ressources ( a j n ) and will be charged according to the price of ressources ( p j ).

I n c o m e n = ∑ j ∈ J p j ( 1 − r n ) D n a j n (1)

The second term, shown in Equation (2), represents the electricity expenses generated by user n ( E E n ) for the utilized duration D n ( 1 − r n ) and the idle duration D n r n . Both are calculated based on the predicted relinquish probability.

E E n = ∑ l ∈ L C l P l ( ∑ j ∈ J ( D n ( 1 − r n ) u j n + 2 3 D n r n ( 1 − u j n ) ) ) (2)

where

u j n = a j n totalresources (3)

The third term, shown in Equation (4), calculates the relinquishment loss for a given user ( R L n ). The model uses the predicted relinquish probability to calculate the relinquishment loss for the duration ( r n ⋅ D n ) i.e. the duration for which the user would not use the service.

R L n = ∑ j ∈ J D n p j a j n r n (4)

Hence, the overall profit function for a given user n, denoted P ( r ) n , can be represented as:

P ( r ) n = I n c o m e n − E E n − R L n (5)

Moreover, to maintain a good reputation, cloud providers always want to process the maximum number of user requests. Therefore, an additional function is added to reflect this objective. In conclusion, the final objective function, shown in Equation (6), simultaneously maximizes the profit and the number of requests served.

max ( ∑ n ∈ N ( P ( r ) n + ∑ j ∈ J x j n ) ) (6)

C. Constraints

The objective function shown in Equation (6) is subject to different constraints expressed in Equations (7) to (9).

∑ n ∈ N a j n ≤ V ( j ∈ J ) (7)

a j n ≤ R j n ( j ∈ J , n ∈ N ) (8)

a j n ≥ β j ( x j n R j n ) ( j ∈ J , n ∈ N ) (9)

Equation (7) specifies that the sum of all allocated resources should be less than or equal to the remaining capacity of the system (V). Additionally, as we try to maximize profit, it is important not to overestimate the amount of resources. Therefore, Equation (8) specifies that the amount of allocated resources should be less than or equal to the requested amount of resources by the user. Moreover, since different services have different minimum requirements, Equation (9) ensures that at least the minimum amount of resources to run the service will be provided. In our work, and without loss of generality, we used β j = 0.2 although this value can be tuned to the requirements of the different services. A typical example could be a user requesting a 4 k videos. If, for any reasons (e.g. unreliable user, not enough remaining capacity, etc.), the algorithm decides to not allocate the requested amount of resources, then in order to be able to see the video, the user should at least get enough resourced to play the standard definition (SD) version (which requires less resources) of the video.

Based on the equations and the constraints mentioned above, the model finds the optimal amount of resources to be assigned ( a j n ) to each user in the batch. It is important to note that the calculations of the model are mainly dependent upon the predicted relinquish probabilities as all other input parameters such as the amount of requested resources, the duration and the arrival rate of users are kept constant.

In this section, we compare the performance of the proposed model against other models from the literature. The simulations of all the proposed algorithms were implemented in Java using the CloudSim toolkit [

A. Generating the workload

To investigate the effectiveness of all the models, we generate a synthetic workload. The most important input parameter to generate the workload is user behavior.

Operating System | Ubuntu 16.04 LTS |
---|---|

Processor | Intel i7 - 3.6 GHz |

Memory | 16 GB |

Simulator | CloudSim 4.0 |

Implementation Language | Java SE 7 |

are used to generate values using the normal distribution. Values greater than one are considered as 1 and values less than one are given the value 0.

Using ARPs to populate the history: A user can be a first-time user or could have used the service multiple times. In this study, the history length of each user is set between U ( 1,60 ) . The first-time users are treated as loyal users. For returning users, based upon the history length of each user (the number of time the user is returning for), the corresponding value of the user’s ARP is used as the mean for the normal distribution to populate the relinquish probabilities for each time the user relinquished. For example, if a user is returning for the 5th time and its ARP is 0.59, then using a mean of 0.59 and a standard deviation of 0.2, its usage history is populated for the last 4 times.

To check the reliability, the model is tested with different arrival rates of users. In this study, we assume that users submit requests based on the M/M/1 queuing model. The set of arrival rates (λ) used to test the models is {0.008, 0.016, 0.032, 0.064} req/sec. Hence, the interarrival times of the requests are generated randomly using the exponential distribution with mean E [ x ] = 1 / λ secs. For simplicity and without loss of generality, we assume that the user requests a single service type, that is, vCPU with a minimum of 500 GHz and a maximum of 900 GHz for a specific duration between the limit of 2 - 4 hours.

The input parameters used are user history, interarrival time of user requests, start time of the users, end time of the users, amount of requested resources by the users, requested duration by users and used duration by the users.

Arrival rate of users | 0.008, 0.016, 0.032, 0.064 |
---|---|

History length of users | U ( 1,60 ) |

Total size of resource pool | Fixed at 200k |

Power of server | 1 server of 525W |

Total duration | 25 hours |

Requested duration by user | U ( 2,4 ) hours |

Requested resources by user | U ( 500,900 ) |

Requested service type by user | vCPU |

On-demand price of service | CAD 0.1/hour |

Total no of users arrived | 750, 1450, 2700, 5500 |

Mean electricity price in Ontario in summers | CAD 0.132/kwh |

Schedule end time of a user | Sum of start time and requested duration of respective user |

Relinquish duration of a user | Relinquish probability times the actual requested duration. |

summarizes all the input parameters used during the simulations. The start time of the user is the time when the user begins using the resources and start getting charged for the service. The difference between two start times is the interarrival duration generated by the exponential distribution described earlier. The requested durations and the requested resources of the users are randomly generated within the limits stated in

B. Evaluation of various methods to predict relinquish probability

This section presents the comparison results of the various prediction techniques used to predict the user behavior given their history. The outcomes of this section will tell us which method can make better predictions about the user behavior. The prediction will let the provider know how long the user is going to use the allocated resources based on his history. To perform the evaluation, Java and Octave platforms were used to generate the scripts, data sets and carry out the calculations respectively.

In this section, we use linear regression and compare the results with the two methods mentioned in [

To evaluate the performance of the different methods, we used three user categories: loyal, disloyal and average. To simulate loyal, disloyal, and average users, different ARPs (0.3, 0.7 and 0.5 respectively) were used and the history was populated randomly using the normal distribution with these ARPs as mean and a standard deviation of 0.2. As illustrated in

History Length (m = 5) | Relinquish Probability |
---|---|

1 | 0.35 |

2 | 0.56 |

3 | 0.28 |

4 | 0.67 |

5 | 0.45 |

6 (m + 1) | To be predicted by LR |

To evaluate the prediction accuracy of the three methods, we compare the predicted value with the actual observed value from the user. When comparing the observed relinquish probability with the predicted relinquish probability, we can evaluate the accuracy of the various prediction methods. The observed relinquish probability is the real amount of resources that was used over the amount of resources that was initially requested. It can be seen that BaaS shows the biggest difference (around 20%, 25% and 20%) between the observed value and the predicted value for loyal, average and disloyal users respectively. This is because the authors use SOP and AOP for predicting the user behavior. Furthermore, to cope with changes in the behavior of users each time they return, the authors use the variance as an additional parameter, but this does not help in making the results more accurate. On the other hand, RP (which is the improved version of BaaS) is able to make better predictions with a difference of approximately 5%, 4% and 4% between the observed value and the predicted value for loyal, average and disloyal users respectively. Moreover, for small training sets (i.e. history lengths ≤ 20), the prediction method used in [

C. Selecting the batch size for the proposed optimization model

This section presents and discusses the experimental results of the relinquishment aware resource optimization model. This model is solved with IBM CPLEX [

• Processing time of a workload batch: The time required by the solver (CPLEX) to read the input data, generate the model, solve the model and produce the output in the form of decision variables.

• Number of users processed in a batch: This parameter gives us the percentage of users processed for the batch size under evaluation with the given capacity of resources.

The batch sizes used in this study are based upon the workload batch sizes used by other researchers. For example, the study that was done in [

was reduced by half to 4000 resources. Small and medium workloads performed the best in terms of percentage of users processed and time taken to process the batch. Whereas, the least percentage of users was processed in the large workload with a batch size of 80. This is because the system runs out of capacity for larger batch sizes as the sum of the requested resources by the entire batch greatly exceeds the available capacity. The reason for this is the set limits of the requested amount of resources for the user in

To summarize, the experimental results demonstrate that a batch size with five user requests performs better than all the other batch sizes under various remaining capacities. The objective of using different batch sizes under varying capacity was to figure out the optimal batch size which could be used for the simulations where users enter the system in an open stream and the remaining capacity is constantly updated. Therefore, a batch size of five will be used in the next section to assess the performance of the proposed optimization model and carry out the comparison between state-of-art algorithms.

D. Evaluation of the proposed optimization model versus state-of-art algorithms

To carry out the evaluation, the proposed optimization model was integrated into the DatacenterBroker class of CloudSim, along with all the scenarios mentioned in [

• In Scenario 1, users are assigned resources based on the service they requested. In other words, complex resource estimation is not required since users get exactly what they requested and they do not relinquish.

• Scenario 2 is similar to Scenario 1, except for the fact that users can relinquish before the scheduled end time.

• In Scenario 3, resources are assigned based on the BaaS method described in [

• In Scenario 4, resources are assigned based on the RP method mentioned in [

Furthermore, we term our proposed optimization model as Scenario 5. To compare Scenario 5 with the other four scenarios, all models were run for a specified duration of 25 hours. It can be noted that 25 hours is not the actual clock time but the pre-configured simulation time on CloudSim for which the models are compared at different arrival rates. The workload was generated using the same input parameters mentioned in

The host creates a virtual machine (step 5) which further processes the request from broker (step 6a) to assign the resources to the users (step 6b). It is important to note that before every batch is processed, the value of the current remaining capacity of the system is passed into the resource assignment module. It is also assumed that there is no processing delay experienced once the batch enters the system. The remaining capacity is then updated and users are blocked if the system is running at maximum capacity. Finally, the history of each user is updated with a new entry once the user leaves the system (step 7).

The major outcomes for the comparisons of the Average Overall Utilization (AOU) and the Overall Net Profit (ONP) are outlined in

In the next experiment, the arrival rate was doubled to λ = 0.016 req/sec and 1450 users entered the system in this case. From

Arrival Rate | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

λ = 0.008 | λ = 0.016 | λ = 0.032 | λ = 0.064 | |||||||||

AOU (%) | ONP (CAD) | P_{b} | AOU (%) | ONP (CAD) | P_{b} | AOU (%) | ONP (CAD) | P_{b} | AOU (%) | ONP (CAD) | P_{b} | |

Scenario 1 | 28.7 | 189 k | 0 | 57.7 | 357 k | 0 | 84.7 | 537 k | 0.4 | 88.2 | 545 k | 0.54 |

Scenario 2 | 17.4 | 108 k | 0 | 35.3 | 209 k | 0 | 68.7 | 418 k | 0 | 84.4 | 505 k | 0.4 |

Scenario 3 | 7.8 | 47 k | 0 | 15.7 | 94 k | 0 | 30.8 | 189 k | 0 | 59.2 | 370 k | 0 |

Scenario 4 | 14.7 | 91 k | 0 | 22.6 | 139 k | 0 | 41.2 | 251 k | 0 | 66.2 | 403 k | 0 |

Scenario 5 | 14.4 | 93 k | 0 | 28.3 | 177 k | 0 | 55.8 | 349 k | 0 | 85.1 | 512 k | 0.32 |

but the corresponding net profit varies due to users relinquishing their service.

Moreover, because of the high incoming stream of users (around 5500 in 25 hours), the available capacity remains contented most of the time as servers run at high utilization. Noticeably in

Thus, as per the deductions of [

As [

P b = Number of users blocked due to full capacity Total number of users arrived (10)

The blocking probabilities for all scenarios are outlined in

Since users can relinquish their service at any point in time, it is essential to have ways in which cloud providers can predict the behavior of users. Different ways were proposed in the literature but they were mainly using some sort of average based on the historical behavior of users. Seeing this, the idea was to figure out a better prediction technique such that CSPs could make accurate decisions while estimating the amount of resources to be allocated. As a result, we developed a prediction algorithm based on the concept of linear regression. Users with different usage behaviors (loyal, average and disloyal) were evaluated for different history lengths. The results showed that the technique based on linear regression outperformed all the user behavior prediction techniques proposed in the literature. Lastly, a relinquishment aware resource optimization model was also proposed to optimally estimate the amount of resources such that the net profit of CSPs can be maximized. The model uses the prediction results from the linear regression technique to make the optimal resource estimation. To carry out the experimental results, variable user batch sizes were tested for the processing times and the number of requests processed per batch. The performance analysis carried out in CPLEX depicts that a batch size of five user requests took the minimum processing time while processing the maximum percentage of requests per batch. Furthermore, the proposed optimization model is also compared against two algorithms from the literature. The simulations are implemented in CloudSim to carry out the comparison. The results of the simulations show that the optimization model generates the maximum profit when resource contention occurs at high user arrival rate.

To the best of our knowledge, since this study is unique, there are many issues that can be addressed to extend this work. Linear regression was modeled using only a single feature: relinquish probability. We believe that including additional features such as the profit generated from the users at each instance could potentially improve the performance of the linear regression algorithm. In this paper, the resource price of Amazon EC2 instance was used. In the future, the price of resources could also be predicted based upon the user history. This can further help CSPs to increase the net profit and compensate the relinquishment loss. Further, based upon the new pricing strategy, a reimbursement strategy can be added to have a complete pricing model.

The authors declare no conflicts of interest regarding the publication of this paper.

Singh, S. and St-Hilaire, M. (2020) Prediction-Based Resource Assignment Scheme to Maximize the Net Profit of Cloud Service Providers. Communications and Network, 12, 74-97. https://doi.org/10.4236/cn.2020.122005