Journal of Computational Information Systems 11: 16 (2015) 6037 6045 Available at http://www.jofcis.com Tasks Scheduling Game Algorithm Based on Cost Optimization in Cloud Computing Renfeng LIU 1, Lijun XU 2, Xiaoqing ZHANG 3,, Qiongfen QIAN 4 1 School of Electronic Information and Communications, Huazhong University of Science and Technology, Wuhan 430074, China 2 School of Computer and Information Engineering, Xinxiang University, Xinxiang 453003, China 3 School of Mathematics and Computer Science, Wuhan Polytechnic University, Wuhan 430023, China 4 Department 4, Air Force Early Warning Academy, Wuhan 430019, China Abstract For implementing efficiently and safely cloud tasks scheduling, a task scheduling game algorithm based on cost optimization is presented. Tasks execution cost, resource utilization cost, security-assured cost and load balance cost are considered comprehensively into the game s cost function in our algorithm. To optimize the cost function, the cloud tasks scheduling problem is formalized as a non-cooperative game model. The users cost of playing the game is interpreted as a total cost of the efficient tasks scheduling in clouds and a hierarchical approach is designed to solve this game. Experimental results shows that our algorithm not only can guarantee the tasks completion time and task response time, but also can reduce the failure rate of tasks execution and improve the task execution efficiency integrally. Keywords: Cloud Computing; Tasks Scheduling; Non-cooperative Game; Cost Function 1 Introduction Cloud computing aims to power the next generation data centers as the enabling platform for dynamic and flexible application provisioning [1]. In this process, the tasks scheduling problem is one of the main problems. Especially as a kind of distributed computing environment with dynamics and heterogeneity, the efficient tasks scheduling strategy would directly affect the performance of cloud service [2]. In essence, the tasks scheduling for cloud computing environment is to find a strategy for forming a mapping relation between cloud users tasks and cloud resources, so as to realize a king of efficient scheduling and allocation of tasks [3]. However, in addition to meet some metrics such as the completion time of tasks and the throughput, cloud tasks scheduling should also pay attention to some QoS requirements such as the resource reliability and load balance degree. This is a premise of obtaining benefits for cloud service providers. Corresponding author. Email address: 51449902@qq.com (Xiaoqing ZHANG). 1553 9105 / Copyright 2015 Binary Information Press DOI: 10.12733/jcis15145 August 15, 2015
6038 R. Liu et al. /Journal of Computational Information Systems 11: 16 (2015) 6037 6045 At present, researches on the cloud tasks scheduling have made some progresses. Yang et al. [4] optimize the delay tasks scheduling by the DAG method for determining the optimal tasks waiting time. Shen et al. [5] present a cloud task scheduling algorithm based on improved discrete particle swarm optimization. The algorithm can describe the particle location of task scheduling using the natural number coding. Feng et al. [6] adopt a similar method, but it only optimizes the completion time of tasks. The above works lose sight of the resource reliability of task scheduling, which can not guarantee security of task scheduling in dealing with the real cloud environment. Zhu et al. [7] consider the security factor of tasks scheduling and builds the security-driven task scheduling model by the security benefit function. But, this model only optimizes the success rate of tasks scheduling. Wang et al. [8] propose Cloud DLS, a dynamic priority cloud tasks scheduling algorithm based on the trust relationship, which can effectively reduce the time cost of tasks scheduling and ensure a certain security. Randies et al. [9] introduce the execution time of tasks and users trust degree as constraints and present a tasks scheduling algorithm, which can ensure load balance under reducing the execution time of tasks to a certain extent. Based on the above works, we present a cloud task scheduling game algorithm based on cost optimization, in which the tasks execution cost, the resource utilization cost, the security cost and the load balance cost are considered synchronously into the non-cooperative game. And, a hierarchical approach is designed to solve this game. 2 Model of Tasks Scheduling Let n denote the number of cloud users, the set T = {1, 2,..., n}, m is the number of cloud resources, the set R = {1, 2,..., m}. Based on the Expected Time to Compute matrix model (ETC) in our problem formulation, the tasks scheduling model is defined by the following: Definition 1 Workload vector W = [w 1, w 2,..., w n ], w t is the computational load of task t, unit: MI. Definition 2 Computing capacity vector of resource C = [c 1, c 2,..., c m ], unit: MIPS. Definition 3 ETC matrix ETC[j][i] denotes the estimation of the time needed for the completion of task j in resource i. ET C[j][i] = w j /c i (1) T S denotes the security demand of tasks, RL is the trust level of resources. When RL T S, a task can be successfully completed at a resource. In this paper, we use the method in [10] and define the T S and RL for tasks and resources as single parameters in the range [0,1]. Let H denote the resource failure probability matrix, H[j][i] is an element of the matrix, which is the probability of the failure of resource i during the execution of task j. { 1 a β(ts j rl i ), ts j > rl i H[j][i] = (2) 0, ts j rl i The security demand vector TS are denoted by ts j (j T asks), the trust level vector RL are denoted by rl i (i Machines). ts j, rl i [0, 1], where 0 represents the lowest and 1 represents the highest security requirements, the most risky and fully trusted resource respectively. The parameter β is the failure index.
R. Liu et al. /Journal of Computational Information Systems 11: 16 (2015) 6037 6045 6039 3 Tasks Scheduling of Non-cooperative Game 3.1 Model Definition 4 Let N denote the number of game player, n is the total number of tasks submitted by all cloud users, n = N i=1 k l, where k l is the number of tasks of user l, l = 1, 2,..., N. Definition 5 A scheduling strategy x is defined as x = [x 1, x 2,..., x N ], where x l is the strategy vector of the user l and x l = [x k (l 1) +1, x k (l 1) +2,..., x k (l 1) +k l ]. k l is the number of the l-user tasks, k (l 1) = k 1 + k 2 +... + k (l 1). x l is the decision variables of the user l and denote the numbers of the cloud resources, to which his tasks are allocated. So, the non-cooperative game model of cloud tasks scheduling can be defined as a tuple G N = [N; {S l } l=1,2,...,n ; {C l } l=1,2,...,n ], where N is the number of cloud users or gamers, {S 1, S 2,..., S N }, l = 1, 2,..., N are the sets of users strategies, {C 1, C 2,..., C N }, C l : S 1 S 2... S N R; l = 1, 2,..., N is the set of users cost functions. The users strategy vector x l are the elements of the strategy spaces S l = S k (l 1) +1... S k (l 1) +k l for each user l. The cost of playing the game calculated for user l is defined as the cost of tasks scheduling and is expressed as C l. 3.2 User s cost function The optimization of game cost function is to minimize the cost of task scheduling. In our scheduling strategy, some costs must be considered. In our works, we integrate all of those costs into a joint cost function C l, l {1, 2,..., N}, which is defined separately for each cloud user as the sum of the following four parts: C l = C l,e + C l,u + C l,s + C l,b (3) Here, C l,e denotes the cost of user s tasks execution, C l,u denotes the cost of cloud resource utilization, C l,s denotes the cost of security-assured scheduling of users tasks and C l,b denotes the cost of load balance of cloud resource. 3.2.1 Cost of user s tasks execution The execution cost of user s tasks is defined as the average completion time of tasks, C l,e = / comp[j][i] comp m(l) k l (4) j T (l) Where T (l) denotes the set of tasks of the user l, R(l) is the set of resources, to which all tasks of the user l are allocated, comp[j][i] is the completion time of a task j on resource i and it is calculated by Eq. (5): comp[j][i] = ET C[j][i] + rea[i] (5) Where ET C[j][i] is used as the notation for the elements of the ET C matrix, rea[i] is the finishing time of the execution of tasks previously allocated to the resource i. comp m(l) is the maximal
6040 R. Liu et al. /Journal of Computational Information Systems 11: 16 (2015) 6037 6045 completion time of the user s tasks, as defined by Eq. (6), comp m(l) = max comp[j][i] (6) j T (l),i R(l) 3.2.2 Cost of cloud resource utilization The cost of resource utilization for user l is defined as a portion of the average idle time of resource on which the user s tasks are executed, C l,u = (1 Comp (l) [i] / Makespan(l)) Idle[i] (7) i R(l) Where Comp (l) [i] denotes the completion time of resource i, Comp (l) [i] = rea[i] + j T,x[j]=i ET C[j][i] (8) Where x[j] is the value of j-th coordinate in a given scheduling strategy vector x, Makespan(l) is the makespan of l users, which can be expressed as a maximal value of Comp (l) [i]. (1 Comp (l)[i] ) Idle[i] can be seen as the idle time of resource i calculated of a given user l. Makespan(l) And Idle[i] = / ET C[j][i] Comp (l) [i] (9) j T (l) [i] Where T (l) [i] is the set of the tasks of the user l allocated to the give resource i. 3.2.3 Cost of security-assured tasks scheduling The failure cost of resource is defined as the products of the failure probabilities and the expected times of computation of the tasks on the cloud resource, C l,s = {H[j][i] ET C[j][i]} / [ET C m(l) k l ] (10) j T (l) Where ET C m(l) denotes the expected maximal computation time of the tasks of the user l in a scheduling strategy, ET C m(l) = max j T (l),i R(l) ET C[j][i] (11) For a security-assurance scheduling strategy for each cloud user, C l,s should be minimized in the tasks scheduling process, which means that each user should try to schedule his tasks to the most trustful cloud resources. 3.2.4 Cost of load balance of cloud resource For cloud tasks scheduling, load balance is an important approach to realize efficient resources allocation, whose goal is to ensure that cloud tasks are scheduled efficiently and fairly and the
R. Liu et al. /Journal of Computational Information Systems 11: 16 (2015) 6037 6045 6041 global optimization of resource utilization. The cost of load balance of cloud resource in executing tasks is, / C l,b = m (w i w) m 1 (12) i=1 The litter C l,b means cloud resources have a better performance on the load index, where w = n w i /n (13) i=1 3.3 Solution of game All cloud users try to minimize their cost function C l in the process of gaming, which can be defined as min C l, l = 1, 2,..., N, min C l = min x l S l {C l (x 1, x 2,..., x N )}. Under the condition of each gamer understanding other gamers strategies, the equilibrium state for the whole game is the result of the minimization of the cost function C : S 1 S 2... S N R, which can be defined as N C(x 1, x 2,..., x N ) = ([C l (x 1, x 2,..., x N ) min C l ]) (14) The objective of all gamers (cloud users) is to find this equilibrium state. l=1 For solving this function C( ), we need to minimize the cost function of all gamers. The minimization problem of game cost function can be defined as two steps. Step 1 solves the global level problem of the minimization of the function C and Step 2 solves the local level problem of the minimization of the user s cost function C l. To define the method of the optimization, let x(0) denote the schedule strategy generated in Step 1 as the starting point for the algorithm, x (0) = [x 1 (0), x2 (0),..., xn (0) ], where xl (0) denotes the element of the scheduling strategy x(0), i.e., the child scheduling strategy of x(0), which is composed of the values of the decision variables of the user l. x(0) is replicated and its N copies are sent to Step 2, which means one copy per user. Every user by itself optimizes his game cost function by changing the allocations of his own tasks. As a result, the optimal values of the C l cost functions are calculated by Eq. (15): min C 1;(0) = min C 1 (x 1 (0), x 2 (0),..., x N (0)) x 1 J 1 min C 2;(0) = min C 2 (x 1 (0), x 2 (0),..., x N (0)) x 2 J 2... min C N;(0) = min C N (x 1 (0), x 2 (0),..., x N 1 x N (0), x N (0)) J N (15) Algorithm 1 shows the pseudo-code of our tasks scheduling algorithm.
6042 R. Liu et al. /Journal of Computational Information Systems 11: 16 (2015) 6037 6045 Algorithm 1 Pseudo-code of our cloud tasks scheduling algorithm 1: Input: Task set, Resource set, ETC vector, Security demand, Trust level 2: Output: Cost optimization solution of task scheduling 3: Receive population schedules and ready times of the resources from min C( ) 4: For all Tasks Schedule in the population 5: Calculate the completion times of the resources in a given schedule 6: For all individual user 7: For all user s Task 8: Find the resource that gives minimum completion time 9: Allocate task to its best resource 10: Update the resource completion time for next scheduling 11: End For 12: Send the ready times vectors to the individual game players 13: Individual game players calculate the min C l ( ) for a given schedule 14: Receive the min C l ( ) value from the individual game players 15: End For 16: Send the min C l ( ) to the min C( ) 17: End for 18: Return optimization solution of tasks scheduling 4 Simulation Experiments 4.1 Experimental setting and performance metrics For evaluating the performance of our algorithm, some simulation experiments are conducted in CloudSim [11]. And, the classic task scheduling algorithm Min Min and the algorithm in [7] are selected as compared algorithms. The experimental parameters are showed in Table 1. Table 1: Parameters setting Parameters Value setting Total number of cloud tasks 200 Total number of cloud resources 10 Total number of cloud users 10 Number of tasks assigned by single user 10 Arrival rate of tasks 0.8(tasks/second/resource) Security demand of tasks 0.5-0.9,uniform distribution Trust degree of resources 0.4-1.0,uniform distribution Failure index 2 The makespan, flowtime, failure rate and load balance degree are selected as the metrics of the performance evaluation. The makespan denotes the time of finishing the latest task, Makespan = max j T F j. The flowtime can be defined as the sum of finalization times of all the tasks, F lowtime = j T F j,
R. Liu et al. /Journal of Computational Information Systems 11: 16 (2015) 6037 6045 6043 where F j denotes the time of finishing the task j. The flowtime can be expressed as the response time to the submitted task execution requests of cloud users. The definition of the failure rate can be seen in Eq. (2). The average utilization rate of cloud resources is AverageU = m i=1 AverageU i/m, where AverageU is the resource utilization of single resource, AverageU i = / (F inishtime j Starttime j ) F lowtime (16) j T (l) [i] The load balance degree is defined as LBdegree = 4.2 Experimental Results 1 dutility AverageU + m 5 1+ m 5 100%, where dutility = m (AverageU AverageU i ) /m 2 (17) i=1 In Fig. 1 and Fig. 2, because Min Min is based on the minimal completion time, which as far as possible allocates the tasks to the fastest resource with the earliest availability for executing the task, its makespan performs better than other two algorithms. In order to realize the high success rate and the throughput of tasks scheduling, the algorithm of [7] gives away partly the completion time of tasks. So, the makespan and flowtime in [7] all exceed our algorithm. Fig. 3 shows that the more scheduled tasks, the higher the failure rate of tasks. The reason is that the resource meeting the security demand of tasks are getting fewer relatively in the competition situation. The failure rate of Min Min is the highest, due to without considering the security index. Our algorithm takes the tasks execution cost, the resource utilization cost and the resource trust cost into account comprehensively, and achieves the balanced scheduling of tasks in a way of mutual optimum, which can allocate tasks to resources with more reliability. As showed in Fig. 4, due to consider the load balance cost of tasks scheduling, our algorithm performs better on the metric of the load balance degree. Min Min prefers for the resource with faster execution speed, the load balance degree is the lowest. The algorithm of [7] improves the load balance degree to a certain extent through pursuing the high throughput. In conclusion, given the limitation of the available resources, in order to better satisfy the requirement of the time and the security of tasks scheduling, our algorithm always schedules tasks to the most appropriate resources as much as possible, which not only has lesser completion time of individual task and minimal total completion time of tasks, but also can reduce the failure rate of tasks scheduling greatly under assuring the load balance. 5 Conclusion In this paper a task scheduling game approach based on cost optimization is presented for implementing efficiently and safely cloud tasks scheduling. Our algorithm defines the cloud tasks scheduling problem as a non-cooperative game among all cloud users, whose objective is to minimize the cost function of game considering the tasks execution cost, resource utilization cost,
6044 R. Liu et al. /Journal of Computational Information Systems 11: 16 (2015) 6037 6045 Makespan/s 250 200 150 100 50 0 Our algorithm Algorithm in [7] Min_Min Flowtime/s 300 250 200 150 100 50 Our algorithm Algorithm in [7] Min_Min 40 80 120 160 200 Number of tasks 40 80 120 160 200 Number of tasks Failure rate 1 0.8 0.6 0.4 0.2 0 Fig. 1: Makespan Our algorithm Algorithm in [7] Min_Min LBdegree 1 0.8 0.6 0.4 0.2 0 Fig. 2: Flowtime Our algorithm Algorithm in [7] Min_Min 40 80 120 160 200 Number of tasks 40 80 120 160 200 Number of tasks Fig. 3: Failure rate Fig. 4: Load balance degree security cost and load balance cost. Experimental results show that our algorithm not only can guarantee the completion time of the response time of tasks, but also improve the credibility and load balance of resource, which could provide a better security assurance for the cloud tasks execution and the allocation of resources. The future researches focus on: 1) the tasks scheduling problem based on profit optimization for cloud resource providers and 2) the cooperative game algorithm of tasks scheduling based on total cost minimization for all cloud users. References [1] Cusumano M, Cloud computing and SaaS as new computing platform, Communication of the ACM, 2010, 53(4): 27-29. [2] Pallis G, Cloud computing: the new frontier of internet computing. IEEE internet computing, 2010, 14(5): 70-73. [3] Jiayi M, Ji Z, Jinwen T,et al., Robust point matching via vector field consensus, IEEE Transactions on Image Processing, 2014, 23(4): 1706-1721. [4] Yang Z, Wang Q and Lv H, Research on resource scheduling algorithm of cloud computing based on improved DAG diagram and task delay, Computer measurement and control, 2014, 22(2): 499-502.
R. Liu et al. /Journal of Computational Information Systems 11: 16 (2015) 6037 6045 6045 [5] Shen K, Hu D, Research on task schedule based on cloud computing and improved discrete particle swarm, Computer measurement and control, 2012, 20(11): 3070-3072. [6] Feng L, Zhang T, Jia Z, et al., Task schedule algorithm based on improved particle swarm under cloud computing environment, Computer engineering, 2013, 39(5): 183-186. [7] Zhu H, Wang Y, Security-driven real-time task scheduling based on genetic algorithm, System engineering and electronics, 2010, 32(4): 854-859. [8] Wang W, Zeng G, Tang D, et al., Cloud-DLS : Dynamic trusted scheduling for cloud computing, Expert systems with applications, 2012, 39(3): 2321-2329. [9] Randies M, Lamb D, Taleb A, A comparative study into distributed load balancing algorithm for cloud computing, Proceedings of the IEEE 24th international conference on advanced information networking and applications Workship, 2010: 551-556. [10] Song S, Hwang K, Kwok Y, Risk-resilient heuristics and genetic algorithms for security-assured grid job scheduling, IEEE Transactions on Computers, 2006, 55(6): 703-719. [11] Calheiros, R.N., R. Ranjan, A. Beloglazov, et al. CloudSim: a toolkit for modeling and simulation of cloud computing environments and evaluation of resource provisioning algorithms. Software: Practice and Experience, 2011, 41(1): 23-50.