=Paper=
{{Paper
|id=Vol-1844/10000088
|storemode=property
|title=Game Theoretic Analysis of Multi-Processor Schedulers: Matrix
Multiplication Example
|pdfUrl=https://ceur-ws.org/Vol-1844/10000088.pdf
|volume=Vol-1844
|authors=Oleksii Ignatenko
|dblpUrl=https://dblp.org/rec/conf/icteri/Ignatenko17
}}
==Game Theoretic Analysis of Multi-Processor Schedulers: Matrix
Multiplication Example==
Game Theoretic Analysis of Multi-Processor Schedulers: Matrix Multiplication Example Oleksii Ignatenko 1 Institute of Software Systems NAS Ukraine o.ignatenko@gmail.com Abstract. This paper deals with a game model of users performing parallel computing in a heterogeneous multiprocessor system. The proposed approach is applied to the problem of matrix multiplication on the system with the sched- uler of min-min type. The userβs action is to choose the size of the blocks into which the matrix is cut. Each user tries to optimize own finish time, which leads to conflict. Using the game theoretic approach, we build game model and found the conditions of Nash equilibrium existence in the scheduling game of two us- ers. We developed simulation model to verify the results. Keywords. parallel computing, schedulers, game theory, Nash equilibrium, Pa- reto efficiency. Key Terms. MathematicalModel, MultiAgentSystem, Infrastructure 1 Introduction Modern scientific problems require significant computing resources, so the problem of resource optimization in multiprocessor environments is very important. Nowa- days, computing algorithms operate in complex heterogeneous environments. It is common to have a distributed computational unit with many simultaneous programs from different users competing for computing and network resources. In most cases, the user is unable to control the distribution of resources. The allocation algorithms may contain defects and inefficiency and this can lead to a significant increase in processing time. That is why distributed computing requires efficient algorithms providing a flexible and stable allocation of resources. The problem is to deal with unfair and uneven access to resources, caused by heterogeneity of users and their tasks where each user is a rational agent that tries to increase its share of resources. This could bring the system to the inefficient equilibrium. A key element is an effi- cient algorithm for load distribution β scheduler, providing services to users. The idea of this work is to apply the game-theoretic approach to the problem of scheduling and allocation of computing resources in a dynamic heterogeneous envi- ronment with many competitive users. In this work we consider heterogeneous multi-processor computing system and asso- ciated constraint set a finite pool of processor resources (for each node), and limited link capacity. Our goal is to specify work schedule for each node in the way that the computing time (the time when the latest task is finished) is the smallest. This sched- ule also should satisfy all defined constraints. This is the classical multiprocessor scheduling problem, investigated in many works starting from [1]. It is well known that this problem is NP-hard. One possible solution is to reduce scheduling complexi- ty by using fluid model setup [2]. Another approach to this problem is to consider a game-theoretic approach, which is the current trend in networks and computing sys- tems [3]. In this work we construct static non-cooperative game for load balancing problem in single-class job distributed systems. This problem is investigated by many authors in cooperative (optimal) and game-oriented settings (see [4 - 7] for refer- ences). Here, we propose a new analysis of scheduler for matrix multiplication prob- lem in game setup. The proposed approach is applied to the problem of matrix multi- plication on the scheduler of min-min type. The userβs action is to choose the size of the blocks into which the matrix is cut. Each user tries to optimize own finish time, which eventually brings the system to an equilibrium state. This equilibrium is de- fined by schedulerβs type, so characteristic of equilibrium is important for scheduling policy analysis. As a result, we presented conditions for the existence of Nash equlibrium end proved Pareto inefficiency. Finally, we implement simulations using CloudSim package [8] and provide experiments on a heterogeneous multi-processor system to verify simula- tion and theoretic models. 2 Matrix Multiplication Model We consider an analytic computational model of parallel matrices multiplication developed in papers [9, 10]. It is assumed that computation nodes cannot interact and share data. Every node is connected with scheduler. Scheduler receives computational tasks from users and sends them to an available processor (according to its resource allocation algorithm). Every single processor works on its task and returns result. Let us fix notation. Consider the heterogeneous multi-processor system of m computa- tional elements, and every element has capacity ππ , π = 1, β¦ , π. Tasks are translated by network lines, which are assumed to be identical and have capacity π. In this work it is assumed that: 1. All processors start to work at the same time; 2. Scheduler makes assignments instantly; 3. Scheduling is deterministic. We will proceed by building simple fluid model for matrices multiplication ignoring transfer delays. Secondly, we provide generalization by including data transfer into model. Finally, we consider discrete model, which is the closest to practice. 2 2.1 Simplified Fluid Model First, let us consider parallel multiplication of two square matrices π Γ π. Using Block matrix multiplication algorithm user specifies block size π. Let the size of π2 block π be a natural number such that π = 2 is a natural number too. The algorithm π will produce π tasks, each with the complexity of π(π2 ). Let π(π, π) be the time when all userβs tasks are finished. The problem of time optimal matrix multiplication is the minimization function problem: π(π, π) β πππ Function π(π, π) has in general many local extremes, so searching for global minimum could be resource demanding problem. Promising direction of research is the fluid model analysis [2]. Let the user choose vector π₯(π) β π π with components π₯π (π), where π₯π (π) β₯ 0, π₯π (π) β€ π, π = 1, β¦ , π, βπ π=1 π₯π (π) = π. Denote π(π) as the set of all vectors π₯(π). Every compo- nent π₯π (π) is the amount of computation designed for execution on i-th processor. Firstly, we take into account only multiplication operation. This is a simplification but it allows us to understand basic properties of the computation process. Finish time was found in [9] and is defined by the following formulae π₯ ππ2 π(π₯, π(π)) = max { π }. π=1,..,π ππ The idea of the proposed approach is a fluid approximation to the problem. For the approximation, we assume that work is composed of homogeneous fluid rather than discrete jobs. Proposition 1. [9] Minimal task finish time (excluding transmit time) for a fluid model with one user is equal π = π 3 (βπ π=1 ππ ) β1 and ππππππ(π(π₯)) = π(π1 , β¦ , ππ ). In this work we employ general approach using convex analysis functions, which we expect to be a promising direction for future investigation of more complex sys- tems. Define Minkowski functional for set π and vector π β π π as: ππ (π) = πππ{π > 0: π β ππ}. It is known that Minkowski functional is convex for convex π. Let us define the set of capabilities of the computation system π = {π β π π : ππ β [0, ππ ]} and rescale it π as following: π (π) = 2 ππ Proposition 2. The following equality is true π(π₯, π(π)) = ππ (π) (π). Proof. Consider right-hand side. It is clear thatππ (π) (π₯) = πππ{π > 0: π₯ β π₯ ππ (π₯)}. A Vector π₯ belongs to the set π if and only if max { π } = 1, so ππ (π) (π₯) = π=1,..,π ππ π₯ π π₯ ππ2 πππ {π > 0: max { π } = }. This is equivalent to equality π = max { π }. π=1,..,π ππ ππ2 π=1,..,π ππ Note. There is exists minimum ππππ = min ππ (π) (π₯) and this minimum is π₯βπ(π) unique. 3 2.2 General Fluid Model To take into account transfer time we note, that block algorithm sends 2π₯π ππ el- ements on each node and receives π₯π π2 elements. So, summary time is equal to π₯ ππ2 π₯ (π2 +2ππ) ππ (π₯, π(π)) = max { π + π }. π=1,β¦,π ππ π Proposition 3. There is minimum of ππ (π₯, π(π)) with respect to π₯ β π(π) Proof. X(n) is convex compact. Function Ts (x, X(n)) is continuous and convex, so there is the minimum point. 2.3 Discrete Model and Schedulers Time minimization should be performed on finite net: π(π) = {π¦ β π π : π¦π β {0,1, β¦ , π}, βπ π¦π = π, π = 1, . . , π}. It is clear that π(π) β π(π). Now we consider the notion of a scheduler. The user chooses the size of the block π and π(π). The scheduler is an algorithm responsible for specifying concrete point π¦ β β π(π). In this work, we will consider only simple scheduler of extreme β extreme type and perform simulations and inves- tigation for min-min scheduler only. The min-min algorithm is quite popular and simple. The idea of min-min is following. 1. The scheduler receives π tasks, every task has complexity ππ2 ; 2. The scheduler chooses task with minimal computation complexity (in the case of equal tasks the choice is random); 3. The scheduler sends chosen task on the free processor with maximal capaci- ty or waits in the case of no free resources. 4. If the queue is not empty then return to 2. The result of algorithm is the pair of vector π¦ and finish time (finish time of the last task) Fix the size of block π and consider finish time. Proposition 4. For arbitrary π following inequalities are true: ππ (π) = min π(π¦, π(π)) β₯ min π(π₯, π(π)) π¦βπ(π) π₯βπ(π) πππππππ (π) β₯ ππ (π) Proof. Here we give a sketch of proof. The first inequality is true because π(π) β π(π). The second inequality holds since ππ (π) is minimum by definition. 3 Non-Cooperative Scheduling Game Formulation We will deal with non-cooperative games in strategic or normal form. A non- cooperativeness here does not imply that the players do not cooperate, but it means that any cooperation must be self-enforcing without any coordination among the play- ers. The strict definition is as follows. A non-cooperative game in strategic (or normal) form is a triplet πΊ = {π, {ππ }πβπ , {π’π }πβπ } , where: β’ π is a finite set of players; 4 β’ ππ is the set of admissible strategies for player i. β’ π’π : π β π is the utility (payoff) function for player i. A game is said to be static if the players take their actions only once, inde- pendently of each other. In some sense, a static game is a game without any notion of time, where no player has any knowledge of the decisions taken by the other players. Based on the assumption that all players are rational, the players try to maximize their payoffs when responding to other playersβ strategies. Generally speaking, the final result is determined by non-cooperative maximization of integrated utility. In this regard, the most accepted solution concept for a non-cooperative game is Nash equilibrium [3], introduced by John F. Nash. Loosely speaking, Nash equilibrium is a state of a non-cooperative game where no player can improve its utility by changing its strategy if the other players maintain their current strategies. Formally, pure- strategy Nash equilibrium (NE) of a non-cooperative game πΊ is a strategy profile π β β π such that for all π β π we have the following: π’π (π πβ , π βπ β β ) β₯ π’π (π π , π βπ ) for all π π β ππ . Here π βπ denotes the vector of strategies of all players except i. In other words, a strategy profile is a pure-strategy Nash equilibrium if no player has an incentive to unilaterally deviate to another strategy, given that other playersβ strategies remain fixed. Let us formulate scheduling game for matrix multiplication problem. Players are users of distributed system. Define the set of players as {π’π }πβπΏ , where πΏ is set of indexes. Users have available multi-processors system with π computational elements. Each element has capacity ππ , π = 1, . . , π. We assume every user has two square matrices with dimension ππ , π β πΏ. The set of admissible strategies for player l is a conjunction of all possible cuts ππ β πΎπ , , π β πΏ. After the player chooses his strategy blocks are translated to a scheduler, which sends them to processors. Define finish time for l-th player as the time of finishing of last task ππ , π β πΏ. Every player wants to minimize his finish time. In current work we consider problem when: 1. The min-min scheduler is used. 2. The set of admissible sizes {ππ }π=1,..,π is sorted in ascending order. 3. If players choose the same sizes, their finish times are the same. Finish time in this case is equal to double individual time for this size. 4. There is unique minimum ππ (ππ ), π = 1, β¦ , π . Denote argminimum index as π β. 5. There are two players in the system. In order to use game theory methods, we build the game matrix, using following rules. Let players choose strategies π1 , π2 . Denote their payoffs as π1 (π1 , π2 ) and π2 (π1 , π2 ) respectively. 1. If π1 < π2 , then π1 (π1 , π2 ) = ππ (π1 ), π2 (π1 , π2 ) = ππ (π1 ) + ππ (π2 ). 2. If π1 = π2 , then π1 (π1 , π1 ) = π2 (π1 , π1 ) = 2ππ (π1 ). Proposition 5. If there is exists π β such that inequality 2ππ (ππ β ) β€ ππ (ππ β β1 ) holds, then (ππ β , ππ β ) β Nash equilibrium. Proof. By definition (ππ β , ππ β ) is Nash equilibrium if: π1 (ππ β , ππ β ) β€ π1 (ππ ββ1 , ππ β ), π2 (ππ β , ππ β ) β€ π2 (ππ β , ππ β β1 ). Using rules, defined above we obtain: 5 π1 (ππ β , ππ β ) = 2ππ (ππ β ), π1 (ππ ββ1 , ππ β ) = ππ (ππ β β1 ). The same is valid for the second player. If inequality 2ππ (ππ β ) β€ ππ (ππ β β1 ) holds, (ππ β , ππ β ) β Nash equilibrium. Proposition 6. If there is exists π β such that inequality 2ππ (ππ β ) β₯ ππ (ππ β β1 ) holds, then (ππ ββ1 , ππ β β1 ) β Nash equilibrium. Proof. By definition (ππ β β1 , ππ β β1 ) is Nash equilibrium if: π1 (ππ β , ππ β ) β₯ π1 (ππ ββ1 , ππ β ), π2 (ππ β , ππ β ) β₯ π2 (ππ β , ππ β β1 ). Using rules, defined above we obtain: π1 (ππ β , ππ β β1 ) = ππ (ππ ββ1 ) + ππ (ππ β ), π1 (ππ β β1 , ππ ββ1 ) = 2ππ (ππ β β1 ). The same is valid for the second player. If inequality 2ππ (ππ β ) β₯ ππ (ππ β β1 ) holds, then π1 (ππ β , ππ β β1 ) β₯ π1 (ππ β β1 , ππ β ) and (ππ ββ1 , ππ ββ1 ) β Nash equi- librium. Note. Nash equilibrium is always Pareto-inefficient, in other words π1 (ππ β , ππ β ) β€ π1 (ππ β β1 , ππ β ), π2 (ππ β , ππ β ) β€ π2 (ππ ββ1 , ππ β ). This is common situation in games of considered type. 4 Simulations We have implemented simulations using CloudSim package and real multi- processing system of Institute of Software Systems NAS Ukraine. The experiments were designed to optimize finish time for one user. Matrices of 1200 on 1200 dimen- sion were used. The experiment was performed on the node with two processors Quad Core Intel Xeon E5405 2GHz and 16 GB DDR2 @667 Mhz RAM (making 7 slave servers and 1 scheduler node). The graph of Time-Size dependency is shown in the Fig. 1. Fig. 1. Finish time β size of task graph 6 Using estimation of the main parameters from experiments we have built the simu- lation model for scheduling game with two players (1200x1200 matrix, strategies β size of tasks) and min-min scheduler. Results are shown in the Fig 2. Fig. 2. Finish time surface for scheduling game of two players. Real experiments approximation (left) and simulation using theoretic construction (right) 5 Conclusions In this paper, we have presented the approach to deal with problems of scheduling and load balancing using a game-theoretic framework. The general objective was to identify and address the efficiency problems, where game theory can be applied to the model and evaluate user conflicts problems and consequently to design efficient solu- tion. We consider the fluid model of computations to calculate the "ideal" finish time, which gives the lower bound of possible real time. We propose the game model of user's interaction on the example of matrix multiplication problem. We use simulation environment GridSim to obtain experimental data and validate theoretical results. We investigate the interaction model's users performing parallel computing in a heterogeneous multiprocessor system. The proposed hike is applied to the problem of matrix multiplication using the scheduler min-min. Resolving this case is the size of the blocks into which the matrix is cut. The experimental system characteristics have been used to adjust the simulation model, allowing to measure the time estimate for completion of all possible combinations of partitioning tasks to processors and end time to build finish time surface for each user. The findings were substantiated and summarized based on the game approach, in particular, found the conditions of Nash equilibrium point existence in the game interaction between two users. References 1. Srinivasa Prasanna G.N., Musicus B. Generalized Multiprocessor Scheduling Using Opti- mal Control // Proc. SPAA. β 1991, P. 216 β 228. 2. Nazarathy Y., Weiss G. A Fluid Approach to Large Volume Job Shop Scheduling // Jour- nal of Scheduling, 13(5), 509-529, (2010). 3. Han, Zhu, et al. Game theory in wireless and communication networks. Cambridge Uni- versity Press, 2012. 7 4. S. Penmatsa, A. T. Chronopoulos. Game-theoretic static load balancing for distributed systems. Journal of Parallel and Distributed Computing 71, no. 4 (2011): 537-555 5. Wei, Guiyi, et al. A game-theoretic method of fair resource allocation for cloud computing services. The journal of supercomputing 54.2 (2010): 252-269. 6. Siar, Hajar, Kourosh Kiani, and Anthony T. Chronopoulos. An effective game theoretic static load balancing applied to distributed computing. Cluster Computing 18.4 (2015): 1609-1623. 7. Li, Kai, Yong Wang, and Meilin Liu. A non-cooperative game model for reliability-based task scheduling in cloud computing. arXiv preprint arXiv:1403.5012 (2014). 8. https://en.wikipedia.org/wiki/CloudSim 9. Anatoly, Doroshenko, Ignatenko Oleksii, and Ivanenko Pavlo. One model of optimal resource allocation in homogeneous multiprocessor system // Problems in programming 1 (2011): 29-39. 10. Andon, F. I., and O. P. Ignatenko. "Modeling conflict processes on the internet." Cyber- netics and Systems Analysis 49.4 (2013): 616-623. 11. Ignatenko, O., Synetskyi, O. (2014). Evolutionary Game of N Competing AIMD Connec- tions. In Information and Communication Technologies in Education, Research, and In- dustrial Applications (pp. 325-342). Springer International Publishing. 8