aaron j. elmore, carlo curino, divyakant agrawal, amr el...

129
Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El Abbadi [aelmore,agrawal,amr] @ cs.ucsb.edu ccurino @ microsoft.com

Upload: others

Post on 12-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Aaron J. Elmore, Carlo Curino,

Divyakant Agrawal, Amr El Abbadi

[aelmore,agrawal,amr] @ cs.ucsb.edu

ccurino @ microsoft.com

Page 2: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

2

Page 3: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Why cloud? (are you really asking?)

Economy-of-scale arguments

Pay-per-use value to customers

Moving to the Cloud

Page 4: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Moving to DaaS

Why Database as a Service (DaaS) for tenants?

DB management drama becomes provider’s problem

(Ideally) high level Service Level Agreement (SLAs / SLOs)

Accelerate development lifecycle

Why Database as a Service (DaaS) for providers?

Internalize a high-cost portion of service (admin)

Scale + density + uniformity lower cost

Page 5: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

The illusion we are aiming for…

Tenant’s view Provider’s view

Page 6: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Traditional DB deployments

Yo… the DB is slow!

$#%@#! …Try now.

DBAdmin Developer

DB

Page 7: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

What changes in DBaaS?

Developer

Developer

Developer

Developer

Developer

Developer

Developer Developer

Developer

DBAdmin

DB

Developer

Developer

Developer

Developer

Developer

Developer

Developer

Developer

Page 8: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

* experiments using OLTPBench: http://oltpbenchmark.com

DaaS (managed DBMS)

Manually tuned DBMS

Page 9: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DaaS: challenges (and agenda)

Page 10: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

10

Page 11: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Shared Hardware (DB-in-a-VM)

Hardware

Hypervisor

Guest OS

VM

DBMS

(tenant1)

Guest OS

VM

DBMS

(tenant2)

Guest OS

VM

DBMS

(tenant3)

Guest OS

VM

DBMS

(tenant4)

Page 12: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Shared Process

Hardware

OS

Database Process

Database

(tenant1)

Database

(tenant2)

Database

(tenant3)

Database

(tenant2)

Page 13: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Shared Table

Hardware

OS

Database Process

Table

Rows

(tenant1)

Rows

(tenant2)

Rows

(tenant3)

Rows

(tenant4)

Page 14: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Shared Hardware

Shared Process

Shared Table

Strong Isolation (security, performance)

Mechanics (High Availability, Migration)

Amortize metadata overheads

Trade-off

Sharing and coordination resource

consumption (MEM/CPU/Disk IOps)

Page 15: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Shared Hardware

SmartSLA, RemusDB, Amazon RDS

Multi-tenancy Architectures

Shared Process

RelationalCloud, CloudDB, SQLAzure, Delphi, Y! cidr2009

(shared storage) ElasTras, DAX

Shared Table

Force.com, Jacobs/Aulbach

Page 16: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

16

“Reusing/Specializing VM technologies for DaaS”

Hardware

Hypervisor

Guest OS

VM

DBMS

(tenant1)

Guest OS

VM

DBMS

(tenant2)

Guest OS

VM

DBMS

(tenant3)

Guest OS

VM

DBMS

(tenant4)

Page 17: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Amazon RDS

Provides pre-configured DBMS (MySQL/Oracle/SQLServer)

Addresses much of provisioning issues

Strong Isolation / catch-all configuration

Commercial offering: Amazon RDS

Page 18: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

SmartSLA [Xiong et al. ICDE 2011]

Focus

Leverage VM-based mechanisms

Deliver DB-level SLAs

Key Contribution

SLA violation vs Resource modeling

Actuation of VM-based mechanisms (cpu, ram, replication)

Page 19: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Key mechanism

Decompose problem in:

ML-based model of resource / SLA-penalty

Allocation of resource + replication

SmartSLA

Page 20: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

ML Modeling

Build a Map of space

(simple ML/features)

Estimating SLA violation cost and Allocation

Allocation algorithm

Explore allocation space

Models infrastructure cost for replication

Models cost of increasing replication

Page 21: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

REMUSDB [Minhas et al. VLDB 2011 /VLDBJ 2013]

Focus

High Availability via VM replication

OLTP-compatible performance

Key Contributions

Reuse of mature VM technology (pro of Shared Hardware)

Smart DB-specific tricks to improve performance

Page 22: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

REMUS

Leverage Xen VM-replication

Snapshots the VM state every few tens of ms

Delays network and disk writes until next checkpoint (consistent)

Fail-over to secondary and restart from latest checkpoint

Problems

DBMS bufferpool changes too fast (large deltas to checkpoint)

Latency overhead is high for OLTP

Page 23: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

REMUSDB: DB-specific optimizations

Avoid checkpointing “clean” pages

no checkpoint for clean pages

bookkeeping so that secondary fetch from disk if needed

Limit network delay to Commit/Abort

Leverage transactional semantics

“delay” only Commit/Abort messages

Reduce impact on throughput

32% goes down to about 10%

Page 24: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Design mismatch

DBMS were designed to make full use of dedicate machines

Aggressively consume idle resources (especially IOPs)

[Curino et al. VLDB 2010]

20:1 consolidation 20:1 consolidation (skewed)

Page 25: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

26

Hardware

OS

Database Process

Database

(tenant1)

Database

(tenant2)

Database

(tenant3)

Database

(tenant2)

“The DBMS knows best”

Page 26: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Commercial offering: SQLAzure [Bernstein et al. ICDE 2011]

SQL Azure

Shared DBMS process, Dedicated database

Shared logging

Modified version of SQL Server

High-availability via quorum of replicas

Support scale-out

ACID within a row-group

Read-committed across row-group

Page 27: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

ElasTras Architecture [Das et al. HotCloud 2009]

(Shared Storage)

OTM OTM

Distributed Fault-tolerant Storage

OTM

TM Master Metadata Manager

P1 P2 Pn

Txn Manager DB

Partitions

Master and MM Proxies

Log Manager Durable Writes

Health and Load

Management

Lease Management

Page 28: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Scalable and fault tolerant m/t achieved by data layer spanning colos

Use Cassandra for storage tier with single owning DB instance

Leverage DB and quorum semantics for performance

Operation type & R/W/N

Epoch-bounded strong consistency

DAX [Liu et al. VLDB 2013]

Page 29: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

RelationalCloud [Curino et al. CIDR 2011]

Page 30: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

* experiments using OLTPBench: http://oltpbenchmark.com

Page 31: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

32

“Extreme multi-tenancy”

Hardware OS

Database Process Table

Rows

(tenant1)

Rows

(tenant2)

Rows

(tenant3)

Rows

(tenant4)

Page 32: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Key idea

DBMSs don’t scale well at the tenant/schema level

[Jacobs and Aulbach BTW 2007]

Page 33: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Force.com and [Aulbach et al. SIGMOD 2008]

Focus

Target tens of thousands of tenants per server

Partially shared schema (polymorphic SaaS apps)

Deal with schema-level DBMS scalability limits

Key Contribution

Clever data design, schema mapping / query rewriting

Page 34: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

[Aulbach et al. SIGMOD 2008]

Many variants

Private Table

Extension Table

Universal Table

Pivot Table

Chunk Table

Chunk Folding

Page 35: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Focused on extreme multi-tenancy

Middleware-based querying rewriting

Ad-hoc security

Hard to provide performance isolation

Only for small / low-activity tenants

Page 36: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DaaS: challenges (and agenda)

Page 37: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

39

“Chop it and scale it out”

Page 38: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Schism [Curino et al. VLDB 2010]

Positioning

Partitioning for shared-nothing DBMSs (RelationalCloud)

Focus

automatic partitioning of arbitrary schemas (many-to-many)

handle access skew, replication

Key Contributions

Model the problem as graph-partitioning

“Explain” results using decision trees (practical partition functions)

Page 39: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Schism: Graph-based Partitioning

Page 40: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Schism: Graph-based Partitioning

Graph Representation:

tuples in the DB are nodes in the graph

Page 41: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Graph Representation:

tuples in the DB are nodes in the graph

transactions impose edges among the tuples they access

Schism: Graph-based Partitioning

Page 42: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Schism: Graph-based Partitioning

Graph Representation:

tuples in the DB are nodes in the graph

transactions impose edges among the tuples they access

Page 43: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Schism: Graph-based Partitioning

Graph Representation:

tuples in the DB are nodes in the graph

transactions impose edges among the tuples they access

Page 44: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Schism: Graph-based Partitioning

Graph Representation:

tuples in the DB are nodes in the graph

transactions impose edges among the tuples they access

Page 45: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Graph Partitioning: find K (close to) balanced partitions of the nodes that minimize the weight of the cut edges (i.e., minimize distributed transactions)

Schism: Graph-based Partitioning

Graph Partitioning,

NP-Complete, but

great heuristics

(METIS)

Page 46: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Schism: Graph-based Partitioning

Natural Classification

Problem (Decision Tree)

Explanation: compact, predicate-based representation of the graph-partitioning solution

Page 47: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

SWORD [Quamar et al. EDBT 2013]

Key Contributions

Repartitioning heuristics

Scaling to larger problems by pre-processing (hyper)graph

Greater focus on replication for fault-tolerance

Use of quorums (not just ROWA)

Page 48: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Horticulture [Pavlo et al. 2012]

Focus

Time-varying skew

Handle Store procedures natively

Key Contributions

Schema and workload-driven partitioning

Large neighborhood search (rich cost model + cheap estimation)

Horizontal partitioning + table replication + index replication

Page 49: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)
Page 50: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Best Design Input

Workload

------- ------- -------

Schema

DDL

Initial Design Relaxation Local Search

Restart

53

Horticulture: Large Neighborhood search

Page 51: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Horticulture Schism

0

10,000

20,000

30,000

40,000

50,000

60,000

4 8 16 32 64

02,0004,0006,0008,000

10,00012,00014,000

4 8 16 32 64

TPC-C

TPC-C Skewed

(txn/sec) higher is better

Throughput comparison (for H-Store)

(cost estimate) lower is better

Page 52: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Where are we with partitioning?

Problems we know how to solve:

OLAP (tons of classic work)

OLTP (few recent papers, good grasp on the problem)

More to do:

OLAP-OLTP mixed workloads partitioning

Coordinating replication (and erasure codes) for:

Performance, Fault-tolerance

Geo-distributed placement/replication

Page 53: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DaaS: challenges (and agenda)

Page 54: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Managing Resource Contention

Page 55: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Finding the Balance

Tenant’s view Provider’s view

Page 56: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Contention for Resources

t1 t2

t4

t3

Page 57: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Enable “Performance” in a Shared Environment

71

Page 58: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Mechanisms to Enforce Isolation

Hard

Static Provisioning

Resource Allocation (Dynamic Provisioning)

Soft

Smart Placement

(Admission Control)

Page 59: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DaaS: challenges (and agenda)

Page 60: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Hard Isolation“Keeping your word about resource sharing”

Page 61: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

SQLVM [CIDR 2013, SIGMOD 2013, VLDB 2014]

Focus

Embedding resource allocation in DBMS kernel.

How to share critical resources required by DB.

How to understand resource allocation.

Key Contributions

Fine grain resource scheduling (CPU, Memory, I/O).

Metering to audit resource promise.

Page 62: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

SQLVM Motivation

WHERE State = ‘Vermont’ WHERE State = ‘Vermont’ ‘California’

77 10/1/2013 CIDR 2013

Page 63: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Resource Governance Mechanism 100 IOPS 50 IOPS

Capacity:

200 IOPS

79 10/1/2013 CIDR 2013

Tenant2

Application

Machine in cluster

Database server process

Tenant1

database

Tenant2

database

Tenant is promised reservation of DBMS resources

“VM inside SQL process”

CPU utilization, IOPS, Memory, …

Resource governance Fine-grained resource sharing

Novel mechanisms

Metering (auditing) Monitor actual and promised metrics for tenant

Determine violations

Page 64: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Resource Allocation

CPU

CPU utilization

Memory (Buffer Pool)

Hit Ratio

Disk I/O: Shaping Traffic

issued

81 10/1/2013 CIDR 2013

Page 65: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Challenges

8

2

Page 66: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Soft Isolation

Page 67: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DaaS: challenges (and agenda)

Page 68: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Common Patterns

Understand workloads

How workloads combine

Find placement

Metrics

Page 69: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)
Page 70: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Common Patterns

Understand workloads

How workloads combine

Find placement

Metrics

Page 71: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Towards Multi-Tenant Performance SLOs

Focus

Different hardware configurations (SKU)

Multiple tenant performance SLO classes

Place to meet SLOs and minimize costs

Key Contributions

Cost aware server consolidation

Tenant placement optimization framework

Page 72: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Benchmark server to find max degree multi-tenancy

for perf objectives

Systematically reduce ‘H’ tenants, steadily increase ‘L’

tenant scheduling until a perf objective fails

Server characterizing function:

Both perf objectives met

Some perf objective fails

Heterogeneous SLO Characterization

diskC

0

5

10

15

20

25

0 50 100

Nu

m o

f H

(100tp

s)

Ten

an

ts

Number of L (10tps) Tenants

Page 73: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Assumption

Solution

Approach

Page 74: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)
Page 75: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Common Patterns

Understand workloads

How workloads combine

Find placement

Metrics

Page 76: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Robust Tenant Placement

Focus

In memory databases with temporal changes / etheral DBs

Minimize servers while being robust to failures

Replication with ability to redirect workload

Key Contributions

Incremental algorithms to reduce total costs of ownership

Maintain replication and respect server load.

Migration and existing placement aware solution

Page 77: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Workloads

0

20

40

60

80

100

12-13-2010

12-14-2010

12-15-2010

12-16-2010

12-17-2010

12-18-2010

12-19-2010

Re

que

st

Rate

in

(%

)

Time (in Days)

Page 78: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Placing Tenants

Page 79: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Greedy Heuristics

Meta-heuristics

Exact Solutions

Static and incremental solutions.

Solutions

Page 80: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Framework

Incremental algorithms follows these steps:

Page 81: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)
Page 82: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Common Patterns

Understand workloads

How workloads combine

Find placement

Metrics

Page 83: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

PMAX

Focus

Latency response SLOs

Workloads are not fixed and vary, history is not available

Profit maximization

Key Contributions

Cost focused placement solution

Bounded approximation algorithms & dynamic prog. solution

Page 84: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Common Patterns

Understand workloads

How workloads combine

Page 85: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Each server has a operating costs.

Place tenants to minimize costs (occasional violations OK).

Two problem formulations:

Placement Formulation

Page 86: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Solution

Page 87: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DaaS: challenges (and agenda)

Page 88: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)
Page 89: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Common Patterns

Understand workloads

How workloads combine

Find placement

Metrics

Page 90: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Kairos

Focus

Modeling resource consumption of OLTP workloads

Consolidate workloads

Key Contributions

Method to determine active working set size

Model disk I/O for consolidation

Find balanced consolidation plan.

Page 91: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Buffer Pool Gauging for RAM

953 MB Bufferpool, on TPC-C 5W (120-150 MB/WH) Slide by Sam Madden

Page 92: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Disk Model

115

Page 93: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Node Assignment via Optimization

Implemented in DIRECT non-linear

solver; several tricks to make it go fast

Slide by Sam Madden

Problem modeled as:

Mixed-integer non-linear optimization problem

Page 94: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DaaS: challenges (and agenda)

Page 95: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

118

Page 96: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Common Patterns

Understand workloads

How workloads combine

Find placement

Metrics

Page 97: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DBSeer

Focus

Attribute resource consumption to txn classes (and tenants)

Attribute at runtime in consolidated process

Build models of various DB resources

Key Contributions

Models for disk I/O, locks, throughput, etc

Attribute resources to tenants.

Ability for DBAs to play what-if

Page 98: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DBSeer From 10000 ft

What-if questions

Page 99: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Transaction Clustering

New

Order

Payment

Delivery

SQL Logs

time connection sql stmt 1:92 C1 BEGIN TRANSACTION

1:93 C2 SELECT * FROM

….

Build

Access

Distributions

1. Extract features of each transaction

- number of rows read/written to each table

2. Run DBSCAN clustering algorithm

Page 100: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Predicting Disk I/O

Disk Reads =

Disk Writes =

Key Observation:

Predict # of dirty pages

Page 101: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Other Components of DBSeer

Page 102: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DaaS: challenges (and agenda)

Page 103: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

131

Page 104: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Common Patterns

Understand workloads

How workloads combine

Find placement

Metrics

Page 105: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Pythia

Focus

Tenant workloads are unknown, disk-based, and dynamic

Use supervised learning to model tenants and colocation

Leverage models to resolve performance crisis

Key Contributions

Method for empirically learning how tenant classes colocate

End to end framework for tenant placement

Page 106: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Tenant Model

Page 107: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Describe Resource Consumption

Disk Heavy

Disk Medium

Disk Light

CPU Heavy

CPU Light

Feature 1 Feature 2 Feature 3 T ( ) =

Page 108: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Learn which classes colocate well

Under

Good

Over

Boundaries set

by administrator.

Uses resources and

latency SLOs.

Control over

consolidation.

Incrementally learned

through observation

Page 109: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

node

node model

Things Don’t Always Go To Plan

Page 110: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

.

Searching for a solution

Page 111: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

DaaS: challenges (and agenda)

Page 112: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Migration for Load Balancing

Page 113: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Migration Forms

Page 114: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Migration Goals

Page 115: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Albatross [Das et al. VLDB 2011]

Focus

Live migration in a shared storage transactional DB

Migration TM state and cache

Key Contributions

First live migration for shared storage.

Minimal strain on destination

Page 116: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

147

Tenant/DB Partition

Persistent Image

DBMS Node

Source Destination

Tenant/DB Partition

Cached DB

State

Transaction

State

Cached DB

State

Transaction

State

Live Migration for Shared Storage

Page 117: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

148

Finalize Migration Stop serving Tenant at Nsrc

Synchronize cache Migrate transaction state Transfer ownership to Ndst

Ownership Source (Nsrc)

Destination (Ndst)

Time

1. Begin Migration 2. Iterative Copying 3. Atomic Handover

Synchronize and Catch-up Track changes to DB State at Nsrc

Iteratively synchronize state changes

Initiate Migration Snapshot cache at Nsrc

Initialize tenant at Ndst Nsrc continues executing transactions

Steady State Steady State

Albatross Live Migration

Page 118: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Zephyr [Elmore et al. SIGMOD 2011]

Focus

Live migration in a shared nothing transactional DB (H2)

No heavy-weight synchronization protocols or replication.

No downtime, some aborted transactions.

Key Contributions

First live migration for shared nothing DBMS.

Minimal strain on source (scale up)

Page 119: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Init Mode

Owned Pages

Active transactions

Un-owned Pages

Freeze index wireframe and migrate

Page owned by Node

Page not owned by Node

P1

P2

P3

Pn

TS1,…, TSk

Source Destination

P1

P2

P3

Pn

Page 120: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Dual Mode

Requests for un-owned pages can block

Old, still active transactions

New transactions

Page owned by Node

Page not owned by Node

P1

P2

Pn

TSk+1,…, TSl TD1,…, TDm

P3

P3 accessed by TDi

P3 pulled from source

Source Destination

P1

P2

P3

Pn

Index wireframes remain frozen

Page 121: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Finish Mode Pages can be pulled by the destination, if needed

Completed

Page owned by Node

Page not owned by Node

Pn

Source Destination

P1

P2

P3

P1, P2, … pushed from source

TDm+1,…, TDn

Pn

P1

P2

P3

Page 122: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

“Cut Me Some Slack”: Latency-Aware Live Migration for Databases [Barker et al. EDBT 2012]

Focus

Interference aware live migration

Key Contributions

Throttles migration to minimize impact

Implementation with no internal modification

Page 123: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Slacker Approach

Page 124: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

ProRea – Live Database Migration for Multi-tenant RDBMS with Snapshot Isolation [Schiller et al. EDBT 2013]

Focus

Overcome some Zephyr shortcomings

Key Contributions

A proactive and reactive live migration

Page 125: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

ProRea - Approach

Page 126: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

In Closing

157

Page 127: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Many Other Issues

158

Page 128: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Additional resource isolation controls

SLOs / SLAs

Data sharing

Better workloads

Analytics

Future Challenges

Page 129: Aaron J. Elmore, Carlo Curino, Divyakant Agrawal, Amr El ...people.csail.mit.edu/aelmore/papers/VLDB_Tutorial_DBaaS_2-share.pdfDBMS bufferpool changes too fast (large deltas to checkpoint)

Thanks!