accordion - vldb 2014

19
Accordion: Elastic Scalability for Database Systems Supporting Distributed Transactions Marco Serafini Qatar Computing Research Institute joint work with: Essam Mansour, Ashraf Aboulnaga Qatar Computing Research Institute Kenneth Salem University of Waterloo Taha Rafiq Amazon.com Umar Farooq Minhas IBM Research Almaden

Upload: marco-serafini

Post on 05-Dec-2014

178 views

Category:

Engineering


2 download

DESCRIPTION

Slides of the VLDB 2014 presentation of the paper "Accordion: Elastic Scalability for Database Systems Supporting Distributed Transactions"

TRANSCRIPT

Page 1: Accordion - VLDB 2014

Accordion: Elastic Scalability for Database Systems

Supporting Distributed Transactions

!Marco Serafini

Qatar Computing Research Institute !

joint work with: Essam Mansour, Ashraf Aboulnaga Qatar Computing Research Institute Kenneth Salem University of WaterlooTaha Rafiq Amazon.com Umar Farooq Minhas IBM Research Almaden

Page 2: Accordion - VLDB 2014

Leveraging the Cloud

P1P2P3

P4P5P6

P7P8

Applications cannot always leverage the cloud

Make partitioned DBMSes scale out and in!

Cloud layer

DBMS layer

Page 3: Accordion - VLDB 2014

Leveraging the Cloud

P1P2

P3P4P5 P6

P7P8

Applications cannot always leverage the cloud

Make partitioned DBMSes scale out and in!

Cloud layer

DBMS layer

Page 4: Accordion - VLDB 2014

Online Solution

Online = Handle workload with unanticipated skews

Partitions suddenly become hot

Overall database load grows/shrinks

Skews change over time

No prior knowledge, no workload trace analysis

Page 5: Accordion - VLDB 2014

Accordion

Goal: run a partitioned DBMS on a variable set of servers

DBMS supports ACID distributed transactions

Necessary in many OLTP workloads

Major performance bottleneck

Problems we address: Where & When to move data

New!

Page 6: Accordion - VLDB 2014

Accordion Architecture

�Y<hjQEQjs� ]Zd][I[jh

0RQLWRULQJ��6HUYHU�FDSDFLW\�

HVWLPDWRU

3DUWLWLRQ�SODFHPHQW�PDSSHU

7UDQVDFWLRQ�UDWHV��0HPRU\�XWLOL]DWLRQ��SHU�SDUWLWLRQ�5HVSRQVH�ODWHQF\��SHU�VHUYHU�$IILQLW\�PDWUL[��SHU�SDUWLWLRQ�SDLU�

3URYLVLRQLQJ��3DUWLWLRQ�PLJUDWLRQ

6HUYHU�FDSDFLW\�IXQFWLRQ�F

1HZ�PDSSLQJSDUWLWLRQV�ĺ�VHUYHUV

$FFRUGLRQ

3DUWLWLRQHG�'%06

3HUIRUPDQFHPHWULFV

Page 7: Accordion - VLDB 2014

The dangers of scaling out

with distributed transactions

Page 8: Accordion - VLDB 2014

Before scale out: After:

Full DB

1/2 DB

1/2 DB

Does scaling out increase throughput?

Scaling Out: How Effective is it?

Page 9: Accordion - VLDB 2014

0 5000

10000 15000 20000 25000 30000 35000

8 16 32 64

Serv

er c

apac

ity (t

ps)

Overall number of partitions

16 partitions per server8 partitions per server

No Distributed Transactions

YCSB Max throughput

per server constant

Overall throughput

grows linearlyN nodes

2*N nodesBars: Smaller DB <-

Larger DB ->

Page 10: Accordion - VLDB 2014

Distributed Transactions

0 5000

10000 15000 20000 25000 30000

8 16 32 64

Serv

er c

apac

ity (t

ps)

Overall number of partitions

16 partitions per server8 partitions per server

TPC-C Max throughput

per server decreases

Overall throughput

can still increase N nodes

2*N nodesBars: Smaller DB <-

Larger DB ->

Page 11: Accordion - VLDB 2014

Bin Packing Partition Placement

Bin Server

Volume of Bin Maximum throughput of server

Item Database partition

Volume of Item Transaction rate of partition

Distributed Transactions = Circular Dependency

Bin Volume - not constant!

Packing

Constraints Determines

Page 12: Accordion - VLDB 2014

Two Problems

1. Model for server capacity (maximum throughput)

Capacities varies based on placement

Learn model online

2. Partition placement using this model

Page 13: Accordion - VLDB 2014

1: Server Capacity Models

Affinity: Likelihood of co-access among partitions

!

Max throughput capacity per server depends on affinity

Null affinity (YCSB) -> Constant capacity

Uniform affinity (TPC-C) -> f (# local partitions)

Arbitrary affinity -> Must model affinity explicitly

Aff(P1,P2) = Prob (P2 accessed | P1 accessed)

Page 14: Accordion - VLDB 2014

2: Partition Placement

Minimize data migration

s.t. servers are not overloaded

Server capacity function Can be nonlinear

Accordion’s planner uses linear programming

Page 15: Accordion - VLDB 2014

Evaluation

Page 16: Accordion - VLDB 2014

Setup

Target DBMS: H-Store

Horizontally partitioned

Single-partition transactions execute sequentially

Distributed transactions use 2PC

Three benchmarks

YCSB (null affinity)

TPC-C (uniform affinity)

Clustered TPC-C (arbitrary affinity)

Page 17: Accordion - VLDB 2014

Cost Reduction (TPC-C)

Arbitrary Affinity up to 9x cost reduction

Uniform Affinity up to 1.7x cost reduction

0 5

10 15 20 25 30

64 256 1024

Num

ber o

f ser

vers

use

d

Number of partitions

AccordionKairos-SP

GreedyStatic

0 5

10 15 20 25 30 35 40

64 256 1024

Num

ber o

f ser

vers

use

dNumber of partitions

AccordionKairos-SP

GreedyStatic

Page 18: Accordion - VLDB 2014

Impact on Migration (TPC-C)

Shorter reconfiguration time, fewer servers

0 5000

10000 15000 20000 25000 30000 35000 40000

0 10 20 30 40 50

Tran

sact

ions

per

sec

Time (min)

AccordionKairos-SP

Cold

Page 19: Accordion - VLDB 2014

Thank you! !

Marco Serafini [email protected]