SlideShare a Scribd company logo
1 of 29
Distributed DBMS Page 10-12. 1
© 1998 M. Tamer Özsu & Patrick Valduriez
Outline
1. Introduction
2. Distributed Database Design
3. Overview of Query Processing
4. Query Decomposition and Data Localization
5. Distributed Transaction Management
6. Distributed Concurrency Control
7. Parallel Database Systems
 Data placement and query processing
 Load balancing
 Database clusters
Distributed DBMS Page 10-12. 2
© 1998 M. Tamer Özsu & Patrick Valduriez
The Database Problem
 Large volume of data  use disk and large main
memory
 I/O bottleneck (or memory access bottleneck)
 Speed(disk) << speed(RAM) << speed(microprocessor)
 Predictions
 Moore’s law: processor speed growth (with multicore):
50 % per year
 DRAM capacity growth : 4  every three years
 Disk throughput : 2  in the last ten years
Distributed DBMS Page 10-12. 3
© 1998 M. Tamer Özsu & Patrick Valduriez
The Solution
 Increase the I/O bandwidth
 Data partitioning
 Parallel data access
Distributed DBMS Page 10-12. 4
© 1998 M. Tamer Özsu & Patrick Valduriez
Multiprocessor Objectives
 High-performance with better cost-performance
than mainframe or vector supercomputer
 Use many nodes, each with good cost-performance,
communicating through network
 The real challenge is to parallelize applications to
run with good load balancing
Distributed DBMS Page 10-12. 8
© 1998 M. Tamer Özsu & Patrick Valduriez
Parallel DBMS
 Loose definition: a DBMS implemented on a
tighly coupled multiprocessor
 Straighforward porting of relational DBMS
(the software vendor edge)
 Naturally extends to distributed databases
with one server per site
Distributed DBMS Page 10-12. 9
© 1998 M. Tamer Özsu & Patrick Valduriez
Parallel DBMS - Objectives
 High-performance through parallelism
 High throughput with inter-query parallelism
 Low response time with intra-operation parallelism
 High availability and reliability by exploiting
data replication
 Extensibility increasing database sizes or
increasing performance demands (e.g.,
throughput) should be easier.
 Linear speed-up
 Linear scale-up
Distributed DBMS Page 10-12. 10
© 1998 M. Tamer Özsu & Patrick Valduriez
Linear Speed-up
Linear increase in performance for a constant DB size
and proportional increase of the system components
(processor, memory, disk)
new perf.
old perf.
ideal
components
Distributed DBMS Page 10-12. 11
© 1998 M. Tamer Özsu & Patrick Valduriez
Linear Scale-up
Sustained performance for a linear increase of database size
and proportional increase of the system components.
components + database size
new perf.
old perf.
ideal
Distributed DBMS Page 10-12. 12
© 1998 M. Tamer Özsu & Patrick Valduriez
Parallel DBMS – Functional
Architecture
RM
task n
DM
task 12
DM
task n2
DM
task n1
Data Mgr
DM
task 11
Request Mgr
RM
task 1
Session Mgr
User
task 1
User
task n
Distributed DBMS Page 10-12. 13
© 1998 M. Tamer Özsu & Patrick Valduriez
Parallel DBMS Functions
 Session manager
 Host interface
 Transaction monitoring for OLTP
 Request manager
 Query Compilation, and execution
 To speed up query execution, it may optimize and
parallelize the query at compile-time.
 Data manager
 It provides all the low-level functions needed to run
compiled queries in parallel, i.e., database operator
execution, parallel transaction support, cache
management,
 Transaction management support
 Data management
Distributed DBMS Page 10-12. 14
© 1998 M. Tamer Özsu & Patrick Valduriez
Parallel System Architectures
 One guiding design decision is the way the main hardware
elements, i.e., processors, main memory, and disks, are
connected through some fast interconnection network.
 Multiprocessor architecture alternatives
 Shared memory (SM)
 Shared disk (SD)
 Shared nothing (SN)
 Hybrid architectures
Distributed DBMS Page 10-12. 15
© 1998 M. Tamer Özsu & Patrick Valduriez
Shared-Memory
DBMS on symmetric multiprocessors (SMP)
+ Simplicity, load balancing, fast communication
- Network cost, low extensibility, and low availability
All the processors are under the
control of a single operating
system.
Distributed DBMS Page 10-12. 16
© 1998 M. Tamer Özsu & Patrick Valduriez
Shared-Disk
+ network cost, extensibility, availability, and lower cost
- complexity, potential performance problem for cache
coherency
Each processor-memory node is
under the control of its own copy
of the operating system
Distributed DBMS Page 10-12. 17
© 1998 M. Tamer Özsu & Patrick Valduriez
Shared-Nothing
+ Extensibility, and availability
- Difficult load balancing (based on data location and not
the actual load of the system )
Each node can be viewed as a
local site (with its own database
and software) in a distributed
database system.
Distributed DBMS Page 10-12. 18
© 1998 M. Tamer Özsu & Patrick Valduriez
Hybrid Architectures
 Various possible combinations of the three basic
architectures are possible to obtain different trade-
offs between cost, performance, extensibility,
availability, etc.
Distributed DBMS Page 10-12. 19
© 1998 M. Tamer Özsu & Patrick Valduriez
Parallel DBMS Techniques
 Data placement
 Physical placement of the DB onto multiple nodes
 Static vs. Dynamic
 Parallel data processing
 Select is easy
 Join (and all other non-select operations) is more difficult
 Parallel query optimization
 Choice of the best parallel execution plans
 Automatic parallelization of the queries and load balancing
Distributed DBMS Page 10-12. 20
© 1998 M. Tamer Özsu & Patrick Valduriez
Data Partitioning
 Since programs are executed where the data reside, data
placement is a critical performance issue.
 Data placement must be done so as to maximize system
performance.
 Each relation is divided in n partitions (subrelations),
where n is a function of relation size and access frequency
 Implementation
 Round-robin
 Maps i-th element to node i mod n
 Good for sequential relation access but not for exact-match queries
 B-tree index (Range partitioning)
 Supports range queries but large index
 Hash function
 Only exact-match queries but small index
Distributed DBMS Page 10-12. 21
© 1998 M. Tamer Özsu & Patrick Valduriez
Partitioning Schemes
Round-Robin Hashing
Interval
••• •••
•••
•••
•••
•••
•••
a-g h-m u-z
Distributed DBMS Page 10-12. 22
© 1998 M. Tamer Özsu & Patrick Valduriez
Parallel Data Processing
 Two ways of exploiting high-performance multiprocessor
systems:
 Automatically detect parallelism in sequential programs (e.g.,
Fortran, OPS5)
 Augment an existing language with parallel constructs (e.g., C*,
Fortran90)
 Critique
 Hard to develop parallelizing compilers, limited resulting speed-
up
 Enables the programmer to express parallel computations but too
low-level details
Distributed DBMS Page 10-12. 23
© 1998 M. Tamer Özsu & Patrick Valduriez
Data-based Parallelism
 Inter-operation
 p operations of the same query in parallel
op.3
op.1 op.2
op.
R
op.
R1
op.
R2
op.
R3
op.
R4
•Intra-operation
➡ The same op in parallel
➡ is based on the decomposition of one operator (e.g: SELECT) in a
set of independent sub-operators, called operator instances.
Distributed DBMS Page 10-12. 24
© 1998 M. Tamer Özsu & Patrick Valduriez
Join Processing
 Three basic algorithms for intra-operator
parallelism
 Parallel nested loop join: no special assumption
 Parallel associative join: one relation is declustered on join
attribute and equi-join
 Parallel hash join: equi-join
 They also apply to other complex operators such as
duplicate elimination, union, intersection, etc. with
minor adaptation
Distributed DBMS Page 10-12. 25
© 1998 M. Tamer Özsu & Patrick Valduriez
1. Parallel Nested Loop Join
send
partition
node 3 node 4
node 1 node 2
R1:
S1 S2
R2:
Distributed DBMS Page 10-12. 26
© 1998 M. Tamer Özsu & Patrick Valduriez
2. Parallel Associative Join
node 1
node 3 node 4
node 2
R1: R2:
S1
S2
Distributed DBMS Page 10-12. 27
© 1998 M. Tamer Özsu & Patrick Valduriez
3. Parallel Hash Join
node node node node
node 1 node 2
R1: R2: S1: S2:
Distributed DBMS Page 10-12. 28
© 1998 M. Tamer Özsu & Patrick Valduriez
Parallel Query Optimization
 The objective is to select the “best” parallel
execution plan for a query using the following
components
 Search space
 Models alternative execution plans as operator trees
 Left-deep vs. Right-deep vs. Bushy trees
 Search strategy
 Dynamic programming for small search space
 Randomized for large search space
 Cost model (abstraction of execution system)
 Is responsible for estimating the cost of a given
execution plan
 Physical schema info. (partitioning, indexes, etc.)
 Statistics and cost functions
Distributed DBMS Page 10-12. 29
© 1998 M. Tamer Özsu & Patrick Valduriez
Execution Plans as Operator Trees
R2
R1
R4
Result
j2
j3
Left-deep
Right-deep
j1 R3
R2
R1
R4
Result
j5
j6
j4
R3
R2
R1
R3
j7
R4
Result
j9
Zig-zag
j8
Distributed DBMS Page 10-12. 30
© 1998 M. Tamer Özsu & Patrick Valduriez
Load Balancing
 Good load balancing is crucial for the performance of a
parallel system
 The response time of a set of parallel operators is that
of the longest one.
 Startup
 The time needed to start a parallel operation may
dominate the actual computation time
 Interference
 When accessing shared resources, each new process
slows down the others (hot spot problem)
 Skew
 The response time of a set of parallel processes is
the time of the slowest one
Distributed DBMS Page 10-12. 31
© 1998 M. Tamer Özsu & Patrick Valduriez
Load Balancing
 Problems arise for intra-operator parallelism
with skewed data distributions
 attribute data skew (AVS)
 e.g., there are more citizens in Paris than in Waterloo
 tuple placement skew (TPS)
 introduced when the data are initially partitioned (e.g.,
with range partitioning).
 selectivity skew (SS)
 redistribution skew (RS)
 join product skew (JPS)
Distributed DBMS Page 10-12. 32
© 1998 M. Tamer Özsu & Patrick Valduriez
End of Chapter 6

More Related Content

Similar to Ch07.ppt

Lowering Cloud and Data Center TCO with SAS Based Storage - Xyratex-Seagate
Lowering Cloud and Data Center TCO with SAS Based Storage - Xyratex-SeagateLowering Cloud and Data Center TCO with SAS Based Storage - Xyratex-Seagate
Lowering Cloud and Data Center TCO with SAS Based Storage - Xyratex-Seagate
Michael K. Connolly, MBATM
 
Insiders Guide- Managing Storage Performance
Insiders Guide- Managing Storage PerformanceInsiders Guide- Managing Storage Performance
Insiders Guide- Managing Storage Performance
DataCore Software
 
Using preferred read groups in oracle asm michael ault
Using preferred read groups in oracle asm michael aultUsing preferred read groups in oracle asm michael ault
Using preferred read groups in oracle asm michael ault
Louis liu
 

Similar to Ch07.ppt (20)

Design
DesignDesign
Design
 
Design
DesignDesign
Design
 
Lowering Cloud and Data Center TCO with SAS Based Storage - Xyratex-Seagate
Lowering Cloud and Data Center TCO with SAS Based Storage - Xyratex-SeagateLowering Cloud and Data Center TCO with SAS Based Storage - Xyratex-Seagate
Lowering Cloud and Data Center TCO with SAS Based Storage - Xyratex-Seagate
 
IMC Summit 2016 Breakout - Pandurang Naik - Demystifying In-Memory Data Grid,...
IMC Summit 2016 Breakout - Pandurang Naik - Demystifying In-Memory Data Grid,...IMC Summit 2016 Breakout - Pandurang Naik - Demystifying In-Memory Data Grid,...
IMC Summit 2016 Breakout - Pandurang Naik - Demystifying In-Memory Data Grid,...
 
Fulcrum Group Storage And Storage Virtualization Presentation
Fulcrum Group Storage And Storage Virtualization PresentationFulcrum Group Storage And Storage Virtualization Presentation
Fulcrum Group Storage And Storage Virtualization Presentation
 
SSDs Deliver More at the Point-of-Processing
SSDs Deliver More at the Point-of-ProcessingSSDs Deliver More at the Point-of-Processing
SSDs Deliver More at the Point-of-Processing
 
S de2784 footprint-reduction-edge2015-v2
S de2784 footprint-reduction-edge2015-v2S de2784 footprint-reduction-edge2015-v2
S de2784 footprint-reduction-edge2015-v2
 
Enterprise Data and Analytics Architecture Overview for Electric Utility
Enterprise Data and Analytics Architecture Overview for Electric UtilityEnterprise Data and Analytics Architecture Overview for Electric Utility
Enterprise Data and Analytics Architecture Overview for Electric Utility
 
Greenplum Architecture
Greenplum ArchitectureGreenplum Architecture
Greenplum Architecture
 
Ogf2008 Grid Data Caching
Ogf2008 Grid Data CachingOgf2008 Grid Data Caching
Ogf2008 Grid Data Caching
 
Mastering Data Management: Leveraging FME for Cloud Native Databases
Mastering Data Management: Leveraging FME for Cloud Native DatabasesMastering Data Management: Leveraging FME for Cloud Native Databases
Mastering Data Management: Leveraging FME for Cloud Native Databases
 
Insiders Guide- Managing Storage Performance
Insiders Guide- Managing Storage PerformanceInsiders Guide- Managing Storage Performance
Insiders Guide- Managing Storage Performance
 
DRAFT - Enterprise Data and Analytics Architecture Overview for Electric Utility
DRAFT - Enterprise Data and Analytics Architecture Overview for Electric UtilityDRAFT - Enterprise Data and Analytics Architecture Overview for Electric Utility
DRAFT - Enterprise Data and Analytics Architecture Overview for Electric Utility
 
Dremel
DremelDremel
Dremel
 
Configuration and Deployment Guide For Memcached on Intel® Architecture
Configuration and Deployment Guide For Memcached on Intel® ArchitectureConfiguration and Deployment Guide For Memcached on Intel® Architecture
Configuration and Deployment Guide For Memcached on Intel® Architecture
 
Cluster computing
Cluster computingCluster computing
Cluster computing
 
Unlocking Efficiency: B-Trees in Disk Storage Management.pptx
Unlocking Efficiency: B-Trees in Disk Storage Management.pptxUnlocking Efficiency: B-Trees in Disk Storage Management.pptx
Unlocking Efficiency: B-Trees in Disk Storage Management.pptx
 
Handle transaction workloads and data mart loads with better performance
Handle transaction workloads and data mart loads with better performanceHandle transaction workloads and data mart loads with better performance
Handle transaction workloads and data mart loads with better performance
 
MongoDB Sharding
MongoDB ShardingMongoDB Sharding
MongoDB Sharding
 
Using preferred read groups in oracle asm michael ault
Using preferred read groups in oracle asm michael aultUsing preferred read groups in oracle asm michael ault
Using preferred read groups in oracle asm michael ault
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Ch07.ppt

  • 1. Distributed DBMS Page 10-12. 1 © 1998 M. Tamer Özsu & Patrick Valduriez Outline 1. Introduction 2. Distributed Database Design 3. Overview of Query Processing 4. Query Decomposition and Data Localization 5. Distributed Transaction Management 6. Distributed Concurrency Control 7. Parallel Database Systems  Data placement and query processing  Load balancing  Database clusters
  • 2. Distributed DBMS Page 10-12. 2 © 1998 M. Tamer Özsu & Patrick Valduriez The Database Problem  Large volume of data  use disk and large main memory  I/O bottleneck (or memory access bottleneck)  Speed(disk) << speed(RAM) << speed(microprocessor)  Predictions  Moore’s law: processor speed growth (with multicore): 50 % per year  DRAM capacity growth : 4  every three years  Disk throughput : 2  in the last ten years
  • 3. Distributed DBMS Page 10-12. 3 © 1998 M. Tamer Özsu & Patrick Valduriez The Solution  Increase the I/O bandwidth  Data partitioning  Parallel data access
  • 4. Distributed DBMS Page 10-12. 4 © 1998 M. Tamer Özsu & Patrick Valduriez Multiprocessor Objectives  High-performance with better cost-performance than mainframe or vector supercomputer  Use many nodes, each with good cost-performance, communicating through network  The real challenge is to parallelize applications to run with good load balancing
  • 5. Distributed DBMS Page 10-12. 8 © 1998 M. Tamer Özsu & Patrick Valduriez Parallel DBMS  Loose definition: a DBMS implemented on a tighly coupled multiprocessor  Straighforward porting of relational DBMS (the software vendor edge)  Naturally extends to distributed databases with one server per site
  • 6. Distributed DBMS Page 10-12. 9 © 1998 M. Tamer Özsu & Patrick Valduriez Parallel DBMS - Objectives  High-performance through parallelism  High throughput with inter-query parallelism  Low response time with intra-operation parallelism  High availability and reliability by exploiting data replication  Extensibility increasing database sizes or increasing performance demands (e.g., throughput) should be easier.  Linear speed-up  Linear scale-up
  • 7. Distributed DBMS Page 10-12. 10 © 1998 M. Tamer Özsu & Patrick Valduriez Linear Speed-up Linear increase in performance for a constant DB size and proportional increase of the system components (processor, memory, disk) new perf. old perf. ideal components
  • 8. Distributed DBMS Page 10-12. 11 © 1998 M. Tamer Özsu & Patrick Valduriez Linear Scale-up Sustained performance for a linear increase of database size and proportional increase of the system components. components + database size new perf. old perf. ideal
  • 9. Distributed DBMS Page 10-12. 12 © 1998 M. Tamer Özsu & Patrick Valduriez Parallel DBMS – Functional Architecture RM task n DM task 12 DM task n2 DM task n1 Data Mgr DM task 11 Request Mgr RM task 1 Session Mgr User task 1 User task n
  • 10. Distributed DBMS Page 10-12. 13 © 1998 M. Tamer Özsu & Patrick Valduriez Parallel DBMS Functions  Session manager  Host interface  Transaction monitoring for OLTP  Request manager  Query Compilation, and execution  To speed up query execution, it may optimize and parallelize the query at compile-time.  Data manager  It provides all the low-level functions needed to run compiled queries in parallel, i.e., database operator execution, parallel transaction support, cache management,  Transaction management support  Data management
  • 11. Distributed DBMS Page 10-12. 14 © 1998 M. Tamer Özsu & Patrick Valduriez Parallel System Architectures  One guiding design decision is the way the main hardware elements, i.e., processors, main memory, and disks, are connected through some fast interconnection network.  Multiprocessor architecture alternatives  Shared memory (SM)  Shared disk (SD)  Shared nothing (SN)  Hybrid architectures
  • 12. Distributed DBMS Page 10-12. 15 © 1998 M. Tamer Özsu & Patrick Valduriez Shared-Memory DBMS on symmetric multiprocessors (SMP) + Simplicity, load balancing, fast communication - Network cost, low extensibility, and low availability All the processors are under the control of a single operating system.
  • 13. Distributed DBMS Page 10-12. 16 © 1998 M. Tamer Özsu & Patrick Valduriez Shared-Disk + network cost, extensibility, availability, and lower cost - complexity, potential performance problem for cache coherency Each processor-memory node is under the control of its own copy of the operating system
  • 14. Distributed DBMS Page 10-12. 17 © 1998 M. Tamer Özsu & Patrick Valduriez Shared-Nothing + Extensibility, and availability - Difficult load balancing (based on data location and not the actual load of the system ) Each node can be viewed as a local site (with its own database and software) in a distributed database system.
  • 15. Distributed DBMS Page 10-12. 18 © 1998 M. Tamer Özsu & Patrick Valduriez Hybrid Architectures  Various possible combinations of the three basic architectures are possible to obtain different trade- offs between cost, performance, extensibility, availability, etc.
  • 16. Distributed DBMS Page 10-12. 19 © 1998 M. Tamer Özsu & Patrick Valduriez Parallel DBMS Techniques  Data placement  Physical placement of the DB onto multiple nodes  Static vs. Dynamic  Parallel data processing  Select is easy  Join (and all other non-select operations) is more difficult  Parallel query optimization  Choice of the best parallel execution plans  Automatic parallelization of the queries and load balancing
  • 17. Distributed DBMS Page 10-12. 20 © 1998 M. Tamer Özsu & Patrick Valduriez Data Partitioning  Since programs are executed where the data reside, data placement is a critical performance issue.  Data placement must be done so as to maximize system performance.  Each relation is divided in n partitions (subrelations), where n is a function of relation size and access frequency  Implementation  Round-robin  Maps i-th element to node i mod n  Good for sequential relation access but not for exact-match queries  B-tree index (Range partitioning)  Supports range queries but large index  Hash function  Only exact-match queries but small index
  • 18. Distributed DBMS Page 10-12. 21 © 1998 M. Tamer Özsu & Patrick Valduriez Partitioning Schemes Round-Robin Hashing Interval ••• ••• ••• ••• ••• ••• ••• a-g h-m u-z
  • 19. Distributed DBMS Page 10-12. 22 © 1998 M. Tamer Özsu & Patrick Valduriez Parallel Data Processing  Two ways of exploiting high-performance multiprocessor systems:  Automatically detect parallelism in sequential programs (e.g., Fortran, OPS5)  Augment an existing language with parallel constructs (e.g., C*, Fortran90)  Critique  Hard to develop parallelizing compilers, limited resulting speed- up  Enables the programmer to express parallel computations but too low-level details
  • 20. Distributed DBMS Page 10-12. 23 © 1998 M. Tamer Özsu & Patrick Valduriez Data-based Parallelism  Inter-operation  p operations of the same query in parallel op.3 op.1 op.2 op. R op. R1 op. R2 op. R3 op. R4 •Intra-operation ➡ The same op in parallel ➡ is based on the decomposition of one operator (e.g: SELECT) in a set of independent sub-operators, called operator instances.
  • 21. Distributed DBMS Page 10-12. 24 © 1998 M. Tamer Özsu & Patrick Valduriez Join Processing  Three basic algorithms for intra-operator parallelism  Parallel nested loop join: no special assumption  Parallel associative join: one relation is declustered on join attribute and equi-join  Parallel hash join: equi-join  They also apply to other complex operators such as duplicate elimination, union, intersection, etc. with minor adaptation
  • 22. Distributed DBMS Page 10-12. 25 © 1998 M. Tamer Özsu & Patrick Valduriez 1. Parallel Nested Loop Join send partition node 3 node 4 node 1 node 2 R1: S1 S2 R2:
  • 23. Distributed DBMS Page 10-12. 26 © 1998 M. Tamer Özsu & Patrick Valduriez 2. Parallel Associative Join node 1 node 3 node 4 node 2 R1: R2: S1 S2
  • 24. Distributed DBMS Page 10-12. 27 © 1998 M. Tamer Özsu & Patrick Valduriez 3. Parallel Hash Join node node node node node 1 node 2 R1: R2: S1: S2:
  • 25. Distributed DBMS Page 10-12. 28 © 1998 M. Tamer Özsu & Patrick Valduriez Parallel Query Optimization  The objective is to select the “best” parallel execution plan for a query using the following components  Search space  Models alternative execution plans as operator trees  Left-deep vs. Right-deep vs. Bushy trees  Search strategy  Dynamic programming for small search space  Randomized for large search space  Cost model (abstraction of execution system)  Is responsible for estimating the cost of a given execution plan  Physical schema info. (partitioning, indexes, etc.)  Statistics and cost functions
  • 26. Distributed DBMS Page 10-12. 29 © 1998 M. Tamer Özsu & Patrick Valduriez Execution Plans as Operator Trees R2 R1 R4 Result j2 j3 Left-deep Right-deep j1 R3 R2 R1 R4 Result j5 j6 j4 R3 R2 R1 R3 j7 R4 Result j9 Zig-zag j8
  • 27. Distributed DBMS Page 10-12. 30 © 1998 M. Tamer Özsu & Patrick Valduriez Load Balancing  Good load balancing is crucial for the performance of a parallel system  The response time of a set of parallel operators is that of the longest one.  Startup  The time needed to start a parallel operation may dominate the actual computation time  Interference  When accessing shared resources, each new process slows down the others (hot spot problem)  Skew  The response time of a set of parallel processes is the time of the slowest one
  • 28. Distributed DBMS Page 10-12. 31 © 1998 M. Tamer Özsu & Patrick Valduriez Load Balancing  Problems arise for intra-operator parallelism with skewed data distributions  attribute data skew (AVS)  e.g., there are more citizens in Paris than in Waterloo  tuple placement skew (TPS)  introduced when the data are initially partitioned (e.g., with range partitioning).  selectivity skew (SS)  redistribution skew (RS)  join product skew (JPS)
  • 29. Distributed DBMS Page 10-12. 32 © 1998 M. Tamer Özsu & Patrick Valduriez End of Chapter 6