Praktikum Wissenschaftliches Rechnen (Performance-optimized optimized Programming)

Similar documents
Load balancing Static Load Balancing

Load Balancing and Termination Detection

Load Balancing and Termination Detection

Load Balancing and Termination Detection

Chapter 7 Load Balancing and Termination Detection

LOAD BALANCING TECHNIQUES

Load Balancing. Load Balancing 1 / 24

Load Balancing Techniques

Keywords: Dynamic Load Balancing, Process Migration, Load Indices, Threshold Level, Response Time, Process Age.

Load balancing; Termination detection

Various Schemes of Load Balancing in Distributed Systems- A Review

Introduction. Swarm Intelligence - Thiemo Krink EVALife Group, Dept. of Computer Science, University of Aarhus

CHAPTER 5 WLDMA: A NEW LOAD BALANCING STRATEGY FOR WAN ENVIRONMENT

DYNAMIC LOAD BALANCING IN A DECENTRALISED DISTRIBUTED SYSTEM

A Survey on Load Balancing Techniques Using ACO Algorithm

A SURVEY ON LOAD BALANCING ALGORITHMS IN CLOUD COMPUTING

Load balancing; Termination detection

AN EFFICIENT LOAD BALANCING APPROACH IN CLOUD SERVER USING ANT COLONY OPTIMIZATION

A Load Balancing Algorithm based on the Variation Trend of Entropy in Homogeneous Cluster

A Study on the Application of Existing Load Balancing Algorithms for Large, Dynamic, Heterogeneous Distributed Systems

RESEARCH PAPER International Journal of Recent Trends in Engineering, Vol 1, No. 1, May 2009

Static Load Balancing

Journal of Theoretical and Applied Information Technology 20 th July Vol.77. No JATIT & LLS. All rights reserved.

ADAPTIVE LOAD BALANCING FOR CLUSTER USING CONTENT AWARENESS WITH TRAFFIC MONITORING Archana Nigam, Tejprakash Singh, Anuj Tiwari, Ankita Singhal

A Survey Of Various Load Balancing Algorithms In Cloud Computing

CLOUD COMPUTING PARTITIONING ALGORITHM AND LOAD BALANCING ALGORITHM

AN EFFICIENT DISTRIBUTED CONTROL LAW FOR LOAD BALANCING IN CONTENT DELIVERY NETWORKS

Global Load Balancing and Primary Backup Approach for Fault Tolerant Scheduling in Computational Grid

A Survey on Load Balancing and Scheduling in Cloud Computing

DECENTRALIZED LOAD BALANCING IN HETEROGENEOUS SYSTEMS USING DIFFUSION APPROACH

A SIMULATOR FOR LOAD BALANCING ANALYSIS IN DISTRIBUTED SYSTEMS

Distributed Dynamic Load Balancing for Iterative-Stencil Applications

CSE 4351/5351 Notes 7: Task Scheduling & Load Balancing

MEASURING PERFORMANCE OF DYNAMIC LOAD BALANCING ALGORITHMS IN DISTRIBUTED COMPUTING APPLICATIONS

Algorithms and Data Structures

How To Balance In Cloud Computing

An Efficient load balancing using Genetic algorithm in Hierarchical structured distributed system

International Journal of Scientific & Engineering Research, Volume 6, Issue 4, April ISSN

A Novel Switch Mechanism for Load Balancing in Public Cloud

1. Comments on reviews a. Need to avoid just summarizing web page asks you for:

Cisco Dynamic Workload Scaling Solution

CHAPTER 3 CALL CENTER QUEUING MODEL WITH LOGNORMAL SERVICE TIME DISTRIBUTION

Design and Implementation of Efficient Load Balancing Algorithm in Grid Environment

Comparison on Different Load Balancing Algorithms of Peer to Peer Networks

IMPROVED PROXIMITY AWARE LOAD BALANCING FOR HETEROGENEOUS NODES

Fair Scheduling Algorithm with Dynamic Load Balancing Using In Grid Computing

Principles and characteristics of distributed systems and environments

International Journal of Scientific & Engineering Research, Volume 4, Issue 11, November ISSN

CHAPTER 2 MODELLING FOR DISTRIBUTED NETWORK SYSTEMS: THE CLIENT- SERVER MODEL

A Review on an Algorithm for Dynamic Load Balancing in Distributed Network with Multiple Supporting Nodes with Interrupt Service

Expanding the CASEsim Framework to Facilitate Load Balancing of Social Network Simulations

Dynamic Load Balancing Algorithms For Cloud Computing

A Review on Load Balancing In Cloud Computing 1

HYBRID ACO-IWD OPTIMIZATION ALGORITHM FOR MINIMIZING WEIGHTED FLOWTIME IN CLOUD-BASED PARAMETER SWEEP EXPERIMENTS

A number of tasks executing serially or in parallel. Distribute tasks on processors so that minimal execution time is achieved. Optimal distribution

Scheduling Allowance Adaptability in Load Balancing technique for Distributed Systems

From Self-Organising Mechanisms to Design Patterns

AN ADAPTIVE DISTRIBUTED LOAD BALANCING TECHNIQUE FOR CLOUD COMPUTING

PPD: Scheduling and Load Balancing 2

LOAD BALANCING IN CLOUD COMPUTING

An Approach to Load Balancing In Cloud Computing

Load balancing in a heterogeneous computer system by self-organizing Kohonen network

A Clustered Approach for Load Balancing in Distributed Systems

How To Create A P2P Network

Sla Aware Load Balancing Algorithm Using Join-Idle Queue for Virtual Machines in Cloud Computing

SIMULATION OF LOAD BALANCING ALGORITHMS: A Comparative Study

Copyright 1

Grid Scheduling Dictionary of Terms and Keywords

A Dynamic Approach for Load Balancing using Clusters

Load Balancing in the Cloud Computing Using Virtual Machine Migration: A Review

A Comparative Performance Analysis of Load Balancing Algorithms in Distributed System using Qualitative Parameters

A DISTRIBUTED APPROACH TO ANT COLONY OPTIMIZATION

The International Journal Of Science & Technoledge (ISSN X)

A New Modified HBB Optimized Load Balancing in Cloud Computing

Research Article International Journal of Emerging Research in Management &Technology ISSN: (Volume-4, Issue-5) Abstract

System Interconnect Architectures. Goals and Analysis. Network Properties and Routing. Terminology - 2. Terminology - 1

On-line scheduling algorithm for real-time multiprocessor systems with ACO

Load Balancing Algorithms for Peer to Peer and Client Server Distributed Environments

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

Announcements. Basic Concepts. Histogram of Typical CPU- Burst Times. Dispatcher. CPU Scheduler. Burst Cycle. Reading

Intel Ethernet Switch Load Balancing System Design Using Advanced Features in Intel Ethernet Switch Family

How To Find Influence Between Two Concepts In A Network

Load Balancing using DWARR Algorithm in Cloud Computing

Preserving Message Integrity in Dynamic Process Migration

Keywords Load balancing, Dispatcher, Distributed Cluster Server, Static Load balancing, Dynamic Load balancing.

International Journal of Computer Science Trends and Technology (IJCST) Volume 2 Issue 4, July-Aug 2014

@IJMTER-2015, All rights Reserved 355

Efficient Parallel Processing on Public Cloud Servers Using Load Balancing

SCHEDULING IN CLOUD COMPUTING

CROSS LAYER BASED MULTIPATH ROUTING FOR LOAD BALANCING

Study on Cloud Computing Resource Scheduling Strategy Based on the Ant Colony Optimization Algorithm

Final Report. Cluster Scheduling. Submitted by: Priti Lohani

Transcription:

Praktikum Wissenschaftliches Rechnen (Performance-optimized optimized Programming) Dynamic Load Balancing Dr. Ralf-Peter Mundani Center for Simulation Technology in Engineering Technische Universität München

Overview definitions examples of load balancing strategies swarm intelligence Computers make it easier to do a lot of things, but most of the things they make it easier to do don t need to be done. Andy Rooney Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 2

Definitions load distribution and load balancing are essential issues to exploit the full potential of parallel programs some foundations motivation static load balancing dynamic load balancing centralised dynamic load balancing decentralised dynamic load balancing load models strategy selection Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 3

Definitions motivation central issue: fairly distribution of computations across all processors / nodes in order to optimise run time (user s point of view) system load (computing centre s point of view) so far, division of a problem into a fixed number of processes to be executed in parallel problem amount of work is often not known prior to execution load situation changes permanently (adaptive mesh refinement within numerical simulations, I/O, searches, ) different processor speeds (heterogeneous systems, e. g.) different latencies for communication (grid computing, e. g.) objective: load distribution or load balancing strategies Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 4

Definitions static load balancing to be applied before the execution of any process (in contrast to dynamic load balancing to be applied during the execution) usually referred to as mapping problem or scheduling problem potential static load-balancing techniques round robin: assigning tasks (more general formulation than work to cover both data and function parallelism) in sequential order to processes coming back to the first when all processes have been given a task randomised: selecting processes at random to assign tasks recursive bisection: recursive division of problems into smaller subproblems of equal computational effort with less communication costs genetic algorithm: finding an optimal distribution of tasks according to a given objective function Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 5

Definitions static load balancing (cont d) mapping should reflect communication pattern of processes in case of static network topologies when assigning tasks, i. e. short communication paths between processors / nodes to be preferred ( NP-complete problem) missing knowledge about execution times of various parts of a program might lead to very inaccurate mappings communication delays that vary under different circumstances are difficult to incorporate (via variable communication delays) with static load balancing algorithms might have an indeterminate number of steps to reach their solutions (traversing a graph in search algorithms, e. g.) hence, different approaches needed to overcome the mentioned problems Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 6

Definitions dynamic load balancing division of tasks dependent upon the execution of parts of the program as they are being executed entails additional overhead (to be kept as small as possible, else bureaucracy wins) assignment of tasks to processes can be classified as centralised tasks are handed out from a centralised location within a master-slave structure one dedicated master process directly controls each of a set of slave processes decentralised tasks are passed between arbitrary processes worker processes operate upon the problem and interact among themselves a worker process may receive tasks from other or may send tasks to other worker processes Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 7

Definitions centralised dynamic load balancing example: work pool master process holds a collection of tasks to be performed by the slave processes tasks are sent ( ) to slave processes when a task is completed, a slave process requests ( ) another task from the master process all slaves are the same (replicated worker), but specialised slaves capable of performing certain tasks are also possible work pool master queue with tasks slave slave Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 8

Definitions centralised dynamic load balancing (cont d) work pool techniques can also be readily applied when tasks are quite different and of different size (in general, it is best to hand out larger tasks first to prevent idle waiting) amount of tasks may change during execution, i. e. execution of one task might generate new tasks (to be submitted to the master) computation terminates if both of the following are satisfied 1) task queue is empty 2) every process made a request for another task without any new tasks being generated (even if (1) is true a still running process may provide new tasks for the task queue) a slave may detect the program termination condition by some local termination condition (searches, e. g.), hence it has to send a termination message to the master for closing down all others Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 9

Definitions decentralised dynamic load balancing example: distributed work pool drawback of centralised model: master might become bottleneck in case of too many slaves hence, work pool is distributed among several masters each master controls one group of slaves several layers of decomposition possible building up a tree hierarchy with tasks being passed downwards and requests / messages being passes upwards M 0 M 1 M N Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 10

Definitions decentralised dynamic load balancing (cont d) example: fully distributed work pool once tasks are (initially) distributed among processes (that moreover are able to generate new tasks), all processes can execute tasks from each other tasks could be transferred by a receiver-initiated method: a process that has only few or no tasks to perform requests tasks from other processes it selects (works well at high system loads) sender-initiated method: a process with heavy load sends tasks to other processes it selects and that are willing to accept them (works well at light overall system loads) in general, avoid passing on the same task that is received which one to prefer, what kind of flaws do they have? Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 11

Definitions load models decisions of any strategy about passing / requesting tasks are based on the local load problem: measurement of the load reliable load models are based upon load indices simple and composite load indices (one or more quantities) might refer to different functional units (CPU, bus, memory, ) snapshot or integrated or averaged quantities stochastic quantities to reflect external influences properties of a good load index precisely reflects the target quantity at present allows for accurate predictions concerning the future smoothing behaviour to compensate peaks based upon some simple formula, easy to compute Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 12

Definitions strategy selection not all strategies are appropriate for any problem crucial task: how to find the best strategy for a given problem main aspects to be considered objective: optimisation of load or run time level of integration: OS, runtime system (MPI, e. g.), application units to distribute: process / thread, parts of program, data, further aspects static / dynamic strategies, central / decentral strategies source of initiative: idle slave, overloaded slave, master, costs of the chosen strategy (computation should dominate load distribution and not vice versa) placement of new processes or real process migration Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 13

Examples of Load Balancing Strategies quite a huge amount of different strategies do exist that all vary according to the underlying way of distributing tasks selected examples bidding balanced allocation broker system random matching precalculation of the load Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 14

Examples of Load Balancing Strategies bidding (economic model) analogy to mechanisms of price fixing in markets idea process (with high workload) advertises tasks to its neighbours neighbours submit their free resources as bid process with highest bid (i. e. largest free resources) wins remarks maybe several rounds of bidding necessary successively extending the range of bidders in case of sudden workload peaks, a process might reject the purchased tasks processes with free resources are still allowed to ask for tasks drawback: quite complex analysis of this model Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 15

Examples of Load Balancing Strategies balanced allocation (balls into bins) basic idea: placing N balls into N bins at random choice (extensively studied problem from probability and statistics) variant of the above each ball comes with D possible destinations (to be placed), chosen independently and uniformly at random then the ball is placed in the least full bin among the D possible destinations applied to load balancing: a process selects D processes at random and passes some of its workload to the least loaded one for temporary tasks (i. e. tasks that are finished at unpredictable times) this strategy has a competitive ratio of Ο( N ) compared to the optimal off-line strategy (that has global knowledge) Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 16

Examples of Load Balancing Strategies broker system origin of the idea: brokers at the stock exchange designed and especially well-suited for hierarchical topologies idea each processor has one broker with local knowledge (about workload in subtree, e. g.) tasks arrive at the local broker (via an application server) and are dependent from the available budget processed locally or passed to the parent node on some level (at least at the root node), some price-based decision and allocation is done prices have to be paid for using remote resources as well as for the broking itself local computations are cheaper flexible strategy for hierarchical and heterogeneous topologies Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 17

Examples of Load Balancing Strategies random matching origin of the idea: graph theory principle construct a matching in the topology graph G = (V, E) of the network (set of vertices V are the processors, set of edges E are the direct connections between processors) matching: injective function f: x y for all x, y V perfect load balancing along all edges of the matching this is an iterative strategy, hence several steps are necessary matching must be found in parallel start with an empty set of edges in each vertex local selection (by chance) of one incident edge in each vertex coordination with neighbouring vertices, solution of conflicts Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 18

Examples of Load Balancing Strategies precalculation of the load all strategies so far are based on local information only hence, load balancing is often quite expensive since (from a global point of view) balancing steps not always lead to a better load distribution among the processors idea global determination of the workload at program start or at certain points in time global determination of an appropriate load distribution workload transfer with less communication developed and used for hierarchical network topologies workload recording and load balancing between child and parent nodes Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 19

Swarm Intelligence meanwhile, there exists a quite widespread usage of swarm intelligence throughout different fields within computer science (TSP, shortest path problems, traffic simulations, ) an unconventional load balancing strategy with origins in ant colonies in nature basics complex adaptive systems anthill system load balancing Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 20

Swarm Intelligence basics origin of the idea: ant colonies in nature ants and termites (as well as some bees and wasps) belong to the class of so called social insects main characteristic of the above: building colonies ants communicate indirectly via scent, also known as stigmergy (modification of local environment) therefore, ants use pheromones to be left along their paths for others to follow to label bulk material inside the nest if an ant finds a path to some food it will mark it, hence other can follow until they find a better path nevertheless, ants may by chance decide not to follow chance of exploring alternatives model of ant nest Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 21

Swarm Intelligence basics (cont d) even a central decision maker is missing, ant colonies have a high grade of structure and organisation self-organisation self-organisation is based on the following properties positive / negative feedback: one ant follows a path or it does not follow a path (due to dissolution of pheromones, e. g.) amplification of deviation: if one doesn t follow and finds some closer food, successively all others will follow the new path mutual communication: key for spreading information among ants and exploiting advantages induced by negative feedback hence, ant colonies are often referred to as collective or swarm intelligence they can adopt to their environment and related problems they can adopt their environment according to their demands Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 22

Swarm Intelligence complex adaptive systems P2P systems have a decentralised control and exhibit extreme dynamism in structure and workload problem: classical approaches cannot deal with this dynamism hence, a paradigm shift to self-organisation, adaptation, and resilience as fundamental properties is necessary complex adaptive systems (CAS) used to explain the behaviour of certain biological and social systems might come up for this shift they consist of a large number of relatively simple autonomous computing units, i. e. agents they exhibit so called emergent behaviour, i. e. interaction among agents can give rise to richer and more complex patterns than those generated by single agents (in isolation) example of a CAS instance drawn from nature: ant colonies Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 23

Swarm Intelligence complex adaptive systems (cont d) three simple rules for artificial ant colonies (RESNICK, 1994) 1) ant wanders around randomly, until it encounters an object 2) if it was carrying an object, it drops the object and continues to wander randomly 3) if it was not carrying an object, it picks the object up and continues to wander independent of the initial distribution of objects, a colony of those ants is able to group objects into large clusters although there are no rules specific to initial conditions, unforeseen scenarios, variations in the environment, or presence of failures global behaviour of large enough colonies is adaptive and resilient hence, CAS can achieve these properties without explicitly embedding them into the individual agents Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 24

Swarm Intelligence anthill system proposed by MONTRESOR, MELING, and BABAOĞLU (2002) composed of a self-organising overlay network of interconnected nests, where each nest is capable of hosting resources and performing computations every node in the system is allowed to generate new tasks and to submit them to the network (tasks may remain in the originator or being transferred to other nests load balancing) ants (autonomous agents) are generated by nests and travel across the nest network to detect unused computational power nest 1 nest 3 nest 4 nest 2 nest 5 Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 25

Swarm Intelligence load balancing variation of RESNICK s artificial ant algorithm 1) when an ant is not carrying any object, it wanders about randomly until it encounters an object and picks it up 2) when an ant is carrying an object, the ant drops it only after having wandered about randomly for a while without encountering other objects colonies of such ants try to disperse objects (i. e. the actual tasks) uniformly over their environment rather than clustering them ants may assume two different states searchmax: ant wanders about until it finds an overloaded nest; ant records nest s identifier and switches to searchmin searchmin: ant wanders about looking for an underloaded nest; ant requests local task manager for task transfer from over- to underloaded nest and switches back to searchmax Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 26

Swarm Intelligence load balancing (cont d) ants do not transport tasks to avoid carrying potentially large amount of data from one node to another while wandering about concept of overloaded and underloaded nests are relative to the average load of the nests recently visited by an ant enables ants to make decisions about task transfers between nests with unbalanced loads without the necessity of a global knowledge each nest stores collected information about an ant s last visited nests to be used by subsequent ants to drive their searchmax or searchmin phase at each step, the ant randomly selects the next node to visit among those that are believed to be more overloaded or underloaded, resp. results: 100 idle nests and initially 10,000 tasks in one single node only 15 20 iterations to transfer tasks to all other nodes after 50 iterations, the workload is perfectly balanced Dr. Ralf- Peter Mundani Praktikum Wissenschaftliches Rechnen Winter Term 2007/08 27