Handling Data Skew in Parallel Joins in Shared-Nothing Systems Yu Xu, Pekka Kostamaa, XinZhou (Teradata) Liang Chen (University of California) SIGMOD’08.

Slides:



Advertisements
Similar presentations
Unit 1:Parallel Databases
Advertisements

LIBRA: Lightweight Data Skew Mitigation in MapReduce
Big Data Working with Terabytes in SQL Server Andrew Novick
Query Execution, Concluded Zachary G. Ives University of Pennsylvania CIS 550 – Database & Information Systems November 18, 2003 Some slide content may.
Parallel Databases These slides are a modified version of the slides of the book “Database System Concepts” (Chapter 18), 5th Ed., McGraw-Hill, by Silberschatz,
Parallel Databases By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany) DIRECTOR ARUNAI ENGINEERING COLLEGE TIRUVANNAMALAI.
04/25/2005Yan Huang - CSCI5330 Database Implementation – Parallel Database Parallel Databases.
Distributed databases
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 21: Parallel Databases.
Transaction.
Parallel Database Systems
Parallel Database Systems The Future Of High Performance Database Systems David Dewitt and Jim Gray 1992 Presented By – Ajith Karimpana.
VLDB Revisiting Pipelined Parallelism in Multi-Join Query Processing Bin Liu and Elke A. Rundensteiner Worcester Polytechnic Institute
1 Improving Hash Join Performance through Prefetching _________________________________________________By SHIMIN CHEN Intel Research Pittsburgh ANASTASSIA.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Distributed Databases and Query Processing. Distributed DB’s vs. Parallel DB’s Many autonomous processors that may participate in database operations.
TDD: Topics in Distributed Databases
Fall 2008Parallel Databases1. Fall 2008Parallel Databases2 Ideal Parallel Systems Two key properties:  Linear Speedup: Twice as much hardware can perform.
©Silberschatz, Korth and Sudarshan18.1Database System Concepts Centralized Systems Run on a single computer system and do not interact with other computer.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes 1.
Database System Architectures  Client-server Database System  Parallel Database System  Distributed Database System Wei Jiang.
PARALLEL DBMS VS MAP REDUCE “MapReduce and parallel DBMSs: friends or foes?” Stonebraker, Daniel Abadi, David J Dewitt et al.
The hybird approach to programming clusters of multi-core architetures.
Shilpa Seth.  Centralized System Centralized System  Client Server System Client Server System  Parallel System Parallel System.
1 Distributed and Parallel Databases. 2 Distributed Databases Distributed Systems goal: –to offer local DB autonomy at geographically distributed locations.
Cloud Computing Lecture Column Store – alternative organization for big relational data.
C-Store: A Column-oriented DBMS Speaker: Zhu Xinjie Supervisor: Ben Kao.
Aubrey L. Tatarowicz #1, Carlo Curino #2, Evan P. C. Jones #3, Sam Madden #4 # Massachusetts Institute of Technology, USA.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
CONGRESSIONAL SAMPLES FOR APPROXIMATE ANSWERING OF GROUP-BY QUERIES Swarup Acharya Phillip Gibbons Viswanath Poosala ( Information Sciences Research Center,
A Comparison of Join Algorithms for Log Processing in MapReduce Spyros Blanas, Jignesh M. Patel(University of Wisconsin-Madison) Eugene J. Shekita, Yuanyuan.
1 Experimental Evidence on Partitioning in Parallel Data Warehouses Pedro Furtado Prof. at Univ. of Coimbra & Researcher at CISUC DEI/CISUC-Universidade.
Oracle Challenges Parallelism Limitations Parallelism is the ability for a single query to be run across multiple processors or servers. Large queries.
1 © 2012 OpenLink Software, All rights reserved. Virtuoso - Column Store, Adaptive Techniques for RDF Orri Erling Program Manager, Virtuoso Openlink Software.
Data Warehousing at Acxiom Paul Montrose Data Warehousing at Acxiom Paul Montrose.
Parallel and Distributed IR. 2 Papers on Parallel and Distributed IR Introduction Paper A: Inverted file partitioning schemes in Multiple Disk Systems.
Data Warehousing 1 Lecture-24 Need for Speed: Parallelism Virtual University of Pakistan Ahsan Abdullah Assoc. Prof. & Head Center for Agro-Informatics.
Chapter 21: Parallel Databases Chapter 21: Parallel Databases Introduction I/O Parallelism Interquery Parallelism Intraquery Parallelism Intraoperation.
Daniel J. Abadi · Adam Marcus · Samuel R. Madden ·Kate Hollenbach Presenter: Vishnu Prathish Date: Oct 1 st 2013 CS 848 – Information Integration on the.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 18: Parallel.
Lecture 15- Parallel Databases (continued) Advanced Databases Masood Niazi Torshiz Islamic Azad University- Mashhad Branch
Infrastructure for Data Warehouses. Basics Of Data Access Data Store Machine Memory Buffer Memory Cache Data Store Buffer Bus Structure.
Memory Coherence in Shared Virtual Memory System ACM Transactions on Computer Science(TOCS), 1989 KAI LI Princeton University PAUL HUDAK Yale University.
Mapping the Data Warehouse to a Multiprocessor Architecture
©Silberschatz, Korth and Sudarshan18.1Database System Concepts - 6 th Edition Chapter 18: Parallel Databases Introduction I/O Parallelism Interquery Parallelism.
Lecture 14- Parallel Databases Advanced Databases Masood Niazi Torshiz Islamic Azad University- Mashhad Branch
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan Chapter 21: Parallel Databases.
©Silberschatz, Korth and Sudarshan20.1Database System Concepts 3 rd Edition Chapter 20: Parallel Databases Introduction I/O Parallelism Interquery Parallelism.
1 Distributed Databases architecture, fragmentation, allocation Lecture 1.
 Distributed Database Concepts  Parallel Vs Distributed Technology  Advantages  Additional Functions  Distribution Database Design  Data Fragmentation.
CS 440 Database Management Systems Lecture 5: Query Processing 1.
Unit - 4 Introduction to the Other Databases.  Introduction :-  Today single CPU based architecture is not capable enough for the modern database.
CS 540 Database Management Systems
REED : Robust, Efficient Filtering and Event Detection in Sensor Network Daniel J. Abadi, Samuel Madden, Wolfgang Lindner Proceedings of the 31st VLDB.
CPT-S Advanced Databases 11 Yinghui Wu EME 49.
A Study of Data Partitioning on OpenCL-based FPGAs Zeke Wang (NTU Singapore), Bingsheng He (NTU Singapore), Wei Zhang (HKUST) 1.
BAHIR DAR UNIVERSITY Institute of technology Faculty of Computing Department of information technology Msc program Distributed Database Article Review.
Parallel Databases.
Chapter 18: Parallel Databases
Interquery Parallelism
April 30th – Scheduling / parallel
Cse 344 May 2nd – Map/reduce.
Chapter 20: Parallel Databases
Chapter 21: Parallel Databases
Chapter 18: Parallel Databases
Database System Architectures
The Gamma Database Machine Project
Chapter 21: Parallel Databases
Presentation transcript:

Handling Data Skew in Parallel Joins in Shared-Nothing Systems Yu Xu, Pekka Kostamaa, XinZhou (Teradata) Liang Chen (University of California) SIGMOD’08 Presented by Kisung Kim

Introduction  Parallel processing continues to be important in large data warehouses  Shared nothing architecture –Multiple nodes communicate via high-speed interconnect network –Each node has its own private memory and disks  Parallel Unit (PU) –Virtual processors doing the scans, joins, locking, transaction management,…  Relations are horizontally partitioned across all Pus –Hash partitioning is commonly used PU Data 2 / 28

Introduction  Partitioning column –R: x –S: y  Hash function –h(i) = i mod / 28

Two Join Geographies  Redistribution plan –Redistribute the tables based on join attributes if they are not partitioned by the join attributes –Join is performed on each PU in parallel 4 / 28

Two Join Geographies  Duplication plan –Duplicate tuples of the smaller relation on each PU to all Pus –Join is performed on each PU in parallel 5 / 28

Redistribution Skew  Hot PU –After redistribution, some PUs have larger number of tuples than others –Performance bottleneck in the whole system –Relations with many rows with the same value in the join attributes  Adding more nodes will not solve the skew problem  Examples –In travel booking industry, a big customer often makes a large number of reservations on behalf of its end users –In online e-commerce, a few professionals make millions of transactions a year –… 6 / 28

Redistribution Skew  Relations in these applications are almost evenly partitioned  When the join attribute is a non-partitioning column attribute, severe redistribution skew happens  Duplication plan can be a solution only when one join relation is fairly small  Our solution –Partial Redistribution & Partial Duplication (PRPD) join 7 / 28

PRPD Join  Assumptions –DBAs evenly partition their data for efficient parallel processing –Skewed rows tend to be evenly partitioned on each PU –The system knows the set of skewed values  Intuition –Deal with the skewed rows and non-skewed rows of R differently 8 / 28

PRPD  L 1 : set of skewed values R.a  L 2 : set of skewed values S.b  Step 1 –Scan R i and split the rows into three sets  R i 2-loc : all skewed rows of R i  R i 2-dup : every rows of R i whose R.a value matches any value in L 2  R i 2-redis : all other rows of R i –Three spools for each PU i  R i loc : all rows from R i 2-loc  R i dup : all rows of R duplicated to PU i  R i redis : all rows of R redistributed to Pu i –Similarly on S  Kept Locally  Duplicated to all PUs  Hash redistributed on R.a 9 / 28

PRPD: Example L 1 = {1} L 2 = {2} 10 / 28

R 3 2-redis PRPD Step 1 PU 3 R 3 2-dup R 3 2-loc R 2 2-redis PU 2 R 2 2-dup R 2 2-loc R 1 2-redis PU 1 R 1 2-dup R 1 2-loc R 3 redis R 3 dup R 3 loc R 2 redis R 2 dup R 2 loc R 1 redis R 1 dup R 1 loc PU 3 PU 2 PU 1 R i 2-loc : Store Locally 11 / 28

R 3 2-redis PRPD Step 1 PU 3 R 3 2-dup R 3 2-loc R 2 2-redis PU 2 R 2 2-dup R 2 2-loc R 1 2-redis PU 1 R 1 2-dup R 1 2-loc R 3 redis R 3 dup R 3 loc R 2 redis R 2 dup R 2 loc R 1 redis R 1 dup R 1 loc PU 3 PU 2 PU 1 R i 2-dup : Duplicate 12 / 28

R 3 2-redis PRPD Step 1 PU 3 R 3 2-dup R 3 2-loc R 2 2-redis PU 2 R 2 2-dup R 2 2-loc R 1 2-redis PU 1 R 1 2-dup R 1 2-loc R 3 redis R 3 dup R 3 loc R 2 redis R 2 dup R 2 loc R 1 redis R 1 dup R 1 loc PU 3 PU 2 PU 1 R i 2-redis : Redistribute 13 / 28

PRPD Step 1 14 / 28

PRPD Step 2  On each PU i, R 1 redis R 1 dup R 1 loc PU 1 S 1 redis S 1 dup S 1 loc 15 / 28

PRPD  All sub-steps in each step can run in parallel  Overlapping skewed values –The overlapping skew values  R i 2-loc or R i 2-dup ? –System chooses to include the overlapping skewed value in only one of L1 and L2 –Calculate the size of rows and choose small one 16 / 28

Comparison with Redistribution Plan  Use more total spool space than redistribution plan –PRPD duplicate some rows  Less networking cost –Keep the skewed rows locally  PRPD does not send all skewed rows to a single PU R i 2-redis R i 2-dup R i 2-loc  Keep locally, less network cost  Duplicate, more spool space  Same as redistribution plan 17 / 28

Comparison with Duplication Plan  Less spool space than duplication plan –Partial duplication  More networking cost –When data skew is not significant –PRPD plan needs to redistribute a large relation  Less join cost –Duplication plan always joins a complete copy of the duplicated relation 18 / 28

PRPD: Hybrid of Two Plans  L 1 = Ø, L 2 =Ø –Same as redistribution plan  L 1 =Uniq(R.a) ⊃ Uniq(S.b) –Same as duplication plan (duplicate S) 19 / 28

PRPD: Hybrid of Two Plans  n: the number of PUs  x: percentage of the skewed rows in a relation R  The number of rows of R after redistribution in redistribution –Hot PU: –Non-hot PU:  The number of rows of R after redistribution in PRPD –Hot PU:  Ratio of the number of rows of hot PU in redistribution over the number of rows of R in PPRD 20 / 28

Experimental Evaluation  Compare PRPD with redistribution plan –Redistribution plan is more widely used than duplication plan  Schema & test query 21 / 28

Generating Skewed Data  Originally 25 unique nations in TPC-H  We increased the number of unique nations to 1000  5% skewness 22 / 28

Query Execution Time  10 nodes, 80 PUs  Node –Pentium IV 3.6 GHz CPUs, 4GB memory, 8 PUs  1 million rows for Supplier relation  1 million rows for Customer relation  The size of query result is around 1 billion rows 23 / 28

Query Execution Time  1 Hot PUs 24 / 28

Query Execution Time  2 Hot PUs 25 / 28

Different Number of PUs  Speedup ratio of PRPD over redistribution plan  As the skewness increases, the speedup ratio increases  The larger the system, the larger the speed up 26 / 28

Conclusions  Effectively handle data skew in joins –Important challenges in parallel DBMS  We propose PRPD join –Hybrid of redistribution and duplication plan –PRPD also can be used in multiple joins 27 / 28

Thank you 28 / 28