Extracting More Concurrency from Distributed Transactions - - PowerPoint PPT Presentation

extracting more concurrency from distributed transactions
SMART_READER_LITE
LIVE PREVIEW

Extracting More Concurrency from Distributed Transactions - - PowerPoint PPT Presentation

Extracting More Concurrency from Distributed Transactions Shuai Mu and Yang Cui and Yang Zhang and Wya0 Lloyd and Jinyang Li (OSDI 2014)


slide-1
SLIDE 1

Extracting ¡More ¡ Concurrency ¡from ¡ Distributed ¡Transactions ¡

Shuai ¡Mu ¡and ¡Yang ¡Cui ¡and ¡Yang ¡Zhang ¡and ¡Wya0 ¡Lloyd ¡ and ¡Jinyang ¡Li ¡ ¡

(OSDI ¡2014) ¡ Presented ¡by: ¡Haonan ¡Lu ¡

0 ¡

slide-2
SLIDE 2

Problem ¡

  • Tradi@onal ¡concurrency ¡control ¡techniques ¡like ¡2PL ¡and ¡OCC ¡

have ¡bad ¡performance ¡when ¡conten@on ¡is ¡high ¡

  • Why? ¡
  • 2PL ¡– ¡lock ¡queue ¡& ¡deadlocks ¡(abort) ¡
  • OCC ¡– ¡abort ¡ ¡
  • Too ¡many ¡abort ¡and ¡retries ¡lead ¡to ¡
  • Low ¡throughput ¡
  • High ¡latency ¡
  • Not-­‑scalable ¡for ¡distributed ¡transac@ons. ¡

¡

¡

1 ¡

slide-3
SLIDE 3

Problem ¡

  • ­‑-­‑ ¡compare ¡with ¡primary ¡paper ¡
  • Spanner ¡
  • How ¡to ¡design ¡a ¡strictly ¡serializable ¡database ¡system ¡that ¡is ¡at ¡

global ¡scale ¡and ¡accommodates ¡produc@on ¡workloads ¡

  • Rococo ¡
  • How ¡to ¡make ¡distributed ¡concurrency ¡control ¡more ¡performant ¡

while ¡ensuring ¡strict ¡serializability. ¡ ¡ ¡

2 ¡

slide-4
SLIDE 4

Key ¡Techniques ¡

  • Reorder ¡instead ¡of ¡abort ¡
  • Pieces ¡
  • Immediate ¡(key/value ¡dependence) ¡
  • Deferrable ¡ ¡
  • Two ¡components ¡
  • Offline ¡checker ¡
  • Iden@fy ¡non-­‑reorderable ¡pieces, ¡and ¡treat ¡them ¡specially ¡ ¡
  • Run-­‑@me ¡protocol ¡
  • Start ¡phase ¡
  • Each ¡server ¡computes ¡dependency ¡graph ¡
  • Commit ¡phase ¡
  • Coordinator ¡aggregates ¡dep ¡graphs ¡and ¡servers ¡re-­‑order ¡pieces ¡if ¡

necessary ¡for ¡strict ¡serializability ¡

¡

3 ¡

slide-5
SLIDE 5

4 ¡

slide-6
SLIDE 6

Key ¡Technique ¡

  • ­‑-­‑ ¡how ¡related ¡to ¡primary ¡
  • Spanner: ¡
  • TrueTime ¡API ¡– ¡physical ¡clocks ¡with ¡bounded ¡uncertainty. ¡ ¡
  • Paxos ¡+ ¡2PL/2PC ¡

¡ ¡

  • Rococo: ¡
  • Insuring ¡real-­‑@me ¡order ¡by ¡checking ¡dependencies ¡
  • Re-­‑order ¡conflic@ng ¡pieces ¡if ¡possible ¡instead ¡of ¡simply ¡abor@ng ¡

and ¡retrying. ¡

5 ¡

slide-7
SLIDE 7

Key ¡Findings ¡

6 ¡

slide-8
SLIDE 8

Key ¡Findings ¡

7 ¡

slide-9
SLIDE 9

Findings ¡

  • ­‑-­‑ ¡compare ¡to ¡primary ¡ ¡
  • Spanner ¡
  • Transac@on’s ¡commit ¡latency ¡is ¡determined ¡by ¡TrueTime’s ¡

uncertain ¡@me ¡and ¡Paxos ¡latency. ¡ ¡

  • Base ¡value ¡of ¡uncertainty ¡@me ¡is ¡sensi@ve ¡to ¡many ¡factors ¡and ¡

could ¡be ¡big ¡in ¡some ¡cases ¡

  • Rococo ¡
  • Using ¡dependency ¡to ¡track ¡and ¡maintain ¡real-­‑@me ¡order ¡among ¡

transac@ons ¡can ¡greatly ¡reduce ¡the ¡need ¡of ¡abor@ng ¡and ¡hence ¡ improve ¡performance ¡ ¡ ¡ ¡

¡ 8 ¡

slide-10
SLIDE 10

Take-­‑away ¡

  • Dependency ¡can ¡be ¡used ¡to ¡track ¡real-­‑@me ¡order ¡among ¡

transac@ons. ¡

  • Tradi@onal ¡concurrency ¡control ¡protocols ¡(2PL, ¡OCC) ¡are ¡not ¡

performant ¡with ¡conten@on ¡workloads. ¡

  • Be0er ¡performance ¡can ¡be ¡achieved ¡by ¡deferring ¡and ¡re-­‑
  • rdering ¡conflic@ng ¡pieces ¡instead ¡of ¡abor@ng ¡them ¡(Rococo) ¡

¡

9 ¡