PLP: Page Latch‐free  Shared‐everything OLTP Ippokratis Pandis† Pınar Tözün‡ Ryan Johnson Anastasia Ailamaki‡ †IBM Almaden Research Center ‡École Polytechnique Fédérale de Lausanne  University of Toronto

OLTP on Modern Hardware 256

Sun UltraSPARC

HW contexts/chip

IBM POWER 64

Intel Core/Nehalem Intel Itanium Intel Pentium

16

AMD Opteron

4

1 Oct‐93 Apr‐97 Oct‐00 Apr‐04 Oct‐07 Apr‐11

Year

2

OLTP on Modern Hardware HW contexts/chip

IBM POWER 64

Intel Core/Nehalem Intel Itanium Intel Pentium

16

1200

Sun UltraSPARC

AMD Opteron

4

1 Oct‐93 Apr‐97 Oct‐00 Apr‐04 Oct‐07 Apr‐11

Year

Throughput / # HW Contexts

256

TATP – GetSubData Sun Niagara T2  Linear Scalability

1000 800 600 400 200 0 1

2 4 8 16 32 64 # HW Contexts

3

OLTP on Modern Hardware HW contexts/chip

IBM POWER 64

Intel Core/Nehalem Intel Itanium Intel Pentium

16

1200

Sun UltraSPARC

AMD Opteron

4

1 Oct‐93 Apr‐97 Oct‐00 Apr‐04 Oct‐07 Apr‐11

Year

Throughput / # HW Contexts

256

TATP – GetSubData Sun Niagara T2  Linear Scalability

1000 800 600 400 200 0 1

2 4 8 16 32 64 # HW Contexts

4

OLTP on Modern Hardware HW contexts/chip

IBM POWER 64

Intel Core/Nehalem Intel Itanium Intel Pentium

16

1200

Sun UltraSPARC

AMD Opteron

4

1 Oct‐93 Apr‐97 Oct‐00 Apr‐04 Oct‐07 Apr‐11

Year

Throughput / # HW Contexts

256

TATP – GetSubData Sun Niagara T2  Linear Scalability

1000 800 600 400 200 0 1

2 4 8 16 32 64 # HW Contexts

More HW Contexts != Higher Throughput 5

Workers

Requests

Shared‐Everything natassa

ippokratis

ryan

pınar

Logical Physical

6

Workers

Requests

Shared‐Everything

natassa

ippokratis

ryan

pınar

Logical Physical

7

Workers

Requests

Shared‐Everything

natassa

ippokratis

ryan

pınar

Logical Physical

 Contention on shared data objects 8

natassa

ippokratis

ryan

pınar

Workers

Requests

Shared‐Nothing – Physically Partitioned

9

Shared‐Nothing – Physically Partitioned

Workers

Requests

Explicit contention control

natassa

ippokratis ryan

pınar

10

Shared‐Nothing – Physically Partitioned

Workers

Requests

Explicit contention control  Distributed transactions

natassa

ippokratis ryan

pınar

11

Shared‐Nothing – Physically Partitioned

Workers

Requests

Explicit contention control  Distributed transactions yannis  Load imbalances miguel

natassa

ippokratis ryan

pınar

thomas renata danica

12

Shared‐Nothing – Physically Partitioned

Workers

Requests

Explicit contention control  Distributed transactions yannis  Load imbalances miguel

natassa

ippokratis ryan

pınar

thomas renata danica

13

Shared‐Nothing – Physically Partitioned

Workers

Requests

Explicit contention control  Distributed transactions yannis  Load imbalances miguel  High repartitioning cost thomas renata natassa

ippokratis ryan

pınar

danica

14

Shared‐Nothing – Physically Partitioned

Workers

Requests

Explicit contention control  Distributed transactions yannis  Load imbalances miguel  High repartitioning cost thomas renata natassa

ippokratis ryan

pınar

danica

Great for some workloads, not all 15

Logically Partitioned

Workers

Requests

Range

Worker

A – H  natassa

ippokratis

ryan

pınar I – N   O – S  T – Z 

Logical Physical

16

Logically Partitioned Range A – H 

Requests Workers

Worker

I – N   natassa

ippokratis

pınar ryan

O – S  T – Z 

Logical Physical

17

Logically Partitioned Range A – H 

Requests Workers

Worker

I – N   natassa

ippokratis

pınar ryan

O – S  T – Z 

Logical Physical

18

Logically Partitioned Range A – H 

Requests Workers

Worker

I – N   natassa

ippokratis

pınar ryan

O – S  T – Z 

Logical Physical

 Contention at the physical layer 19

Physiological Partitioning • Extends logical partitioning at the physical layer Range

– Multi‐rooted Btree – Alternative heap page designs

Worker

A – H  I – N   O – S 

natassa

ippokratis

pınar ryan

T – Z 

Logical Physical

20

Physiological Partitioning • Extends logical partitioning at the physical layer Range

– Multi‐rooted Btree – Alternative heap page designs

Worker

A – H  I – N   O – S 

natassa

ippokratis

pınar ryan

T – Z 

Logical Physical

 Contention eliminated at both logical & physical layers  Fast repartitioning 21

Outline • • • • •

Introduction Types of Critical Sections Physiological Partitioning (PLP) Results Conclusion

22

Critical Sections Unscalable

Core

Core

Core

Core

Core

Locking, Latching

Core

Fixed

Core

Core

Core

Core

Core

Composable

Core

Core

Core

Core

Core

Core

Point‐to‐point  communication

Core

Logging

Unscalable  Fixed / Composable 23

Breakdown of the Critical Sections …and its impact on performance

60

Fixed Other unscalable Locking

40 30

\

20 10

PLP‐Leaf

PLP‐Regular

Logically Partitioned

0

Conventional

CSs per Transaction

50

Composable Latching

Probe one customer, update balance 4 socket Quad AMD

24

Breakdown of the Critical Sections …and its impact on performance

Probe one customer, update balance 4 socket Quad AMD

60

30

700 Logically Partitioned 600

40

\

20

Conventional

500 400 300 200

10

100 PLP‐Leaf

PLP‐Regular

Logically Partitioned

0

Conventional

CSs per Transaction

50

Composable Latching

Throughput (Ktps)

Fixed Other unscalable Locking

0 0

5 10 # HW Contexts

15

25

Breakdown of the Critical Sections …and its impact on performance

Probe one customer, update balance 4 socket Quad AMD

60

CSs per Transaction

50

Composable Latching

\

20

Conventional

500 400 300 200

31%

10

Logically Partitioned 600

40 30

700

Throughput (Ktps)

Fixed Other unscalable Locking

100 PLP‐Leaf

PLP‐Regular

Logically Partitioned

Conventional

0

0 0

5 10 # HW Contexts

15

Latching related CSs remain with logical‐partitioning 26

Outline • • • • •

Introduction Types of Critical Sections Physiological Partitioning (PLP) Results Conclusion

27

Physical Conflicts Range

Worker

A – M  N – Z 

Logical Physical

Index

Heap

28

Physical Conflicts Range

Worker

A – M  N – Z 

Logical Physical

Index

Heap

29

Physical Conflicts Range

Worker

A – M  N – Z 

Logical Physical

Index

Heap

30

Physical Conflicts Range

Worker

A – M  N – Z 

Logical Physical

Index

Heap

31

Physical Conflicts Range

Worker

A – M  N – Z 

Logical Physical

Index

Heap

32

Physical Conflicts Range

Worker

A – M  N – Z 

Logical Physical

Index

Heap

Conflicts on both index & heap pages 33

Physiological Partitioning (PLP) Range

Worker

• Multi‐rooted Btree

R1: A – M  R2: N – Z 

Index

R1

Logical R2

– Routing table is the root

Physical

Heap

34

Physiological Partitioning (PLP) Range

Worker

• Multi‐rooted Btree

R1: A – M  R2: N – Z 

Index

R1

Logical R2

Physical

– Routing table is the root

 Both logical & physical  partitioning  Reduces contention on  index root  Parallel structure  modification operations  Fast index repartitioning

Heap

35

Physiological Partitioning (PLP) Range

Worker

• Multi‐rooted Btree

R1: A – M  R2: N – Z 

Index

R1

Logical R2

Physical

– Routing table is the root

 Both logical & physical  partitioning  Reduces contention on  index root  Parallel structure  modification operations  Fast index repartitioning

Heap

36

Physiological Partitioning (PLP) Range

Worker

• Multi‐rooted Btree

R1: A – M  R2: N – Z 

Index

R1

Logical R2

Physical

– Routing table is the root

 Both logical & physical  partitioning  Reduces contention on  index root  Parallel structure  modification operations  Fast index repartitioning

HeapNo need to latch index pages   Still need to latch heap pages

37

Heap Pages : Alternatives PLP‐Partition R1

R2

38

Heap Pages : Alternatives PLP‐Partition R1

R2

 Two‐step record inserts  Repartitioning worst‐case:  Scan entire partition

39

Heap Pages : Alternatives PLP‐Partition R1

R2

 Two‐step record inserts  Repartitioning worst‐case:  Scan entire partition

40

Heap Pages : Alternatives PLP‐Partition R1

R2

 Two‐step record inserts  Repartitioning worst‐case:  Scan entire partition

41

Heap Pages : Alternatives PLP‐Partition R1

R2

 Two‐step record inserts  Repartitioning worst‐case:  Scan entire partition

PLP‐Leaf R1

R2

 Two‐step record inserts  Fragmentation  Repartitioning worst‐case:  Scan few pages 42

Heap Pages : Alternatives PLP‐Partition R1

R2

 Two‐step record inserts  Repartitioning worst‐case:  Scan entire partition

PLP‐Leaf R1

R2

 Two‐step record inserts  Fragmentation  Repartitioning worst‐case:  Scan few pages 43

Heap Pages : Alternatives PLP‐Partition R1

PLP‐Leaf

R2

R1

 Two‐step record inserts  Repartitioning worst‐case:  Scan entire partition

R2

 Two‐step record inserts  Fragmentation  Repartitioning worst‐case:  Scan few pages

 Latch free OLTP

44

Outline • • • • •

Introduction Types of Critical Sections Physiological Partitioning (PLP) Results Conclusion

45

Setup • All prototypes built on top of Shore‐MT – State‐of‐the‐art open‐source DBMS

• Machines used – Sun Niagara T2, 64 HW ctxs • In order, 1.4GHz, 64GB RAM

– 4 socket quad‐core AMD Opteron, 16 HW ctxs • OoO, 2.4GHz, 64GB RAM

• #Partitions = #HW contexts available

46

Breakdown of the Critical Sections Probe one customer, update balance

60

Composable

Other unscalable

Latching

Locking 40

30

20

10

PLP‐Leaf

PLP‐Regular

Logically Partitioned

0

Conventional

CSs per Transaction

50

Fixed

47

Breakdown of the Critical Sections Probe one customer, update balance

60

Composable

Other unscalable

Latching

Locking 40

30

20

10

PLP‐Leaf

PLP‐Regular

Logically Partitioned

0

Conventional

CSs per Transaction

50

Fixed

48

Breakdown of the Critical Sections Probe one customer, update balance

60

Composable

Other unscalable

Latching

Locking 40

30

20

10

PLP‐Leaf

PLP‐Regular

Logically Partitioned

0

Conventional

CSs per Transaction

50

Fixed

49

Breakdown of the Critical Sections Probe one customer, update balance

60

CSs per Transaction

50

Fixed

Composable

Other unscalable

Latching

Locking 40

30

20

10

PLP‐Leaf

PLP‐Regular

Logically Partitioned

Conventional

0

PLP eliminates majority of the unscalable CSs 50

Performance on Multicores Sun Niagara T2  64 HW ctxs, in order, 1.4GHz 400

700

PLP Logically Partitioned Conventional

300 250 200 150 100

500 400 300 200

50

100

0

0

0

16

32

# HW Contexts

48

64

4 socket Quad AMD 16 HW ctxs, OoO, 2.8GHz PLP Logically Partitioned Conventional

600

Throughput (Ktps)

350

Throughput (Ktps)

TATP – GetSubData

0

5

10

# HW Contexts

15

Benefits increase with faster hardware 51

16 32 48

PLP‐Leaf

PLP‐Regular

Logically Part.

Conventional

Heap Latch Contention

PLP‐Leaf

350

PLP‐Regular

Logically Part.

Conventional

PLP‐Leaf

PLP‐Regular

Logically Part.

Conventional

PLP‐Leaf

250

PLP‐Regular

300

Logically Part.

Conventional

Time breakdown (per xct)

Contention for heap pages Not‐tuned (unpadded) TPC‐B Sun Niagara T2 

Other

200

150

100

50

0

64

# HW Contexts

Avoids heap false sharing problems 52

Repartitioning Cost Scenario: Splitting a partition to two (466MB) 1 primary and 1 secondary index 8KB pages, 100B records, 32B keys, 3‐level B+tree

Heap Primary & Secondary Index Records Moved (Updates, Inserts, Deletes) Shared‐nothing PLP‐Partition PLP‐Leaf

53

Repartitioning Cost Scenario: Splitting a partition to two (466MB) 1 primary and 1 secondary index 8KB pages, 100B records, 32B keys, 3‐level B+tree

Heap Primary & Secondary Index Records Moved (Updates, Inserts, Deletes) Shared‐nothing

233MB

2.4 million inserts 2.4 million deletes

PLP‐Partition PLP‐Leaf

54

Repartitioning Cost Scenario: Splitting a partition to two (466MB) 1 primary and 1 secondary index 8KB pages, 100B records, 32B keys, 3‐level B+tree

Heap Primary & Secondary Index Records Moved (Updates, Inserts, Deletes) Shared‐nothing

233MB

2.4 million inserts 2.4 million deletes

PLP‐Partition

233MB

2.4 million updates

PLP‐Leaf

55

Repartitioning Cost Scenario: Splitting a partition to two (466MB) 1 primary and 1 secondary index 8KB pages, 100B records, 32B keys, 3‐level B+tree

Heap Primary & Secondary Index Records Moved (Updates, Inserts, Deletes) Shared‐nothing

233MB

2.4 million inserts 2.4 million deletes

PLP‐Partition

233MB

2.4 million updates

PLP‐Leaf

56

Repartitioning Cost Scenario: Splitting a partition to two (466MB) 1 primary and 1 secondary index 8KB pages, 100B records, 32B keys, 3‐level B+tree

Heap Primary & Secondary Index Records Moved (Updates, Inserts, Deletes) Shared‐nothing

233MB

2.4 million inserts 2.4 million deletes

PLP‐Partition

233MB

2.4 million updates

PLP‐Leaf

8.3KB

85 updates

57

Repartitioning Cost Scenario: Splitting a partition to two (466MB) 1 primary and 1 secondary index 8KB pages, 100B records, 32B keys, 3‐level B+tree

Heap Primary & Secondary Index Records Moved (Updates, Inserts, Deletes) Shared‐nothing

233MB

2.4 million inserts 2.4 million deletes

PLP‐Partition

233MB

2.4 million updates

PLP‐Leaf

8.3KB

85 updates

PLP‐Leaf: low repartitioning cost + latch‐free 58

Conclusion • Multicores expose the bottlenecks of DBMSs • Understanding the critical sections is crucial – Identify the harmful ones and eliminate them

• Physiological partitioning – – – –

Apply the right partitioning at both logical & physical layers Thread local locks & latch free data accesses Eliminate majority of unscalable critical sections Benefits of shared‐nothing with easy repartitioning

Thank you!

59

PLP: Page Latch-free Shared-everything OLTP - Ippokratis Pandis

PLP: Page Latch-free. Shared-everything OLTP. Ippokratis Pandis† Pınar Tözün‡ Ryan Johnson. ❖. Anastasia Ailamaki‡. †IBM Almaden Research Center.

794KB Sizes 5 Downloads 181 Views

Recommend Documents

PLP NEW MENU.pdf
Online Mega V.I.P.. Order Any Pizza, Calzone. or Stromboli and get. 25% Off. a 2nd Pizza, Calzone. or Stromboli. (Online Code: megavip). Kind, Fresh & Green.

03-PLP-Durango_3d16.pdf
17:25 H 60 M.L. MUJERES. 17:40 H 1.500 M.L. HOMBRES. 17:55 H 1.500 M.L. MUJERES. PROGRAMA C - SABADO 03/12/2016 - DURANGO. INSCRIPCIONES HASTA EL MARTES 29 DE NOVIEMBRE EN LA EXTRANET DE LA RFEA. Page 1 of 1. 03-PLP-Durango_3d16.pdf. 03-PLP-Durango_3

Reducing OLTP Instruction Misses with Thread Migration
Transactions Running Parallel. 6. T1. T2. T3. Instruction parts that can fit into L1-I. Threads. Transaction. T123. Common instructions among concurrent threads ...

App 6 - PLP - section leaders v2.0
OS Observation statement. Q Questionnaire/Quiz. WE Written ... knowledge. 8. Skills of. Leadership. Check your knowledge. 9. Working with. Adults. Check your.

10-PLP-Lanzamientos_Tolosa_15jn16.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. 10-PLP-Lanzamientos_Tolosa_15jn16.pdf. 10-PLP-Lanzamientos_Tolosa_15jn16.pdf. Open. Extract. Open with. Sign

App 6 - PLP - section leaders v2.0
Training Adviser:…………………………….. Local Training Manager:………….……………. A copy of the PLP should be sent to the Local Training Manager on a ...

App 6 - PLP - section leaders v2.0
Personal Learning Plan (PLP) – Line Manager. PLP v10.1. Essex Scouts. February 2015. Key to Validation Methods. 1:1 One to One discussion. C Certificate ...

The Role Of Data Mining, Olap,Oltp And Data Warehousing.
The designer must also deal with data warehouse administrative processes, which are complex in structure, large in number and hard to code; deadlines must ...

Improving OLTP scalability using speculative lock ...
Locks managed globally. • Fine-grained parallelism. – Each lock has its own .... Best solutions may be indirect. – Sidestep hard problems. – Look to distributed ...

2017-01-21 PLP LANZAMIENTOS E DURANGO TARDE.pdf
2017-01-21 P.L.P. LANZAMIENTOS E DURANGO TARDE.pdf. 2017-01-21 P.L.P. LANZAMIENTOS E DURANGO TARDE.pdf. Open. Extract. Open with. Sign In.

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 ...
Professional Growth (20%). 1. Education (10%). > Doctoral Degree – 10 pts. > Complete Academic requirement for Doctoral Degree – 7 pts. > Master's Degree ...

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 ...
content may not be copied or emailed to multiple sites or posted to a listserv without the copyright holder's express written permission. However, users may print,.

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 ...
8.33 - Alykhiyil risk - (3E)-n)3 systiss's co-sés iss-syss was live 3: 56 lu) is pi 19. (Jessio 1932) r x, Psy-sys - Sssy). -\ss-ny's to oreyss-sys) 3) Sys) -st; it S-P is 3) syst a yook fog \ is 33 sk y) { res's p R&g, ſtyles is is toys - systs S.

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 ...
Page 1. Page 2. Page 3. Page 4. Page 5. Page 6. Page 7. Page 8. Page 9. Page 10. Page 11. Page 12. Page 13. Page 14. Page 15. Page 16. Page 17. Page 18 ...

Page 1 Page 2 Page 3
Page 1. Page 2. Page 3.

Page 1 Page 2
Page 1. Page 2.

Page 1 / 2 Loading… Page 1 Page 2 of 2 ...
Sign in. Page. 1. /. 2. Loading… Page 1. Page 2 of 2. Eacb1567b148a94cb2dd5d612c7b769256279ca60_Q8633_R329927_D1856546.pdf. Eacb1567b148a94cb2dd5d612c7b769256279ca60_Q8633_R329927_D1856546.pdf. Open. Extract. Open with. Sign In. Main menu. Displayi

Page 1 Page 2 Page 3 Page 4 1999 2001 2002 20][03 ...
29states 9countries. " | 328 óéóns 29denominations. ~ UPR |NG 3946+ pastOrS& Church leaders. Page 10. 2013. Bi ~~~~. |he Red [DOS On the ** sets = ..." #", ...

Page 1 www.keralapscblog.com Page 2 www.keralapscblog.com ...
www.keralapscblog.com. Page 2. www.keralapscblog.com. Page 3. www.keralapscblog.com. Page 4. www.keralapscblog.com. Page 5. www.keralapscblog.

Page 1 Page 2 toy b. 3 ...
3 Dec 2017 - unn Oynn) vy invpin ninthin in Tin inhpny nnnn nnn 9 N unin) to hon 27 innbyon nyann Obra heur vT pn2 Nhnynn inyo; Thx)n) pop nibyo in) in nyannt nibyovy Taba hit N p Ty hpx 28 minst Typ hon innot hapurphh nyon hanTri NDN (oynn)n vy nonp

Page 1 ...
image size. : color overley. : JPS. : PSD. : CDR. : BMP. Select all . : : : : : swatch. : color picker. : navigator. : trans form. : : : : : : : : : duplicate. : delete. : new layer.