O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Parallel Analytics as a Service
Petrie Wong, Andy He, Eric Lo
Department of Computing
The Hong Kong Polytechnic University...
Motivation
Massively Parallel Processing Relational
Database Systems
o SQL interface
o easy to scale-out
o fast query time...
Motivation
● MPPDB-as-a-Service
o service provider
 consolidate tenants to fewer machines
● achieves a lower operation co...
MPPDB as a service: Example
● Shivnath: requests a 64-node PDB
● Reynold Xin: requests a 128-node PDB
● Eric: requests a 3...
Virtual Machine vs. Shared-process
Virtual Machine*
● offers hard
isolation
● incurs significant
redundancy on
resources
o...
DaaS
● OLTP workload
o queries touch small data
● SLA
o throughput (e.g., 100tps)
b4-&-after consolidation
is the same
Pre...
Requirements of a MPPDBaaS
R1. Support 10000+ of tenants and machine nodes
R2. Offer high availability services
o replicat...
Our solution:
Tenant-Driven Design
● active tenant ratio in real multi-tenant
environments is low
o in IBM DaaS: ~10% acti...
● R = 3, TDD creates 3 MPPDBs
● # of nodes of each MPPDB
= the tenant that requests the max # of
nodes
Tenant Driven Desig...
T2
T2
Tenant Driven Design
Query Routing - Example
T2
T1
T5
00:00 GMT 24:00 GMT
T1
Q1
Q3
Q2
Q4
T2
Q7
Q5
Q6
MPPDB1
MPPDB0
M...
Scaling up TDD
Realistic Example
● 5,000 tenants
● Average 10% of tenants active
● 500 active tenants
500+ Replicas !!!
TD...
Scaling up TDD: solution
● Further divide the tenants into groups
● Each group uses one TDD
● Considerations
o minimize th...
Scaling up TDD
● Formulate as
o Largest Item
Vector Bin
Packing Problem
with Fuzzy
Capacity
● Devise effective
heuristic s...
Thrifty - System Architecture
Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic Uni...
Experimental Result -- Overview
● Setup: MulTe-like
● 5,000 tenants
● 2 - 32 nodes
● 200GB to 3.2TB
~89,300 nodes requeste...
Consolidation Effectiveness
86.5%
79.3%
Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polyt...
Thrifty - Prototype of MPPDB as a Service
● Shared-Process Consolidation
● provide High Availability
● guarantee Query Per...
Thank You
any questions?
Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic Universi...
Tenant-Driven Design (TDD)
● Cluster Design
o divide the machine nodes in the cluster into A
groups
 each group of nodes ...
Consolidation Effectiveness -
under Higher Active Tenant Ratio
Parallel Analytics as a Service Petrie Wong, Andy He, Eric ...
Heuristic Algorithm -
2-Step Grouping
Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytec...
2-Step Grouping
vs. Standard Heuristics
● get higher
consolidation ratio in
all dimensions
● get result in few
hours only ...
Lightweight Elastic Scaling
● Reactive approach
o If the SLA is lower than 99.9% based in past 24hrs
statistic, the system...
Lightweight Elastic Scaling
trigger finishtrigger finish
Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,Th...
Manual Tuning
System administrator may instead use
the parameter U to manually
Use case
● tiny time percentage of possibly...
Linear and Non-linear Scale-out
Queries - Concurrent Execution
consolidation opportunity by merging clusters
● query templ...
Contribution
● Thrifty
o a prototype implementation of MPPDBaaS
o Tenant-driven Design (TDD)
 Smartly organize the tenant...
Replications
● Vary R
Próximos SlideShares
Carregando em…5
×

Parallel analytics as a service

420 visualizações

Publicada em

Recently, massively parallel processing relational database systems (MPPDBs) have gained much momentum in the big data analytic market. With the advent of hosted cloud computing, we envision that the offering of MPPDB-as-a-Service (MPPDBaaS) will become attractive for companies having analytical tasks on only hundreds gigabytes to some ten terabytes of data because they can enjoy high-end parallel analytics at a cheap cost. This paper presents Thrifty, a prototype implementation of MPPDB-as-a-service. The
major research issue is how to achieve a lower total cost of ownership by consolidating thousands of MPPDB tenants on to a shared hardware infrastructure, with a performance SLA that guarantees the tenants can obtain the query results as if they are executing their queries on dedicated machines. Thrifty achieves the goal by using a tenant-driven design that includes (1) a cluster design that carefully arranges the nodes in the cluster into groups and creates an MPPDB for each group of nodes, (2) a tenant placement that assigns each tenant to several MPPDBs (for high availability service through replication), and (3) a query routing algorithm that routes
a tenant’s query to the proper MPPDB at run-time. Experiments show that in a MPPDBaaS with 5000 tenants, where each tenant requests 2 to 32 nodes MPPDB to query against 200GB to 3.2TB of data, Thrifty can serve all the tenants with a 99.9% performance SLA guarantee and a high availability replication factor of 3, using only 18.7% of the nodes requested by the tenants.

Publicada em: Dados e análise
  • Entre para ver os comentários

  • Seja a primeira pessoa a gostar disto

Parallel analytics as a service

  1. 1. Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo Department of Computing The Hong Kong Polytechnic University {cskfwong, cszahe, ericlo}@comp.polyu.edu.hk
  2. 2. Motivation Massively Parallel Processing Relational Database Systems o SQL interface o easy to scale-out o fast query time o expensive  hardware cost, operation cost and  software license Vertica, Microsoft PDW, Greenplum, ... about USD 15K per core or USD 50K per TB of data Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 2
  3. 3. Motivation ● MPPDB-as-a-Service o service provider  consolidate tenants to fewer machines ● achieves a lower operation cost o tenants  enjoy parallel analytics at a lower price Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 3
  4. 4. MPPDB as a service: Example ● Shivnath: requests a 64-node PDB ● Reynold Xin: requests a 128-node PDB ● Eric: requests a 32-node PDB ● Donald Kossmann: ... ● We: service provider o have 1,000 nodes ● Problems to Solve: o Tenant Consolidation  Performance (SLA Guarantee P)  High Availability (Replication Factor R) ● P% (e.g., 99.9%) of time a tenant finishes its queries without feeling any performance delay o Shivnath's Q1 finishes in 100 seconds (isolation) o After consolidation: Q1 finishes in 100 seconds o After Consolidation  Query Routing  Monitoring, Elastic Scaling, and Re-consolidation Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 4
  5. 5. Virtual Machine vs. Shared-process Virtual Machine* ● offers hard isolation ● incurs significant redundancy on resources o multiple copies of DBMS Shared-process ● obtains higher consolidation effectiveness ● previous research o single DB o OLTP workloads ● This paper o MPPDB o OLAP workloads * We believe Amazon's RedShift is based on VM Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 5
  6. 6. DaaS ● OLTP workload o queries touch small data ● SLA o throughput (e.g., 100tps) b4-&-after consolidation is the same Previous Works (DaaS) vs. MPPDBaaS MPPDBaaS ● OLAP workload o I/O-intensive ● SLA o query latency b4-&-after consolidation is the same after consolidation, many tenants active together? SLA OK! after consolidation, many tenants active together? Easily Violate SLA! ● many tenants o small data, single node ● many tenants o "big" data, multiple nodes Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 6
  7. 7. Requirements of a MPPDBaaS R1. Support 10000+ of tenants and machine nodes R2. Offer high availability services o replicate tenants' data R3. Offer query-latency based performance SLA guarantees o need performance prediction techniques R4. Support general tenants: o tenant's query templates may not be known in advance o voids R3  because most performance prediction techniques require query templates be given Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 7
  8. 8. Our solution: Tenant-Driven Design ● active tenant ratio in real multi-tenant environments is low o in IBM DaaS: ~10% active at same time ● and come up with a deployment plan that o let each active tenant exclusively use an MPPDB B. Reinwald. Multitenancy. University of Washington and Microsoft Research Summer Institute, 2010. Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 8
  9. 9. ● R = 3, TDD creates 3 MPPDBs ● # of nodes of each MPPDB = the tenant that requests the max # of nodes Tenant Driven Design: A Toy Example ● 10 tenants: T1, T2, ... T10 Tenant T1 T2 T3 T4 T5 ... T10 Total Requested Nodes 6 6 5 5 2 ... 2 34 Group MPPDB0 MPPDB1 MPPDB2 Nodes 6 6 6 Hosting T1 - T10 T1 - T10 T1 - T10 TDD property: replication factor = A (# of active tenant in peak hour) Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 9
  10. 10. T2 T2 Tenant Driven Design Query Routing - Example T2 T1 T5 00:00 GMT 24:00 GMT T1 Q1 Q3 Q2 Q4 T2 Q7 Q5 Q6 MPPDB1 MPPDB0 MPPDB2 Routing Principle: Let a tenant exclusively use a MPPDB! non-linear scale-out A=3 TDD's SLA Guarantee: NO matter what query, ad-hoc query (a new query that is seen the first time) linear scale-out query with template given submitted sequentially (interactive queries) submitted in a batch at any multi-programming-level the SLAs of a maximum of A active tenants are met. Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 10
  11. 11. Scaling up TDD Realistic Example ● 5,000 tenants ● Average 10% of tenants active ● 500 active tenants 500+ Replicas !!! TDD guarantee: the SLAs of a maximum of A active tenants are met. TDD property: replication factor = A (# of active tenant in peak hour) Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 11 TDD guarantee: the SLAs of a maximum of 500 active tenants are met. TDD property: replication factor = 500 (# of active tenant in peak hour)
  12. 12. Scaling up TDD: solution ● Further divide the tenants into groups ● Each group uses one TDD ● Considerations o minimize the total # of nodes used o reasonable replication factor  # active tenant in each tenant-group is low e.g. only 3 tenants active together e.g. divide 5000 tenant into 300 groups Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 12
  13. 13. Scaling up TDD ● Formulate as o Largest Item Vector Bin Packing Problem with Fuzzy Capacity ● Devise effective heuristic solution called 2-step Grouping algorithm Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 13
  14. 14. Thrifty - System Architecture Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 14
  15. 15. Experimental Result -- Overview ● Setup: MulTe-like ● 5,000 tenants ● 2 - 32 nodes ● 200GB to 3.2TB ~89,300 nodes requested (without replica) saves 83.3% of nodes !!! ~15,000 nodes only including high availability already (3 replicas!) after consolidation Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 15
  16. 16. Consolidation Effectiveness 86.5% 79.3% Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 16
  17. 17. Thrifty - Prototype of MPPDB as a Service ● Shared-Process Consolidation ● provide High Availability ● guarantee Query Performance SLA ● support General Tenants Conclusions Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University 17
  18. 18. Thank You any questions? Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University END
  19. 19. Tenant-Driven Design (TDD) ● Cluster Design o divide the machine nodes in the cluster into A groups  each group of nodes deploys a separate MPPDB ● Tenant Placement o each MPPDB hosts all tenants ● Query Routing o route a tenant's query to a MPPDB that contains its dataTDD's property : enforces a replication factor of A for each tenant Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University b-1
  20. 20. Consolidation Effectiveness - under Higher Active Tenant Ratio Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University b-2
  21. 21. Heuristic Algorithm - 2-Step Grouping Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University b-3
  22. 22. 2-Step Grouping vs. Standard Heuristics ● get higher consolidation ratio in all dimensions ● get result in few hours only for 10k tenants Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University b-4
  23. 23. Lightweight Elastic Scaling ● Reactive approach o If the SLA is lower than 99.9% based in past 24hrs statistic, the system will trigger elastic scaling. o a new MPPDB will be online and the system will o deploy the tenant Tx to that MPPDB o which is most active in past 24hrs to. o all queries of the Tx will be route to the new MPPDB after its online. ● Example o three 10-node MPPDBs serves 20 tenants o SLA guarantee drops from 99.95% to 99.0%  solution: starts a new 10-node MPPDB ● cost 30 minutes for 1TB data (with parallel loading)Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University b-5
  24. 24. Lightweight Elastic Scaling trigger finishtrigger finish Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University b-6
  25. 25. Manual Tuning System administrator may instead use the parameter U to manually Use case ● tiny time percentage of possibly SLA violations o three 10-node MPPDBs o serves 20 tenants o SLA guarantee drops from 99.9% to 99.8%  solution 1: starts a new 10-node MPPDB (+10)  solution 2: increase 10-nodes to 11-nodes (+3) ● shorter query latency saves 7 nodes (17.5%) number of nodes in a MPPDB Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University b-7
  26. 26. Linear and Non-linear Scale-out Queries - Concurrent Execution consolidation opportunity by merging clusters ● query template required SLA SLA Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University b-8
  27. 27. Contribution ● Thrifty o a prototype implementation of MPPDBaaS o Tenant-driven Design (TDD)  Smartly organize the tenants into groups  Each group has R MPPDBs  Each MPPDB ● host a group of tenants  Prove that TDD solves R2 to R4 in a row! o Scale TDD to 10000+ of tenants and machine nodes (R1)?  Cast the problem as a new variant of vector bin packing problem  Provide an efficient heuristics algorithm [R = replication factor] R2. high availability R3. query latency SLA R4. generality Parallel Analytics as a Service Petrie Wong, Andy He, Eric Lo ,The Hong Kong Polytechnic University b-9
  28. 28. Replications ● Vary R

×