# An Invocation Cost Optimization Method for Web Services in Cloud Environment

Authors: Lianyong Qi; Jiguo Yu; Zhili Zhou
Journal: Scientific Programming
 (2017)

---

## Abstract

The advent of cloud computing technology has enabled users to invoke various web services in a “pay-as-you-go” manner. However, due to the flexible pricing model of web services in cloud environment, a cloud user’ service invocation cost may be influenced by many factors (e.g., service invocation time), which brings a great challenge for cloud users’ cost-effective web service invocation. In view of this challenge, in this paper, we first investigate the multiple factors that influence the invocation cost of a cloud service, for example, user’s job size, service invocation time, and service quality level; and afterwards, a novel Cloud Service Cost Optimization Method namedCS-COM is put forward, by considering the above multiple impact factors. Finally, a set of experiments are designed, deployed, and tested to validate the feasibility of our proposal in terms of cost optimization. The experiment results show that our proposedCS-COM method outperforms other related methods.


---

## Body

## 1. Introduction

The advent of cloud computing technology has provided us with a light-weight resolution for building various complex business applications [1–3]. With the flexible provision of cloud computing infrastructure, a service user can invoke his/her interested web services in an “easy-to-access” and “pay-as-you-go” manner, which significantly benefits the users who request dynamic and variable computing resources [4–6].However, the flexible pricing model in cloud environment brings users a challenging task to find the optimal service invocation cost [7], as the cost is often varied with many impact factors, such as user job size, service invocation time, and user’s requested service quality [8]. For example, let us consider a video-on-demand scenario [9, 10] where a service serviceVOD can help users to enjoy movies located on remote servers. Then when serviceVOD is invoked by a user, the invocation cost often depends on many context factors, such as movie size, service invocation time, and movie display quality. Therefore, from the perspective of a cloud user, it becomes a necessity and a challenge to find the optimal service invocation time as well as the minimal service invocation cost, when he/she utilizes serviceVOD to enjoy his/her preferred movies.In view of this challenge, in this paper, we first investigate and analyze the impact factors that influence the invocation cost of a cloud service; afterwards, a novel Cloud Service Cost Optimization Method, that is,CS-COM, is brought forth in this paper, by combining the above multiple impact factors.The rest of paper is structured as follows. In Section2, we first investigate the impact factors that influence the invocation cost of a cloud service. Afterwards, an optimization method for invocation cost of cloud services, that is,CS-COM, is put forward in Section 3, by considering the investigated multiple impact factors. A set of experiments are designed and deployed in Section 4, to validate the feasibility of our proposal in terms of cost optimization. Related works and further discussions are presented in Section 5. And finally, in Section 6, we conclude the paper and point out our future research directions.


## 2. Impact Factor Analyses for Web Service Invocation Cost in Cloud

Due to the flexible pricing models in cloud environment, the invocation cost for a cloud service is often not static but varied with many impact factors. In this section, we will investigate these context factors. Concretely, the following three context factors play important roles in cloud service charging.


### 2.1. Job Size

Size of a cloud user’ job (or task), whose units are KB, MB, GB, TB, PB, and so forth. Generally, for a job of a cloud user, a largerjob size often leads to longer service execution duration. Let us consider the example of serviceVOD introduced in Section 1. A 2 GB movie often takes more time cost (e.g., decoding time or transmission time) than a 1 GB movie does.With the above observation, a conclusion could often be drawn that there is a positive correlation between a user’sjob size and a cloud service’sexecution duration. Here, we utilize formula (1) to depict the relationship between them. Then according to the above analyses, in (1), the first-order derivative f′(job_size)>0 often holds. Concretely, for simplicity, we utilize the three submodels in Figure 1 to depict the positive correlation between a cloud user’sjob_size and a cloud service’s estimatedexecution_duration. As Figure 1 shows, a cloud service’s estimatedexecution_durations all increase with the growth ofjob_size. The major difference among these three submodels is as follows:execution_duration increases faster with the growth ofjob_size in Figure 1(a) (e.g., when the cloud load is becoming heavier and heavier), while in contrast,execution_duration increases more slowly whenjob_size grows in Figure 1(b) (e.g., when the cloud load is becoming smaller and smaller); and in Figure 1(c),execution_duration increases linearly with the growth ofjob_size (e.g., when the cloud load stays approximately stable).(1)execution_duration=fjob_size.Figure 1
Positive correlation betweenjob size of a cloud user andexecution duration of a cloud service.
(a)
(b)
(c)For a cloud service, largerexecution duration often means higher service invocation cost. Therefore, there is an indirect positive correlation betweenjob size of a cloud user and invocation cost of a cloud service. For example, a 2 GB movie may be charged more than a 1 GB movie when a user invokes serviceVOD.


### 2.2. Service Invocation Time

It means the time point that a cloud service begins to execute. Generally, a cloud user would be charged more when he/she invokes a cloud service in busy hours (e.g., 08:00 am~18:00 pm of a day) or on busy days. In contrast, when the cloud service is not busy, a cloud user would be charged less. Let us take theserviceVOD introduced in Section 1, for example. If a user invokes serviceVOD service on free days (e.g., Monday~Thursday), a small fee would be charged (i.e., cost per hourcph is low in Figure 2), while on other busy days (e.g., Friday~Sunday), the invocation cost of serviceVOD would rise significantly due to the heavy network load on weekends.Figure 2
Cloud services’ pricing model regarding invocation timet: an example.Here, we utilize the following pricing model in (2) to depict the relationship between a cloud service’scph and invocation time point t. Generally, the time-aware pricing model of a cloud service is often provided by its service provider.(2)cph=gt.


### 2.3. Service Quality Level

It means a cloud service’s quality level that is requested by a cloud user. Generally, a cloud provider often publishes its cloud service with multiple quality levels so as to accommodate the various preferences of different cloud users [11]. Here, we utilize set {ql1,…,qln} to denote a cloud service’s n service quality levels that could be delivered to its cloud users (ql1 denotes the lowest quality level, while qln denotes the highest quality level). Generally, the service invocation cost would be high if a cloud user requests a high service quality level. For example, let us consider the example of serviceVOD (introduced in Section 1) as well as its two service quality levels shown as follows. As 1080 P > 720 P holds, a user would be charged more if he/she selectsservice-quality-level-1 instead ofservice-quality-level-2, asservice-quality-level-1 requires more transmission cost thanservice-quality-level-2 does:service-quality-level-1: 1080 P (high video_quality)service-quality-level-2: 720 P (middle video_quality)


## 2.1. Job Size

Size of a cloud user’ job (or task), whose units are KB, MB, GB, TB, PB, and so forth. Generally, for a job of a cloud user, a largerjob size often leads to longer service execution duration. Let us consider the example of serviceVOD introduced in Section 1. A 2 GB movie often takes more time cost (e.g., decoding time or transmission time) than a 1 GB movie does.With the above observation, a conclusion could often be drawn that there is a positive correlation between a user’sjob size and a cloud service’sexecution duration. Here, we utilize formula (1) to depict the relationship between them. Then according to the above analyses, in (1), the first-order derivative f′(job_size)>0 often holds. Concretely, for simplicity, we utilize the three submodels in Figure 1 to depict the positive correlation between a cloud user’sjob_size and a cloud service’s estimatedexecution_duration. As Figure 1 shows, a cloud service’s estimatedexecution_durations all increase with the growth ofjob_size. The major difference among these three submodels is as follows:execution_duration increases faster with the growth ofjob_size in Figure 1(a) (e.g., when the cloud load is becoming heavier and heavier), while in contrast,execution_duration increases more slowly whenjob_size grows in Figure 1(b) (e.g., when the cloud load is becoming smaller and smaller); and in Figure 1(c),execution_duration increases linearly with the growth ofjob_size (e.g., when the cloud load stays approximately stable).(1)execution_duration=fjob_size.Figure 1
Positive correlation betweenjob size of a cloud user andexecution duration of a cloud service.
(a)
(b)
(c)For a cloud service, largerexecution duration often means higher service invocation cost. Therefore, there is an indirect positive correlation betweenjob size of a cloud user and invocation cost of a cloud service. For example, a 2 GB movie may be charged more than a 1 GB movie when a user invokes serviceVOD.


## 2.2. Service Invocation Time

It means the time point that a cloud service begins to execute. Generally, a cloud user would be charged more when he/she invokes a cloud service in busy hours (e.g., 08:00 am~18:00 pm of a day) or on busy days. In contrast, when the cloud service is not busy, a cloud user would be charged less. Let us take theserviceVOD introduced in Section 1, for example. If a user invokes serviceVOD service on free days (e.g., Monday~Thursday), a small fee would be charged (i.e., cost per hourcph is low in Figure 2), while on other busy days (e.g., Friday~Sunday), the invocation cost of serviceVOD would rise significantly due to the heavy network load on weekends.Figure 2
Cloud services’ pricing model regarding invocation timet: an example.Here, we utilize the following pricing model in (2) to depict the relationship between a cloud service’scph and invocation time point t. Generally, the time-aware pricing model of a cloud service is often provided by its service provider.(2)cph=gt.


## 2.3. Service Quality Level

It means a cloud service’s quality level that is requested by a cloud user. Generally, a cloud provider often publishes its cloud service with multiple quality levels so as to accommodate the various preferences of different cloud users [11]. Here, we utilize set {ql1,…,qln} to denote a cloud service’s n service quality levels that could be delivered to its cloud users (ql1 denotes the lowest quality level, while qln denotes the highest quality level). Generally, the service invocation cost would be high if a cloud user requests a high service quality level. For example, let us consider the example of serviceVOD (introduced in Section 1) as well as its two service quality levels shown as follows. As 1080 P > 720 P holds, a user would be charged more if he/she selectsservice-quality-level-1 instead ofservice-quality-level-2, asservice-quality-level-1 requires more transmission cost thanservice-quality-level-2 does:service-quality-level-1: 1080 P (high video_quality)service-quality-level-2: 720 P (middle video_quality)


## 3. Cost Optimization Method for Cloud Service Invocation

In Section2, we have analyzed the three important impact factors that are related to the invocation cost of a cloud service, that is,job size,service invocation time, andservice quality level. Next, we combine the above three impact factors together to develop a novel cost optimization method for cloud services, that is,CS-COM, so as to help cloud users to find the optimal service invocation time and the minimal service invocation cost. Concretely, our proposedCS-COM method consists of the following four steps.Step 1.
Estimate a cloud service’sexecution duration based on a cloud user’sjob size.In Section2 (see Figure 1 and formula (1)), we have introduced three pricing submodels between a cloud user’sjob_size and a cloud service’s estimatedexecution_duration. Therefore, given a cloud user’s job size, we can estimate a cloud service’s execution duration based on (1). Here, please note that formula (1) can be in the form of Figure 1(a) or Figure 1(b) or Figure 1(c), depending on the service provider’s pricing strategy. Next, we utilize range [t0, t0 +execution_duration] to denote the running period of a cloud service, where t0 is the time point that the cloud service starts to execute.Step 2.
According to the estimated serviceexecution_duration (in Step 1) and the time-aware pricing model (in (2)), calculate the original service invocation costP (without consideringservice quality level).As introduced in Step1, a cloud service starts to execute at t=t0 and ends at t=t0 +execution_duration. Therefore, through the integral operation overcph in (2), we can obtain the original service invocation costP (without consideringservice quality level). Concretely,P could be calculated by (3), where cph=g(t) holds (see formula (2)).(3)P=∫t0t0+execution_durationcphdt=∫t0t0+execution_durationgtdt.Step 3.
Calculate the comprehensive service invocation costP(x) based on the requestedservice quality levelqlx and the original invocation cost P derived in Step 2.In Step2, we have derived the original invocation cost P of a cloud service without considering the service quality level. As analyzed previously in Section 2, service quality level often plays an important role in service charging. Therefore, in this step, original service invocation cost P is modified to be P(x) by considering the cloud user’s requested service quality level qlx where qlx∈{ql1,…,qln} holds (here, we assume that there are n quality levels for a cloud service; ql1 and qln denote the lowest and highest service quality levels, resp.).As analyzed in Section2, a higher service quality level often leads to larger service invocation cost. In view of this intuitive observation, we utilize the simple linear formula in (4) to depict the correlation between P(x) and P. In (4), a and b are two parameters that are determined by the service quality level qlx. A concrete example is presented in Table 1 to demonstrate the relationship between parameter values of (a,b) and service quality level qlx. Generally, parameters a and b could be obtained from the cloud service provider.(4)Px=hqlx,P=a∗P+b.Table 1
An example of parametersa and b in (4).
Parameter
q
l
x
q
l
1
q
l
2
⋯
q
l
n
a
1
2
n
b
1
/
n
2
/
n
1Step 4.
Optimize costP(x) derived in Step 3.Our final goal is to minimize the comprehensive service invocation costP(x) derived in (4). Next, through combining (1)–(4) and objective function (i.e., Minimize P(x)), we can obtain an optimal value for service invocation start time t0, denoted by t0(optimal) in (5). And correspondingly, when t0=t0(optimal) holds, the optimal service invocation cost P(optimal)(x) is achieved, which could be calculated by (6).(5)t0optimal=t0∣Px=min⁡Px(6)Poptimalx=a∗∫t0optimalt0optimal+execution_durationgtdt+b.With Steps1–4 of our proposedCS-COM method, we can determine the optimal service execution start time t0 as well as the optimal (i.e., the lowest) service invocation cost P(optimal)(x), by considering a cloud user’s job size and requested service quality level qlx. Next, more formally, the pseudocode of our proposedCS-COM method is specified as Algorithm 1. Here, the functionsexecution_duration = f(job_size) in (1), cph=g(t) in (2), and parameters a and b are all regarded as known already, as they all depend on the pricing models of cloud service providers.Algorithm 1:
CS-COM  (user,cs,job_size,qlx,f(job_size),g(t)).
Input: user: a cloud user
cs: a cloud service ready to be invoked by user
job_size: user’s job (or task) size
qlx: service quality level of cs requested by user
f(job_size): execution_duration = f(job_size) in (1)
g(t): cph=g(t) in (2)
Output: t0optimal: optimal service invocation start time of cs
P(optimal)(x): optimal invocation cost of cs by user
(1)   Set variable t0 // service invocation start time
(2)   Get models f(job_size) and g(t) from service provider
(3)   Get parameters a and b in (4) from service provider based on qlx
(4)   Estimate cs’s execution_duration based on job_size and (1)
(5)   Calculate P based on t0, execution_duration and (3)
//P: original service invocation cost of cs by user
(6)   Calculate P(x) based on a, b, P and (4)
//P(x): comprehensive invocation cost of cs by user
(7)   Set objective function: Minimize P(x)
(8)   Determine t0optimal by combining (1)–(5)
(9)   Determine P(optimal)(x) based on (6)
(10) Return t0optimal to user
(11) Return P(optimal)(x) to user


## 4. Experiments

In this section, a set of simulated experiments are designed and tested, to validate the feasibility of our proposedCS-COM method in terms of cost optimization.


### 4.1. Experiment Settings

Next, we introduce the concrete parameters or environment settings adopted in the experiments.


#### 4.1.1. Relationship betweenexecution_duration andjob_size (See Formula (1))

As work [12] indicates, a cloud service’sexecution_duration (without considering the data transfer between user client and cloud server) mainly depends on the CPU processing speed and userjob_size. Due to the flexible resource provision in cloud environment, we can assume that the CPU processing speed stays approximately stable. In this situation, there is an approximately linear relationship between estimatedexecution_duration (unit: hour) of a cloud service andjob_size (unit: GB) of a cloud user. So in the experiments, we utilize the linear function in (7) to model their relationship where k(k>0) is a parameter. Here, we utilize the well-known cloud simulation toolCloudSim [13] developed by Melbourne University for generating the user job 1000 times randomly, through which the userjob_size could be obtained. (7)execution_duration=fjob_size=k∗job_size.


#### 4.1.2. Relationship betweencph andt (See Formula (2))

Generally, a cloud service’s pricing model, that is,cph(cost per hour), heavily depends on the service invocation time t [14]. In the experiments, we generate the random pricing models with the help ofCloudSim (concretely, cloud services including pricing models in (1)–(4) are encapsulated in a service entity inCloudSim and registered in CloudInformationService component; our proposed cost optimization methodCS-COM and other related methods are located in the component of Data Center Proxy so as to estimate the service invocation cost).


#### 4.1.3. Relationship between Invocation CostP(x) and Service Quality qlx (See Formula (4) and Table 1)

According to the experiment results observed by [14], there is an approximate linear relationship between service invocation cost P(x) and service quality qlx (see formula (8)). In the experiments, we adopt this experienced data in (8) to approach formula (4) in our paper.(8)Px=2∗qlx+0.4.Besides, we test and compare ourCS-COM method with four related methods:FCFS (First Come First Serve) [15],FL-FL (cost evaluation based on historical records) [16],Cost-plus (considering service invocation cost and user benefit simultaneously) [17], andCB (considering time-depended pricing model only) [14].The experiments were conducted on a HP laptop with 2.40 GHz processors and 4.0 GB RAM. The machine is running under Windows 7 and JAVA 1.5. Each experiment was carried out 10 times and the average results were adopted. Concretely, three experiment profiles are tested and compared.


### 4.2. Experiment Results

#### 4.2.1. Profile 1: Invocation Cost Comparison with respect to Job Size

In this profile, we test and compare the service invocation costs of our proposedCS-COM method and other four methods. Here, inCS-COM, parameters k=2, a=2, and b=0.4 hold (see (8)); parameter L inFL-FL is equal to 3; parameterconversion = 0.4 holds inCost-plus. Cloud user’sjob_size is varied from 1 GB to 10 GB.The experiment results are presented in Figure3. As Figure 3 shows, the service invocation costs of five methods all increase with the growth ofjob_size approximately; this is because processing a larger job often takes more time cost and hence leads to a higher invocation cost. Moreover, the service invocation cost ofCost-plus method is high as it considers the user benefit as an optimization object, while more user benefit often means higher charging fees. Besides, the service invocation cost ofFCFS method often fluctuates frequently as its service invocation time is randomly selected, while different service invocation time means varied service charging. The rest three experiment curves increase approximately in polynomial manners, whereFL-FL method utilizes the past service invocation costs to estimate the future invocation cost andCB method considers the time-dependent pricing models of cloud services, while our proposedCS-COM method consider a cloud user’s job size, service invocation time, and requested service quality level simultaneously. Therefore,CS-COM method outperforms the other four methods in terms of service invocation cost, which could also be observed from Figure 3.Figure 3
Invocation cost comparison of five methods with respect to job size.


#### 4.2.2. Profile 2: Invocation Cost Comparison with respect tot

In this profile, we compare the service invocation costs of five methods with respect to the service invocation time. As the “cph-t” charging models (see formula (2)) randomly generated byCloudSim make it hard to observe the stable variation trend of invocation cost, in this profile, we choose a randomly generated but fixed “cph-t” charging model (t∈ [1:00 pm, 12:00 pm]) where [6:00 pm, 9:00 pm] is the busy hour. To observe the cost variation trend with invocation time t, we tune parameterjob_size so that the user job could be finished within one hour. Other parameter settings are the same as in Profile 1.The experiment results are shown in Figure4. As Figure 4 indicates, the service invocation cost ofCost-plus is high as it considers both user benefit and service cost, while larger user benefit often means higher charging fees. TheFCFS method achieves the approximate cost variation trend with the preset “cph-t” charging model as no cost optimization strategy is adopted inFCFS. InFL-FL method, sampling technique is recruited to approximately approach original “cph-t” charging model, which achieves the similar cost variation trend as inFCFS. The rest two methods, that is,CB andCS-COM, perform better than the previous three methods in terms of cost optimization, as the dynamic time-aware cost optimization strategy is considered in these two methods. Besides, as supposed in this profile, the execution duration of user job is one hour; therefore, at the last o’clock (i.e., 12:00 pm), time-aware cost optimization strategy does not work anymore and hence, the five cost variation curves converge.Figure 4
Invocation cost comparison of five methods with respect to service invocation time (1:00 pm~12:00 pm).


#### 4.2.3. Profile 3: Time Cost Comparison

In this profile, we test the time costs of five methods. Here, sampling technique is recruited to convert the continuous functioncph=g(t) in (2) into d discrete values with same intervals, so as to facilitate the further computation of service invocation cost. Concretely, d=100 holds in this profile. Other parameter settings are the same as those in Profile 1.The concrete experiment results are presented in Figure5. As can be seen from Figure 5,FL-FL method achieves the least time cost as it only considers the past few historical service invocation costs of a cloud service, without further complicated computation. The rest four time cost curves all increase approximately linearly with the growth of job size. The time cost ofFCFS method is not very large as it only refers to an integral operation associated with cph=g(t) and t. The execution efficiencies of rest three methods, that is,Cost-plus,CB, andCS-COM, are very close, as they all contain some extra computation processes associated with cloud users’ job size; concretely,Cost-plus needs to calculate the benefit of a cloud user based on the service invocation cost (derived based on job size) andCBneeds to optimize the service invocation cost based on the time-dependent pricing model (depends on job size), while our proposedCS-COM method employs job size to estimate the service execution duration. As Figure 5 shows, the time costs of all the five methods are not high (at “millisecond” level).Figure 5
Time cost comparison of five methods.


#### 4.2.4. Profile 4: Service Invocation Cost ofCS-COM with respect to k

As formula (7) indicates, k is an important parameter that bridges the estimated serviceexecution_duration and a cloud user’sjob_size and consequently influences the finally derived optimal service invocation cost. In this profile, we test the relationship between k and the optimal service invocation cost in our proposedCS-COM method. Concretely, k is varied from 1 to 10,job_size is equal to 1 GB, and parameters a=2 and b=0.4 hold in (4).The concrete experiment results are presented in Figure6. As can be seen from Figure 6, the invocation cost ofCS-COM method increases approximately in a polynomial manner with the growth of k, this is because k appears in the upper bound of t (i.e., t0(optimal) +execution_duration = t0(optimal)+f(job_size)) of invocation cost integration ∫t0(optimal)t0(optimal)+execution_duration‍g(t)dt in (6), while g(t) is often a polynomial function associated with t. So after the integral operation, the service invocation cost becomes a polynomial function associated with parameter k.Figure 6
Service invocation cost ofCS-COM with respect to k.From the above three sets of experiment results, we can conclude that our proposedCS-COM method outperforms the rest four methods in terms of service invocation cost (concretely, compared toFCFS,FL-FL,Cost-plus, andCB, the cost reduction ratios of our proposal are 74.9%, 62.8%, 80.1%, and 35.1%, resp.). Besides, the time cost of our proposal is at the “ms” level, which is acceptable for most business applications. Finally, in our proposedCS-COM method, the derived optimal service invocation cost has a positive correlation with parameter k in formula (7), which approximately coincides with most existing cloud pricing models. Actually, for a cloud service, the value of parameter k could be published by its service provider in a flexible manner so as to maximize the economic gains.


## 4.1. Experiment Settings

Next, we introduce the concrete parameters or environment settings adopted in the experiments.


### 4.1.1. Relationship betweenexecution_duration andjob_size (See Formula (1))

As work [12] indicates, a cloud service’sexecution_duration (without considering the data transfer between user client and cloud server) mainly depends on the CPU processing speed and userjob_size. Due to the flexible resource provision in cloud environment, we can assume that the CPU processing speed stays approximately stable. In this situation, there is an approximately linear relationship between estimatedexecution_duration (unit: hour) of a cloud service andjob_size (unit: GB) of a cloud user. So in the experiments, we utilize the linear function in (7) to model their relationship where k(k>0) is a parameter. Here, we utilize the well-known cloud simulation toolCloudSim [13] developed by Melbourne University for generating the user job 1000 times randomly, through which the userjob_size could be obtained. (7)execution_duration=fjob_size=k∗job_size.


### 4.1.2. Relationship betweencph andt (See Formula (2))

Generally, a cloud service’s pricing model, that is,cph(cost per hour), heavily depends on the service invocation time t [14]. In the experiments, we generate the random pricing models with the help ofCloudSim (concretely, cloud services including pricing models in (1)–(4) are encapsulated in a service entity inCloudSim and registered in CloudInformationService component; our proposed cost optimization methodCS-COM and other related methods are located in the component of Data Center Proxy so as to estimate the service invocation cost).


### 4.1.3. Relationship between Invocation CostP(x) and Service Quality qlx (See Formula (4) and Table 1)

According to the experiment results observed by [14], there is an approximate linear relationship between service invocation cost P(x) and service quality qlx (see formula (8)). In the experiments, we adopt this experienced data in (8) to approach formula (4) in our paper.(8)Px=2∗qlx+0.4.Besides, we test and compare ourCS-COM method with four related methods:FCFS (First Come First Serve) [15],FL-FL (cost evaluation based on historical records) [16],Cost-plus (considering service invocation cost and user benefit simultaneously) [17], andCB (considering time-depended pricing model only) [14].The experiments were conducted on a HP laptop with 2.40 GHz processors and 4.0 GB RAM. The machine is running under Windows 7 and JAVA 1.5. Each experiment was carried out 10 times and the average results were adopted. Concretely, three experiment profiles are tested and compared.


## 4.1.1. Relationship betweenexecution_duration andjob_size (See Formula (1))

As work [12] indicates, a cloud service’sexecution_duration (without considering the data transfer between user client and cloud server) mainly depends on the CPU processing speed and userjob_size. Due to the flexible resource provision in cloud environment, we can assume that the CPU processing speed stays approximately stable. In this situation, there is an approximately linear relationship between estimatedexecution_duration (unit: hour) of a cloud service andjob_size (unit: GB) of a cloud user. So in the experiments, we utilize the linear function in (7) to model their relationship where k(k>0) is a parameter. Here, we utilize the well-known cloud simulation toolCloudSim [13] developed by Melbourne University for generating the user job 1000 times randomly, through which the userjob_size could be obtained. (7)execution_duration=fjob_size=k∗job_size.


## 4.1.2. Relationship betweencph andt (See Formula (2))

Generally, a cloud service’s pricing model, that is,cph(cost per hour), heavily depends on the service invocation time t [14]. In the experiments, we generate the random pricing models with the help ofCloudSim (concretely, cloud services including pricing models in (1)–(4) are encapsulated in a service entity inCloudSim and registered in CloudInformationService component; our proposed cost optimization methodCS-COM and other related methods are located in the component of Data Center Proxy so as to estimate the service invocation cost).


## 4.1.3. Relationship between Invocation CostP(x) and Service Quality qlx (See Formula (4) and Table 1)

According to the experiment results observed by [14], there is an approximate linear relationship between service invocation cost P(x) and service quality qlx (see formula (8)). In the experiments, we adopt this experienced data in (8) to approach formula (4) in our paper.(8)Px=2∗qlx+0.4.Besides, we test and compare ourCS-COM method with four related methods:FCFS (First Come First Serve) [15],FL-FL (cost evaluation based on historical records) [16],Cost-plus (considering service invocation cost and user benefit simultaneously) [17], andCB (considering time-depended pricing model only) [14].The experiments were conducted on a HP laptop with 2.40 GHz processors and 4.0 GB RAM. The machine is running under Windows 7 and JAVA 1.5. Each experiment was carried out 10 times and the average results were adopted. Concretely, three experiment profiles are tested and compared.


## 4.2. Experiment Results

### 4.2.1. Profile 1: Invocation Cost Comparison with respect to Job Size

In this profile, we test and compare the service invocation costs of our proposedCS-COM method and other four methods. Here, inCS-COM, parameters k=2, a=2, and b=0.4 hold (see (8)); parameter L inFL-FL is equal to 3; parameterconversion = 0.4 holds inCost-plus. Cloud user’sjob_size is varied from 1 GB to 10 GB.The experiment results are presented in Figure3. As Figure 3 shows, the service invocation costs of five methods all increase with the growth ofjob_size approximately; this is because processing a larger job often takes more time cost and hence leads to a higher invocation cost. Moreover, the service invocation cost ofCost-plus method is high as it considers the user benefit as an optimization object, while more user benefit often means higher charging fees. Besides, the service invocation cost ofFCFS method often fluctuates frequently as its service invocation time is randomly selected, while different service invocation time means varied service charging. The rest three experiment curves increase approximately in polynomial manners, whereFL-FL method utilizes the past service invocation costs to estimate the future invocation cost andCB method considers the time-dependent pricing models of cloud services, while our proposedCS-COM method consider a cloud user’s job size, service invocation time, and requested service quality level simultaneously. Therefore,CS-COM method outperforms the other four methods in terms of service invocation cost, which could also be observed from Figure 3.Figure 3
Invocation cost comparison of five methods with respect to job size.


### 4.2.2. Profile 2: Invocation Cost Comparison with respect tot

In this profile, we compare the service invocation costs of five methods with respect to the service invocation time. As the “cph-t” charging models (see formula (2)) randomly generated byCloudSim make it hard to observe the stable variation trend of invocation cost, in this profile, we choose a randomly generated but fixed “cph-t” charging model (t∈ [1:00 pm, 12:00 pm]) where [6:00 pm, 9:00 pm] is the busy hour. To observe the cost variation trend with invocation time t, we tune parameterjob_size so that the user job could be finished within one hour. Other parameter settings are the same as in Profile 1.The experiment results are shown in Figure4. As Figure 4 indicates, the service invocation cost ofCost-plus is high as it considers both user benefit and service cost, while larger user benefit often means higher charging fees. TheFCFS method achieves the approximate cost variation trend with the preset “cph-t” charging model as no cost optimization strategy is adopted inFCFS. InFL-FL method, sampling technique is recruited to approximately approach original “cph-t” charging model, which achieves the similar cost variation trend as inFCFS. The rest two methods, that is,CB andCS-COM, perform better than the previous three methods in terms of cost optimization, as the dynamic time-aware cost optimization strategy is considered in these two methods. Besides, as supposed in this profile, the execution duration of user job is one hour; therefore, at the last o’clock (i.e., 12:00 pm), time-aware cost optimization strategy does not work anymore and hence, the five cost variation curves converge.Figure 4
Invocation cost comparison of five methods with respect to service invocation time (1:00 pm~12:00 pm).


### 4.2.3. Profile 3: Time Cost Comparison

In this profile, we test the time costs of five methods. Here, sampling technique is recruited to convert the continuous functioncph=g(t) in (2) into d discrete values with same intervals, so as to facilitate the further computation of service invocation cost. Concretely, d=100 holds in this profile. Other parameter settings are the same as those in Profile 1.The concrete experiment results are presented in Figure5. As can be seen from Figure 5,FL-FL method achieves the least time cost as it only considers the past few historical service invocation costs of a cloud service, without further complicated computation. The rest four time cost curves all increase approximately linearly with the growth of job size. The time cost ofFCFS method is not very large as it only refers to an integral operation associated with cph=g(t) and t. The execution efficiencies of rest three methods, that is,Cost-plus,CB, andCS-COM, are very close, as they all contain some extra computation processes associated with cloud users’ job size; concretely,Cost-plus needs to calculate the benefit of a cloud user based on the service invocation cost (derived based on job size) andCBneeds to optimize the service invocation cost based on the time-dependent pricing model (depends on job size), while our proposedCS-COM method employs job size to estimate the service execution duration. As Figure 5 shows, the time costs of all the five methods are not high (at “millisecond” level).Figure 5
Time cost comparison of five methods.


### 4.2.4. Profile 4: Service Invocation Cost ofCS-COM with respect to k

As formula (7) indicates, k is an important parameter that bridges the estimated serviceexecution_duration and a cloud user’sjob_size and consequently influences the finally derived optimal service invocation cost. In this profile, we test the relationship between k and the optimal service invocation cost in our proposedCS-COM method. Concretely, k is varied from 1 to 10,job_size is equal to 1 GB, and parameters a=2 and b=0.4 hold in (4).The concrete experiment results are presented in Figure6. As can be seen from Figure 6, the invocation cost ofCS-COM method increases approximately in a polynomial manner with the growth of k, this is because k appears in the upper bound of t (i.e., t0(optimal) +execution_duration = t0(optimal)+f(job_size)) of invocation cost integration ∫t0(optimal)t0(optimal)+execution_duration‍g(t)dt in (6), while g(t) is often a polynomial function associated with t. So after the integral operation, the service invocation cost becomes a polynomial function associated with parameter k.Figure 6
Service invocation cost ofCS-COM with respect to k.From the above three sets of experiment results, we can conclude that our proposedCS-COM method outperforms the rest four methods in terms of service invocation cost (concretely, compared toFCFS,FL-FL,Cost-plus, andCB, the cost reduction ratios of our proposal are 74.9%, 62.8%, 80.1%, and 35.1%, resp.). Besides, the time cost of our proposal is at the “ms” level, which is acceptable for most business applications. Finally, in our proposedCS-COM method, the derived optimal service invocation cost has a positive correlation with parameter k in formula (7), which approximately coincides with most existing cloud pricing models. Actually, for a cloud service, the value of parameter k could be published by its service provider in a flexible manner so as to maximize the economic gains.


## 4.2.1. Profile 1: Invocation Cost Comparison with respect to Job Size

In this profile, we test and compare the service invocation costs of our proposedCS-COM method and other four methods. Here, inCS-COM, parameters k=2, a=2, and b=0.4 hold (see (8)); parameter L inFL-FL is equal to 3; parameterconversion = 0.4 holds inCost-plus. Cloud user’sjob_size is varied from 1 GB to 10 GB.The experiment results are presented in Figure3. As Figure 3 shows, the service invocation costs of five methods all increase with the growth ofjob_size approximately; this is because processing a larger job often takes more time cost and hence leads to a higher invocation cost. Moreover, the service invocation cost ofCost-plus method is high as it considers the user benefit as an optimization object, while more user benefit often means higher charging fees. Besides, the service invocation cost ofFCFS method often fluctuates frequently as its service invocation time is randomly selected, while different service invocation time means varied service charging. The rest three experiment curves increase approximately in polynomial manners, whereFL-FL method utilizes the past service invocation costs to estimate the future invocation cost andCB method considers the time-dependent pricing models of cloud services, while our proposedCS-COM method consider a cloud user’s job size, service invocation time, and requested service quality level simultaneously. Therefore,CS-COM method outperforms the other four methods in terms of service invocation cost, which could also be observed from Figure 3.Figure 3
Invocation cost comparison of five methods with respect to job size.


## 4.2.2. Profile 2: Invocation Cost Comparison with respect tot

In this profile, we compare the service invocation costs of five methods with respect to the service invocation time. As the “cph-t” charging models (see formula (2)) randomly generated byCloudSim make it hard to observe the stable variation trend of invocation cost, in this profile, we choose a randomly generated but fixed “cph-t” charging model (t∈ [1:00 pm, 12:00 pm]) where [6:00 pm, 9:00 pm] is the busy hour. To observe the cost variation trend with invocation time t, we tune parameterjob_size so that the user job could be finished within one hour. Other parameter settings are the same as in Profile 1.The experiment results are shown in Figure4. As Figure 4 indicates, the service invocation cost ofCost-plus is high as it considers both user benefit and service cost, while larger user benefit often means higher charging fees. TheFCFS method achieves the approximate cost variation trend with the preset “cph-t” charging model as no cost optimization strategy is adopted inFCFS. InFL-FL method, sampling technique is recruited to approximately approach original “cph-t” charging model, which achieves the similar cost variation trend as inFCFS. The rest two methods, that is,CB andCS-COM, perform better than the previous three methods in terms of cost optimization, as the dynamic time-aware cost optimization strategy is considered in these two methods. Besides, as supposed in this profile, the execution duration of user job is one hour; therefore, at the last o’clock (i.e., 12:00 pm), time-aware cost optimization strategy does not work anymore and hence, the five cost variation curves converge.Figure 4
Invocation cost comparison of five methods with respect to service invocation time (1:00 pm~12:00 pm).


## 4.2.3. Profile 3: Time Cost Comparison

In this profile, we test the time costs of five methods. Here, sampling technique is recruited to convert the continuous functioncph=g(t) in (2) into d discrete values with same intervals, so as to facilitate the further computation of service invocation cost. Concretely, d=100 holds in this profile. Other parameter settings are the same as those in Profile 1.The concrete experiment results are presented in Figure5. As can be seen from Figure 5,FL-FL method achieves the least time cost as it only considers the past few historical service invocation costs of a cloud service, without further complicated computation. The rest four time cost curves all increase approximately linearly with the growth of job size. The time cost ofFCFS method is not very large as it only refers to an integral operation associated with cph=g(t) and t. The execution efficiencies of rest three methods, that is,Cost-plus,CB, andCS-COM, are very close, as they all contain some extra computation processes associated with cloud users’ job size; concretely,Cost-plus needs to calculate the benefit of a cloud user based on the service invocation cost (derived based on job size) andCBneeds to optimize the service invocation cost based on the time-dependent pricing model (depends on job size), while our proposedCS-COM method employs job size to estimate the service execution duration. As Figure 5 shows, the time costs of all the five methods are not high (at “millisecond” level).Figure 5
Time cost comparison of five methods.


## 4.2.4. Profile 4: Service Invocation Cost ofCS-COM with respect to k

As formula (7) indicates, k is an important parameter that bridges the estimated serviceexecution_duration and a cloud user’sjob_size and consequently influences the finally derived optimal service invocation cost. In this profile, we test the relationship between k and the optimal service invocation cost in our proposedCS-COM method. Concretely, k is varied from 1 to 10,job_size is equal to 1 GB, and parameters a=2 and b=0.4 hold in (4).The concrete experiment results are presented in Figure6. As can be seen from Figure 6, the invocation cost ofCS-COM method increases approximately in a polynomial manner with the growth of k, this is because k appears in the upper bound of t (i.e., t0(optimal) +execution_duration = t0(optimal)+f(job_size)) of invocation cost integration ∫t0(optimal)t0(optimal)+execution_duration‍g(t)dt in (6), while g(t) is often a polynomial function associated with t. So after the integral operation, the service invocation cost becomes a polynomial function associated with parameter k.Figure 6
Service invocation cost ofCS-COM with respect to k.From the above three sets of experiment results, we can conclude that our proposedCS-COM method outperforms the rest four methods in terms of service invocation cost (concretely, compared toFCFS,FL-FL,Cost-plus, andCB, the cost reduction ratios of our proposal are 74.9%, 62.8%, 80.1%, and 35.1%, resp.). Besides, the time cost of our proposal is at the “ms” level, which is acceptable for most business applications. Finally, in our proposedCS-COM method, the derived optimal service invocation cost has a positive correlation with parameter k in formula (7), which approximately coincides with most existing cloud pricing models. Actually, for a cloud service, the value of parameter k could be published by its service provider in a flexible manner so as to maximize the economic gains.


## 5. Related Work and Further Discussions

### 5.1. Related Work and Comparison Analyses

Cloud computing technology, on one hand, facilitates cloud users’ sharing and use of various computing resources by providing an “easy-to-access” and “pay-per-use” resource provision manner and, on the other hand, brings a great challenge to minimize or optimize cloud users’ service invocation cost. Many researchers have investigated this hot research topic and brought forth their respective resolutions [12, 14–17].In [12], the authors divided the invocation cost of a cloud service into three categories: data-storage cost, CPU processing cost, and data-transfer cost. In order to evaluate and predict a cloud user’s service invocation cost,FL-FL method was put forward in [16] by considering the service’s past invocation costs; however,FL-FL method fails to generate an accurate service invocation cost as the latter is often influenced by some other factors. Work [17] analyzed the relationship between service invocation cost and user benefits and finally introduced a cost-benefit-aware cloud service scheduling methodCost-plus. However, one final optimization goal was to maximize user profits, not to minimize the service invocation cost. In order to minimize the service invocation cost,FCFS method was put forward in [15].FCFS adopted the “First Come First Serve” rule so as to reduce the waiting time of user job and optimize the service invocation cost. However,FCFS did not consider the dynamic and varied time-aware pricing model in cloud environment. In view of this, work [14] took the time-dependent pricing model of cloud services into consideration and brought forth an invocation cost optimization methodCB. However,CB method only considered service invocation time when optimizing the invocation cost, while neglecting some other important factors, for example, user job size and user’s requested service quality level.In view of the above shortcomings, a novel service invocation cost optimization method namedCS-COM is put forward in this paper, which considers the multiple factors that influence the invocation cost in cloud environment. Experiment results show thatCS-COM outperforms other related methods in terms of cost optimization.


### 5.2. Further Discussions

In this paper, we put forward a cost optimization method for web services based on multiple impact factors. Generally, the proposed multifactors-based optimization strategy can also be applied in other application domains with multiple factors, for example, performance optimization [18–23], feature analysis [24–29], quality evaluation [30–32], knowledge learning [33–37], and data mining [38–40]. However, several shortcomings are still present in our approach.(1)
Only three factors (i.e.,job size,service invocation time andservice quality level) are considered in our cost optimization method namedCS-COM, which are not enough for real cloud service scheduling applications. Therefore, in the future, we will further improve our proposal by introducing more charging factors.(2)
Users’ subjective preferences that play an important role in users’ final service invocation decisions are not considered in our proposedCS-COM approach. In the future, we will refine our work by taking user preferences into consideration.


## 5.1. Related Work and Comparison Analyses

Cloud computing technology, on one hand, facilitates cloud users’ sharing and use of various computing resources by providing an “easy-to-access” and “pay-per-use” resource provision manner and, on the other hand, brings a great challenge to minimize or optimize cloud users’ service invocation cost. Many researchers have investigated this hot research topic and brought forth their respective resolutions [12, 14–17].In [12], the authors divided the invocation cost of a cloud service into three categories: data-storage cost, CPU processing cost, and data-transfer cost. In order to evaluate and predict a cloud user’s service invocation cost,FL-FL method was put forward in [16] by considering the service’s past invocation costs; however,FL-FL method fails to generate an accurate service invocation cost as the latter is often influenced by some other factors. Work [17] analyzed the relationship between service invocation cost and user benefits and finally introduced a cost-benefit-aware cloud service scheduling methodCost-plus. However, one final optimization goal was to maximize user profits, not to minimize the service invocation cost. In order to minimize the service invocation cost,FCFS method was put forward in [15].FCFS adopted the “First Come First Serve” rule so as to reduce the waiting time of user job and optimize the service invocation cost. However,FCFS did not consider the dynamic and varied time-aware pricing model in cloud environment. In view of this, work [14] took the time-dependent pricing model of cloud services into consideration and brought forth an invocation cost optimization methodCB. However,CB method only considered service invocation time when optimizing the invocation cost, while neglecting some other important factors, for example, user job size and user’s requested service quality level.In view of the above shortcomings, a novel service invocation cost optimization method namedCS-COM is put forward in this paper, which considers the multiple factors that influence the invocation cost in cloud environment. Experiment results show thatCS-COM outperforms other related methods in terms of cost optimization.


## 5.2. Further Discussions

In this paper, we put forward a cost optimization method for web services based on multiple impact factors. Generally, the proposed multifactors-based optimization strategy can also be applied in other application domains with multiple factors, for example, performance optimization [18–23], feature analysis [24–29], quality evaluation [30–32], knowledge learning [33–37], and data mining [38–40]. However, several shortcomings are still present in our approach.(1)
Only three factors (i.e.,job size,service invocation time andservice quality level) are considered in our cost optimization method namedCS-COM, which are not enough for real cloud service scheduling applications. Therefore, in the future, we will further improve our proposal by introducing more charging factors.(2)
Users’ subjective preferences that play an important role in users’ final service invocation decisions are not considered in our proposedCS-COM approach. In the future, we will refine our work by taking user preferences into consideration.


## 6. Conclusions

Cloud computing has provided an “easy-to-access” and “pay-per-use” resource delivery manner, to help users build their various complex business applications quickly and conveniently. However, due to the flexible pricing model of cloud services, a cloud service’s invocation cost is often not fixed but varied, which brings a great challenge to optimize the service invocation cost when a cloud user requests a cloud service. In view of this challenge, we first analyze the multiple factors that may influence the invocation cost of a cloud service, for example, user job size, service invocation time, and service quality level. Afterwards, through considering the above multiple factors, a novel service invocation cost optimization method namedCS-COM is put forward in this paper, to aid a cloud user to find the optimal service invocation start time as well as the lowest service invocation cost. Finally, through a set of simulated experiments deployed onCloudSim platform, we further demonstrate the feasibility and advantages of our proposedCS-COM method in terms of cost optimization.In the future, we will further refine our proposedCS-COM method by introducing more charging factors, so as to make it more comprehensive and more applicable in real cloud service scheduling applications.



---

*Source: 4358536-2017-05-09.xml*