Parallel DBMS. Parallel Database Systems. PDBS vs Distributed DBS. Types of Parallelism. Goals and Metrics Speedup. Types of Parallelism

Similar documents
Parallel DBMS. Chapter 22, Part A

COURSE 12. Parallel DBMS

PARALLEL & DISTRIBUTED DATABASES CS561-SPRING 2012 WPI, MOHAMED ELTABAKH

CompSci 516: Database Systems. Lecture 20. Parallel DBMS. Instructor: Sudeepa Roy

Parallel DBMS. Prof. Yanlei Diao. University of Massachusetts Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke

Parallel DBMS. Lecture 20. Reading Material. Instructor: Sudeepa Roy. Reading Material. Parallel vs. Distributed DBMS. Parallel DBMS 11/15/18

Outline. Parallel Database Systems. Information explosion. Parallelism in DBMSs. Relational DBMS parallelism. Relational DBMSs.

Systems Infrastructure for Data Science. Web Science Group Uni Freiburg WS 2014/15

Chapter 18: Parallel Databases

Chapter 18: Parallel Databases. Chapter 18: Parallel Databases. Parallelism in Databases. Introduction

! Parallel machines are becoming quite common and affordable. ! Databases are growing increasingly large

Chapter 20: Parallel Databases

Chapter 20: Parallel Databases. Introduction

Advanced Databases: Parallel Databases A.Poulovassilis

Parallel DBMS. Lecture 20. Reading Material. Instructor: Sudeepa Roy. Reading Material. Parallel vs. Distributed DBMS. Parallel DBMS 11/7/17

Chapter 17: Parallel Databases

Parallel Databases C H A P T E R18. Practice Exercises

Selection Queries. to answer a selection query (ssn=10) needs to traverse a full path.

Announcements. Database Systems CSE 414. Why compute in parallel? Big Data 10/11/2017. Two Kinds of Parallel Data Processing

Advanced Databases. Lecture 15- Parallel Databases (continued) Masood Niazi Torshiz Islamic Azad University- Mashhad Branch

B.H.GARDI COLLEGE OF ENGINEERING & TECHNOLOGY (MCA Dept.) Parallel Database Database Management System - 2

Huge market -- essentially all high performance databases work this way

σ (R.B = 1 v R.C > 3) (S.D = 2) Conjunctive normal form Topics for the Day Distributed Databases Query Processing Steps Decomposition

CSE 544: Principles of Database Systems

Course Content. Parallel & Distributed Databases. Objectives of Lecture 12 Parallel and Distributed Databases

Parallel DBs. April 25, 2017

CSE 344 MAY 2 ND MAP/REDUCE

CS 347 Parallel and Distributed Data Processing

data parallelism Chris Olston Yahoo! Research

Parallel DBs. April 23, 2018

Track Join. Distributed Joins with Minimal Network Traffic. Orestis Polychroniou! Rajkumar Sen! Kenneth A. Ross

Lecture 8 Index (B+-Tree and Hash)

Chapter 18: Parallel Databases

Hash-Based Indexes. Chapter 11. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1

Architecture and Implementation of Database Systems (Winter 2014/15)

Query Execution [15]

Chapter 18: Database System Architectures.! Centralized Systems! Client--Server Systems! Parallel Systems! Distributed Systems!

Access Methods. Basic Concepts. Index Evaluation Metrics. search key pointer. record. value. Value

Chapter 12: Query Processing. Chapter 12: Query Processing

CS-460 Database Management Systems

Database Applications (15-415)

Introduction to Database Systems CSE 414. Lecture 16: Query Evaluation

Chapter 6. Hash-Based Indexing. Efficient Support for Equality Search. Architecture and Implementation of Database Systems Summer 2014

Chapter 13: Query Processing

Parallel Nested Loops

Parallel Partition-Based. Parallel Nested Loops. Median. More Join Thoughts. Parallel Office Tools 9/15/2011

Introduction to Data Management CSE 344

CMSC424: Database Design. Instructor: Amol Deshpande

Hashed-Based Indexing

CSE 544, Winter 2009, Final Examination 11 March 2009

! A relational algebra expression may have many equivalent. ! Cost is generally measured as total elapsed time for

Chapter 13: Query Processing Basic Steps in Query Processing

Database Applications (15-415)

Chapter 20: Database System Architectures

Chapter 12: Query Processing

Advanced Database Systems

Introduction to Query Processing and Query Optimization Techniques. Copyright 2011 Ramez Elmasri and Shamkant Navathe

Parser: SQL parse tree

Morsel- Drive Parallelism: A NUMA- Aware Query Evaluation Framework for the Many- Core Age. Presented by Dennis Grishin

Principles of Database Management Systems

DISTRIBUTED DATABASES CS561-SPRING 2012 WPI, MOHAMED ELTABAKH

Chained Declustering: A New Availability Strategy for Multiprocssor Database machines

CS551 Router Queue Management

Introduction to Database Systems CSE 414

CSE 344 MAY 7 TH EXAM REVIEW

Introduction to Data Management CSE 344

CSIT5300: Advanced Database Systems

Chapter 12: Indexing and Hashing. Basic Concepts

Query Processing. Debapriyo Majumdar Indian Sta4s4cal Ins4tute Kolkata DBMS PGDBA 2016

Query Processing. Introduction to Databases CompSci 316 Fall 2017

Database Architectures

Chapter 12: Indexing and Hashing

Introduction to Data Management CSE 344

Database Architectures

Chapter 18: Parallel Databases Chapter 19: Distributed Databases ETC.

Hash-Based Indexes. Chapter 11

Hash-Based Indexes. Chapter 11 Ramakrishnan & Gehrke (Sections ) CPSC 404, Laks V.S. Lakshmanan 1

Indexing. Week 14, Spring Edited by M. Naci Akkøk, , Contains slides from 8-9. April 2002 by Hector Garcia-Molina, Vera Goebel

University of Waterloo Midterm Examination Sample Solution

RELATIONAL OPERATORS #1

Database System Concepts

CS 564 Final Exam Fall 2015 Answers

Parallel Query Optimisation

Introduction to Data Management CSE 344

Evaluation of Relational Operations: Other Techniques. Chapter 14 Sayyed Nezhadi

University of Waterloo Midterm Examination Solution

Lecture 23 Database System Architectures

Algorithms for Query Processing and Optimization. 0. Introduction to Query Processing (1)

Module 4. Implementation of XQuery. Part 0: Background on relational query processing

What We Have Already Learned. DBMS Deployment: Local. Where We Are Headed Next. DBMS Deployment: 3 Tiers. DBMS Deployment: Client/Server

7. Query Processing and Optimization

Implementation of Relational Operations

CMSC424: Database Design. Instructor: Amol Deshpande

6.830 Lecture 8 10/2/2017. Lab 2 -- Due Weds. Project meeting sign ups. Recap column stores & paper. Join Processing:

CAS CS 460/660 Introduction to Database Systems. Query Evaluation II 1.1

Chapter 12: Indexing and Hashing

Distributed DBMS. Concepts. Concepts. Distributed DBMS. Concepts. Concepts 9/8/2014

Evaluation of Relational Operations. Relational Operations

Systems Infrastructure for Data Science. Web Science Group Uni Freiburg WS 2014/15

Architecture-Conscious Database Systems

Transcription:

Parallel DBMS Parallel Database Systems CS5225 Parallel DB 1 Uniprocessor technology has reached its limit Difficult to build machines powerful enough to meet the CPU and I/O demands of DBMS serving large number of users At 10 MB/s, 1.2 days to scan 1 TB of data With 1000 nodes, it takes only 1.5 minutes to scan! PDBS a DBMS implemented on a multiprocessor Attempts to achieve high performance through parallelism CS5225 Parallel DB 2 PDBS vs Distributed DBS DDBS Geographically distributed Small number of sites Sites are autonomous computers Do not share memory, disks Run under different OS and DBMS PDBS Processors are tightly coupled using a fast interconnection network Higher degree of parallelism Processors are not autonomous computers Share memory, disks Controlled by single OS and DBMS CS5225 Parallel DB 3 Types of Parallelism Intra-Query Parallelism Intra-operator parallelism Multiple nodes working to compute a given operation (e.g., sort, join) Inter-operator parallelism Each operator may run concurrently on a different site Partitioned vs pipelined parallelism Inter-Query Parallelism Nodes are divided across different queries CS5225 Parallel DB 4 Partitioned parallelism Input data is partitioned among multiple processors and memories Operator can be split into many independent operators each working on a part of the data Pipelined parallelism Output of one operator is consumed as input of another operator Types of Parallelism Sequential Sequential Sequential Any Sequential Program Any Sequential Program Sequential Any Sequential Program Any Sequential Program CS5225 Parallel DB 5 Goals and Metrics Speedup More resources means proportionally less time for given amount of data Elapsed time on a single processor/elapsed time on N processors Problem size is constant, and grows the system Linear speedup Twice as much hardware can perform the task in half the elapsed time Xact/sec. (throughput) degree of -ism CS5225 Parallel DB 6 Ideal

Goals and Metrics Scaleup If resources increased in proportion to increase in data size, time is constant. Elapsed time of 1 processor on small problem/elapsed time of k processors on problem with k times data size Measures ability of system to grow both the system and the problem Linear scaleup twice as much hardware can perform twice as large a task in the same elapsed time sec./xact (response time) degree of -ism CS5225 Parallel DB 7 Ideal Barriers Startup Time needed to start a parallel operation (e.g., creating process, opening files, etc) Can dominate actual execution time with 1000s of processors Interference Slowdown each process imposes on others when accessing shared resources Skew Service time of a job is the service time of the slowest step of the job CS5225 Parallel DB 8 Architecture Ideal machine: infinitely fast CPU with an infinite memory with infinite bandwidth Challenge build such a machine out of large number of processors of finite speed Simple taxonomy for the spectrum of designs Shared-memory (shared-everything) Shared-nothing Shared-disk Architecture Issue: Shared What? Shared Memory (SMP) CLIENTS Processors Memory Easy to program Difficult to scaleup Shared Disk CLIENTS Shared Nothing (network) CLIENTS Hard to program Easy to scaleup Sequent, SGI, Sun VMScluster, Sysplex Tandem, Teradata, SP2 CS5225 Parallel DB 9 CS5225 Parallel DB Key Techniques to Parallelism Parallelism is an unanticipated benefit of the relational model Relational query Relational operators applied to data 3 three techniques Data partitioning of relations across multiple disks Pipelining of tuples between operators Partitioned execution of operators across nodes Data Partitioning Partitioning a relation involves distributing its tuples across several disks Provides high I/O bandwidth without any specialized hardware Three basic (horizontal) partitioning strategies: Round-robin Hash Range CS5225 Parallel DB 11 CS5225 Parallel DB 12

Round robin R D0 D1 D2 t1 t1 t2 t2 t3 t4 t4... t5 Evenly distributes data Good for scanning full relation Not good for point or range queries CS5225 Parallel DB 13 t3 Hash partitioning R D0 D1 D2 t1 h(k1)=2 t2 h(k2)=0 t3 h(k3)=0 t4 h(k4)=1... t2 t3 Good for point queries on key; also for equi-joins Not good for range queries; point queries not on key If hash function good, even distribution CS5225 Parallel DB 14 t4 t1 Range partitioning R D0 D1 D2 t1: A=5 partitioning t1 vector t2: A=8 t2 4 7 t3: A=2 t3 V0 V1 t4: A=3 t4... Good for some range queries on A Need to select good vector: else unbalance data skew execution skew CS5225 Parallel DB 15 Parallelizing Relational Operators Objective Use existing operator implementations without modifications Only 3 mechanisms are needed Operator replication Merge operator Split operator Result is a parallel DBMS capable of providing linear speedup and scaleup! CS5225 Parallel DB 16 Parallel Sort Range partitioning sort Input: R(K, A, ) partitioned on non-sorting attribute A; Sort on K Output: Sorted R partitions on K Algorithm: (a) Range partition on K (b) Local sort Ra ko Rb k1 Rc Local sort Local sort Local sort R 1 R 2 R 3 Result CS5225 Parallel DB 17 CS5225 Parallel DB 18

Selecting a good partition vector 7... 52 11 14 31... 8 15 11 32 17 10... 12 4 Ra Rb Rc Example Each site sends to coordinator: Min sort key Max sort key Number of tuples Coordinator computes vector and distributes to sites (also decides # of sites for local sorts) CS5225 Parallel DB 19 CS5225 Parallel DB 20 Sample scenario: Coordinator receives: SA: Min=5 Max=10 # = 10 tuples SB: Min=7 Max=17 # = 10 tuples Expected tuples: 5 10 15 20 ko? [assuming we want to sort at 2 sites] 2 1 CS5225 Parallel DB 21 Expected tuples: 5 10 15 20 ko? [assuming we want to sort at 2 sites] Expected tuples = Total tuples with key < ko 2 2(ko - 5) + (ko - 7) = 20/2 3ko = 10 + 10 + 7 = 27 ko = 9 2 1 CS5225 Parallel DB 22 Variations Send more info to coordinator Partition vector for local site Eg. Sa: 3 3 3 # tuples 5 6 8 10 local vector - Histogram 5 6 7 8 9 10 More than one round E.g.: (1) Sites send range and # tuples (2) Coordinator returns preliminary vector Vo (3) Sites tell coordinator how many tuples in each Vo range (4) Coordinator computes final vector Vf CS5225 Parallel DB 23 CS5225 Parallel DB 24

Can you think of any other variation? Can you think of a distributed scheme (no coordinator)? CS5225 Parallel DB 25 Parallel external sort-merge Same as range-partition sort, except sort first Ra Rb Rc Local sort Local sort Local sort Ra Rb Rc In order Merge CS5225 Parallel DB 26 ko k1 Result Parallel Join Partitioned Join (Equi-join) Input: Relations R, S Output: R S Result partitioned across sites Ra Rb Local join S1 S2 Sa Sb f(a) Result S3 f(a) Sc CS5225 Parallel DB 27 CS5225 Parallel DB 28 Notes: Same partition function f is used for both R and S (applied to join attribute) f can be range or hash partitioning Local join can be of any type (use any CS3223 optimization) We already know why part-join works: S1 S2 S3 S1 S2 S3 Even more notes: Selecting good partition function f very important: Number of partitions Hash function Partition vector Good partition vector Goal: Ri + Si the same Can use coordinator to select CS5225 Parallel DB 29 CS5225 Parallel DB 30

Asymmetric fragment + replicate join Ra Rb Local join S Sa S Sb Notes: Can use any partition function f for R (even round robin) Can do any join not just equi-join e.g.: R R.A < S.B S f partition Result S union CS5225 Parallel DB 31 CS5225 Parallel DB 32 General fragment and replicate join Ra Rb f1 partition -> 3 fragments n copies of each fragment S is partitioned in similar fashion S1 S1 S1 Result S2 S2 S2 All nxm pairings of R,S fragments CS5225 Parallel DB 33 CS5225 Parallel DB 34 Notes: Asymmetric F+R join is special case of general F+R Asymmetric F+R may be good if S small Works for non-equi-joins Dataflow Network for Join Good use of split/merge makes it easier to build parallel versions of sequential join code. CS5225 Parallel DB 35 CS5225 Parallel DB

Other parallel operations Duplicate elimination Sort first (in parallel) then eliminate duplicates in result Partition tuples (range or hash) and eliminate locally Aggregates Partition by grouping attributes; compute aggregate locally Ra Rb # dept sal 1 toy 10 2 toy 20 3 sales 15 # dept sal 4 sales 5 5 toy 20 6 mgmt 15 7 sales 10 8 mgmt 30 Example: # dept sal 1 toy 10 2 toy 20 5 toy 20 6 mgmt 15 8 mgmt 30 # dept sal 3 sales 15 4 sales 5 7 sales 10 sum (sal) group by dept sum sum dept sum toy 50 mgmt 45 dept sum sales 30 CS5225 Parallel DB 37 CS5225 Parallel DB 38 Enhancements for aggregates Perform aggregate during partition to reduce data transmitted Does not work for all aggregate functions Which ones? Ra Rb # dept sal 1 toy 10 2 toy 20 3 sales 15 # dept sal 4 sales 5 5 toy 20 6 mgmt 15 7 sales 10 8 mgmt 30 Example: sum sum dept sum toy 30 toy 20 mgmt 45 dept sum sales 15 sales 15 sum sum dept sum toy 50 mgmt 45 dept sum sales 30 sum (sal) group by dept CS5225 Parallel DB 39 CS5225 Parallel DB 40 Data Skew Attribute value skew Some attribute value appear more often than others Tuple placement skew Initial distribution of record varies between partitions Selectivity skew Selectivity of selection predicates varies between nodes Redistribution skew Mismatch between distribution of join key values in a relation and the distribution expected by the hash function Join product skew Join selectivity at each node differs Effectiveness of Parallel Algo Load imbalance Performance determined by node that completes last Need some form of load-balancing mechanism CS5225 Parallel DB 41 CS5225 Parallel DB 42

Taxonomy of Join Algorithms Based on existing solutions Three logical phases Task generation Task allocation/load-balancing Task execution CS5225 Parallel DB 43 Task Generation A join is split into a set of tasks Each task is essentially a join of sub-relations of the base relations Union of the results of all tasks should be the same as the original join Four issues Decomposition of base relations Number of tasks to be generated Formation of tasks after decomposition What statistics to maintain CS5225 Parallel DB 44 Decomposition R S Basic criterion Union of results of subtasks = result of original join 3 methods Full fragmentation (N tasks) Fragment and Replicate (N tasks) Full replication (N * M tasks) S1 S2 S3 R4 S1 S2 S3 S4 R4 S4 R4 CS5225 Parallel DB 45 CS5225 Parallel DB 46 Number of tasks What is the optimal number of tasks? Too many vs too few Given p processors Generate p tasks one per node Generate more than p tasks, allocate to balance the load based on some criterion Split larger tasks to smaller ones, then allocate to balance some criterion Merge smaller ones, then allocate CS5225 Parallel DB 47 Task Formation Whether the tasks are physical or logical Physical tasks exists before execution Logical tasks to be formed during execution More useful for load balancing Lower cost (transmission and I/O) CS5225 Parallel DB 48

?????? CS5225 Parallel DB 49 CS5225 Parallel DB 50 Statistics Maintained What statistics to maintain during task generation? Used by task allocation/load-balancing phase to determine how tasks should be allocated Perfect information Relation size, distribution, result size Group records into equivalence classes Maintain number of distinct classes For each class, the number of distinct attributes and records from the relations Can be used to estimate result size and execution time CS5225 Parallel DB 51 CS5225 Parallel DB 52 6 4 2 6*2 0 (6+4+2)/3*(2+6)/2 S1 6 4 2 S1 CS5225 Parallel DB 53 CS5225 Parallel DB 54

Estimate Execution Time Use cost models E.g. for hash join, I/O cost = 3* R + 3* S where R and S are number of pages of relations R and S Task Allocation At the end of task generation phase, we have a pool of tasks to be allocated to nodes for concurrent processing Two strategies Allocate without load-balancing When tasks are generated, they are sent to the appropriate nodes Bad for skew data With load-balancing Tasks are allocated so that load across all nodes are approximately the same Tasks are sorted according to some criterion Tasks are allocated in descending order in a greedy manner (the next task to be allocated is sent to the node that is expected to finish first) CS5225 Parallel DB 55 CS5225 Parallel DB 56 Task Allocation (Cont) Load-Balanced Schemes Load metrics Allocation strategies Task Allocation (Cont) Load metrics What criterion? Cardinality Estimated results size Estimated execution time CS5225 Parallel DB 57 CS5225 Parallel DB 58 Task Allocation (Cont) Allocation strategy How each task is to be allocated Statically Allocated prior to the execution of the tasks Each node knows exactly how many and which tasks to process Most widely used Adaptively Adaptive Demand-driven Each node assigned and process a task a time Acquire the next task only when the current tasks is completed Static Task Allocation (12 tasks, 3 processors) CS5225 Parallel DB 59 CS5225 Parallel DB 60

Static Task Allocation (12 tasks, 3 processors) Static Task Allocation (12 tasks, 3 processors) CS5225 Parallel DB 61 CS5225 Parallel DB 62 Static Task Allocation (12 tasks, 3 processors) Static Task Allocation (12 tasks, 3 processors) Estimated Actual CS5225 Parallel DB 63 CS5225 Parallel DB 64 Static Task Allocation (12 tasks, 3 processors) Adaptive Task Allocation (12 tasks, 3 processors) CS5225 Parallel DB 65 CS5225 Parallel DB 66

Task Execution Each node independently perform the join of tasks allocated to it Two concerns Workload No redistribution once execution begins Redistribution if system is unbalanced Need a task redistribution phase to move tasks (sub-tasks) from overloaded node to underloaded nodes Must figure out who is the donor and who is idling Work with static load balancing strategy Local join methods Nested-loops, sort-merge, hash join CS5225 Parallel DB 67 Static Load-Balanced Algo Balance the load of nodes when tasks are allocated Once a task is initiated for execution, no migration of task (sub-task) from one node to another CS5225 Parallel DB 68 An Example Example (Cont) Consider join of R and S Parallel system has p nodes Assume that R and S are declustered across all nodes (using RR scheme) CS5225 Parallel DB 69 Generate k physical tasks (k > p) Full fragmentation During partitioning, each node also collects statistics (size of partitions) for the partitions assigned to it A node designated as coordinator collects all the information Estimate the result size, and execution time Estimate the average completion time and inform all nodes about it CS5225 Parallel DB 70 Example (Cont) Example: Static Scheme R R.A=T.A T Each node finds the smallest number of tasks such that the completion time of these tasks will not exceed the average completion time A node is overloaded if it still has tasks remaining Each node reports to coordinator the difference between the load and the average load, and the excess tasks Coordinator reallocates the excess tasks to underloaded nodes After redistribution of workload, each processor independently processes its tasks Initial (fragment) Placement (Round Robin) Rf1 (3, c) (9, a) (13, c) Tf1 (4, z) (9, z) Rf2 (9, b) (7, a) Tf2 (2, x) (3, y) (7, w) Rf3 (2, a) (4, a) (9, c) (16, c) Tf3 (3, x) CS5225 Parallel DB 71 CS5225 Parallel DB 72

Example (Cont) Redistribute to form 9 physical tasks R R.A=T.A T Example (Cont) After load balancing: Assume balance result size R R.A=T.A T R4 (4, a) (13, c) R7 (7, a) (16, c) Node 2 Node 3 Node 1 T1 T4 (4, z) T7 (7, w) T2 (2, a) (2, x) (3, c) R9 (9, a) (9, b) (9, c) T3 (3, x) (3, y) T9 (9, z) Task: H(x) = x mod 9 Allocate task H(x) to node (H(x) mod 3) + 1 Tasks 5, 6, 8 are empty CS5225 Parallel DB 73 Node 2 Node 3 Node 1 T1 (2, a) (3, c) R4 (4, a) (13, c) T2 (2, x) T3 (3, x) (3, y) T4 (4, z) R9 (9, a) (9, b) (9, c) R7 (7, a) (16, c) T9 (9, z) T7 (7, w) CS5225 Parallel DB 74 Static Techniques Problems Extra communication and I/O costs Granularity of load-balancing is an entire tasks Bad for highly skewed data Solutions Form logical tasks Split expensive tasks to smaller sub-tasks CS5225 Parallel DB 75 Example: Logical Tasks Initial (fragment) Placement (Round Robin) Rf1 Tf1 Rf2 Tf2 (3, c) (9, a) (13, c) (4, z) (9, z) (9, b) (7, a) (2, x) (3, y) (7, w) 1 T11 2 T12 = 1 2 3 Rf3 (2, a) (4, a) (9, c) (16, c) 3 T1 Tf3 (3, x) T13 CS5225 Parallel DB 76 Example: Logical Tasks Initial (fragment) Placement (Round Robin) Rf1 (3, c) (9, a) (13, c) 1 Tf1 (4, z) (9, z) T11 Generate 1, 1, Generate T21, T31, Rf2 (9, b) (7, a) 2 Tf2 (2, x) (3, y) (7, w) T12 Generate 2, 2, Generate T22, T32, Rf3 (2, a) (4, a) (9, c) (16, c) 3 T1 Tf3 (3, x) T13 3, 3, T23, T33, CS5225 Parallel DB 77 Dynamic Load-Balancing Useful when estimation is wrong Redistribute tasks which may be partially executed from one node to another Task generation and allocation phases are the same as that for static load-balancing techniques Task execution phase is different CS5225 Parallel DB 78

Dynamic Load-balancing (Cont) Task execution phase Each node maintains additional information about the task that is being processed Size of data remaining Size of result generated so far When a node finishes ALL the tasks allocated to it, it will steal from other nodes The overloaded node and the amount of load to be transferred are then determined, and the transfer is realized by shipping data from donor to idle nodes CS5225 Parallel DB 79 Example R R.A=T.A T After task allocation Node 2 Node 3 Node 1 T1 T2 T3 (2, a) (2, x) (3, c) (3, x) (3, y) R4 (4, a) (13, c) R7 (7, a) (16, c) T4 (4, z) T7 (7, w) R9 (9, a) (9, b) (9, c) T9 (9, z) Node 3 will trigger load balancing once it completes tasks 2 CS5225 Parallel DB 80 Dynamic Load-Balancing (Cont) Process of transferring load Idle node sends a load-request message to coordinator to ask for more work At coordinator, requests are queued in a FCFS basis. Coordinator broadcasts a load-info message to all nodes Each node computes its current load and informs the coordinator Coordinator determines the donor and sends a transfer-load message to donor, after which it proceeds to serve the next request Donor determines the load to be transferred and sends the load to the idle node Once the load is determined, donor can proceed to compute its new load for another request Process of transferring loads between a busy and an idle node is repeated until the minimum time has been achieved (or no more tasks to transmit) CS5225 Parallel DB 81 After task allocation R4 (4, a) (13, c) T1 Example Node 2 Node 3 Node 1 R7 T4 (7, a) (4, z) (16, c) T2 (2, a) (2, x) (3, c) T7 (7, w) Coordinator decides that task 7 be transferred from Node 2 to Node 3 Next round, may decide to transfer task 4 from Node 2 to Node 2 R9 T3 (3, x) (3, y) CS5225 Parallel DB 82 R (9, a) (9, b) (9, c) R.A=T.A T T9 (9, z) Task Donor? Any busy node can be donor, but the one with the heaviest load preferred Use the estimated completion time of a node (ECT) ECT = estimated time of unprocessed task + estimated completion time of current task Amount? Heuristics to determine amount Transfer unprocessed task first, if any Amount of load transferred should be large enough to provide a gain in the completion time of the join operation Completion time of donor should still be larger than that of idle node after the transfer CS5225 Parallel DB 83 CS5225 Parallel DB 84

Current Trends NOWs P2P Active Disks Computational/Data Grid CS5225 Parallel DB 85