@andy_pavlo Part #1 Background Part # 2 Engineering Part # 3 - - PowerPoint PPT Presentation

andy pavlo
SMART_READER_LITE
LIVE PREVIEW

@andy_pavlo Part #1 Background Part # 2 Engineering Part # 3 - - PowerPoint PPT Presentation

@andy_pavlo Part #1 Background Part # 2 Engineering Part # 3 Oracle Rant 3 AUTONOMOUS DBMSs SELF-ADAPTIVE DATABASES SELECT * FROM A JOIN B ON A.ID = B.ID WHERE A.VAL > 123 AND B.NAME LIKE 'XY%' Admin 1970-1990s Self-Adaptive


slide-1
SLIDE 1

@andy_pavlo

slide-2
SLIDE 2

Part #1 Part # 2 Part # 3 Background Engineering Oracle Rant

slide-3
SLIDE 3 AUTONOMOUS DBMSs

3

SELF-ADAPTIVE DATABASES

1970-1990s Self-Adaptive Databases

SELECT * FROM A JOIN B ON A.ID = B.ID WHERE A.VAL > 123 AND B.NAME LIKE 'XY%' Admin
slide-4
SLIDE 4 AUTONOMOUS DBMSs

3

SELF-ADAPTIVE DATABASES

1970-1990s Self-Adaptive Databases

SELECT * FROM A JOIN B ON A.ID = B.ID WHERE A.VAL > 123 AND B.NAME LIKE 'XY%' A.ID A.VAL B.ID B.NAME Tuning Algorithm Admin
slide-5
SLIDE 5 AUTONOMOUS DBMSs

3

SELF-ADAPTIVE DATABASES

1970-1990s Self-Adaptive Databases

SELECT * FROM A JOIN B ON A.ID = B.ID WHERE A.VAL > 123 AND B.NAME LIKE 'XY%' A.ID A.VAL B.ID B.NAME

+100 +200 +50

Tuning Algorithm Admin
slide-6
SLIDE 6 AUTONOMOUS DBMSs

3

SELF-ADAPTIVE DATABASES

1970-1990s Self-Adaptive Databases

SELECT * FROM A JOIN B ON A.ID = B.ID WHERE A.VAL > 123 AND B.NAME LIKE 'XY%' A.ID A.VAL B.ID B.NAME

+100 +200 +50

Tuning Algorithm Admin
slide-7
SLIDE 7 AUTONOMOUS DBMSs

3

SELF-ADAPTIVE DATABASES

1970-1990s Self-Adaptive Databases

SELECT * FROM A JOIN B ON A.ID = B.ID WHERE A.VAL > 123 AND B.NAME LIKE 'XY%' A.ID A.VAL B.ID B.NAME

+100 +200 +50

Tuning Algorithm Admin
slide-8
SLIDE 8 AUTONOMOUS DBMSs

3

SELF-ADAPTIVE DATABASES

1970-1990s Self-Adaptive Databases

SELECT * FROM A JOIN B ON A.ID = B.ID WHERE A.VAL > 123 AND B.NAME LIKE 'XY%' A.ID A.VAL B.ID B.NAME Tuning Algorithm Admin

→Index Selection →Partitioning / Sharding →Data Placement

slide-9
SLIDE 9 AUTONOMOUS DBMSs

4

SELF-TUNING DATABASES

1990-2000s Self-Tuning Databases

SELECT * FROM A JOIN B ON A.ID = B.ID WHERE A.VAL > 123 AND B.NAME LIKE 'XY%' Tuning Algorithm Admin

→Index Selection →Partitioning / Sharding →Data Placement

A.ID A.VAL B.ID B.NAME
slide-10
SLIDE 10 AUTONOMOUS DBMSs

4

SELF-TUNING DATABASES

1990-2000s Self-Tuning Databases

SELECT * FROM A JOIN B ON A.ID = B.ID WHERE A.VAL > 123 AND B.NAME LIKE 'XY%' Tuning Algorithm Admin

AutoAdmin

A.ID A.VAL B.ID B.NAME Optimizer Cost Model
slide-11
SLIDE 11

541 291

200 400 600 2000 2004 2008 2012 2016 Number of Knobs

AUTONOMOUS DBMSs

4

SELF-TUNING DATABASES

1990-2000s Self-Tuning Databases

→Knob Configuration

slide-12
SLIDE 12 AUTONOMOUS DBMSs

5

CLOUD MANAGED DATABASES

2010s Cloud Databases

slide-13
SLIDE 13 AUTONOMOUS DBMSs

5

CLOUD MANAGED DATABASES

2010s Cloud Databases

→Initial Placement →Tenant Migration

slide-14
SLIDE 14

W hy is this previous work insufficient?

slide-15
SLIDE 15 AUTONOMOUS DBMSs

7

A BRIEF HISTORY

Problem #1 Human Judgements Problem #2 Reactionary Measures

slide-16
SLIDE 16

W hat is different this time?

slide-17
SLIDE 17 AUTONOMOUS DATABASES

Better hardware. Better machine learning tools. Better appreciation for data. We seek to complete the circle in autonomous databases.

WHY NOW?
slide-18
SLIDE 18 CARNEGIE MELLON UNIVERSITY

10

RESEARCH PROJECTS

OtterTune Existing Systems Peloton New System

slide-19
SLIDE 19

OtterTune

Database Tuning-as-a-Service → Automatically generate DBMS knob configurations. → Reuse data from previous tuning sessions.

  • ttertune.cs.cmu.edu

Supported Systems

slide-20
SLIDE 20 OTTERTUNE

12

AUTOMATIC DBMS TUNING SERVICE

TARGET DATABASE

CONTROLLER

COLLECTOR INSTALL AGENT
slide-21
SLIDE 21 OTTERTUNE

12

AUTOMATIC DBMS TUNING SERVICE

TARGET DATABASE

TUNING MANAGER CONTROLLER

COLLECTOR INSTALL AGENT Configur igurat ation
  • n
Recommend nder Knob Analyzer Metric Analyzer Interna ernal Reposit sitory ry
slide-22
SLIDE 22 OTTERTUNE

12

AUTOMATIC DBMS TUNING SERVICE

TARGET DATABASE

TUNING MANAGER CONTROLLER

COLLECTOR INSTALL AGENT Configur igurat ation
  • n
Recommend nder Knob Analyzer Metric Analyzer Interna ernal Reposit sitory ry
slide-23
SLIDE 23 OTTERTUNE

12

AUTOMATIC DBMS TUNING SERVICE

TARGET DATABASE

TUNING MANAGER CONTROLLER

COLLECTOR INSTALL AGENT Configur igurat ation
  • n
Recommend nder Knob Analyzer Metric Analyzer Interna ernal Reposit sitory ry
slide-24
SLIDE 24 OTTERTUNE

12

AUTOMATIC DBMS TUNING SERVICE

TARGET DATABASE

TUNING MANAGER CONTROLLER

COLLECTOR INSTALL AGENT Configur igurat ation
  • n
Recommend nder Knob Analyzer Metric Analyzer Interna ernal Reposit sitory ry
slide-25
SLIDE 25 OTTERTUNE

12

AUTOMATIC DBMS TUNING SERVICE

TARGET DATABASE

TUNING MANAGER CONTROLLER

COLLECTOR INSTALL AGENT Configur igurat ation
  • n
Recommend nder Knob Analyzer Metric Analyzer Interna ernal Reposit sitory ry
slide-26
SLIDE 26 OTTERTUNE

12

AUTOMATIC DBMS TUNING SERVICE

TARGET DATABASE

TUNING MANAGER CONTROLLER

COLLECTOR INSTALL AGENT Configur igurat ation
  • n
Recommend nder Knob Analyzer Metric Analyzer Interna ernal Reposit sitory ry
slide-27
SLIDE 27 OTTERTUNE

12

AUTOMATIC DBMS TUNING SERVICE

TARGET DATABASE

TUNING MANAGER CONTROLLER

COLLECTOR INSTALL AGENT Configur igurat ation
  • n
Recommend nder Knob Analyzer Metric Analyzer Interna ernal Reposit sitory ry
slide-28
SLIDE 28 OTTERTUNE

12

AUTOMATIC DBMS TUNING SERVICE

TARGET DATABASE

TUNING MANAGER CONTROLLER

COLLECTOR INSTALL AGENT Configur igurat ation
  • n
Recommend nder Knob Analyzer Metric Analyzer Interna ernal Reposit sitory ry
slide-29
SLIDE 29 OTTERTUNE

12

AUTOMATIC DBMS TUNING SERVICE

TARGET DATABASE

TUNING MANAGER CONTROLLER

COLLECTOR INSTALL AGENT Configur igurat ation
  • n
Recommend nder Knob Analyzer Metric Analyzer Interna ernal Reposit sitory ry
slide-30
SLIDE 30 OTTERTUNE TPC-C TUNING AUTOMATIC DATABASE MANAGEMENT SYSTEM TUNING THROUGH LARGE-SCALE MACHINE LEARNING SIGMOD 2017 165 508 562 736 686

250 500 750 1000

426 845 714 843 946

250 500 750 1000

Throughput (txn/sec)

Default RDS DBA Scripts OtterTune

13

slide-31
SLIDE 31

Peloton

Self-Driving Database System → In-memory DBMS with integrated ML/RL framework. → Designed for autonomous

  • perations.

pelotondb.io

slide-32
SLIDE 32 PELOTON

15

THE SELF-DRIVING DBMS

TARGET DATABASE WORKLOAD HISTORY

slide-33
SLIDE 33 PELOTON

15

THE SELF-DRIVING DBMS

FORECAST MODELS TARGET DATABASE WORKLOAD HISTORY

slide-34
SLIDE 34

"THE BRAIN"

PELOTON

15

THE SELF-DRIVING DBMS

FORECAST MODELS

Search Tree ACTION CATALOG

TARGET DATABASE WORKLOAD HISTORY

slide-35
SLIDE 35

"THE BRAIN"

PELOTON

15

THE SELF-DRIVING DBMS

FORECAST MODELS

Search Tree ACTION CATALOG ACTION SEQUENCE

TARGET DATABASE WORKLOAD HISTORY

slide-36
SLIDE 36

"THE BRAIN"

PELOTON

15

THE SELF-DRIVING DBMS

FORECAST MODELS

Search Tree ACTION CATALOG ACTION SEQUENCE

TARGET DATABASE WORKLOAD HISTORY

slide-37
SLIDE 37

"THE BRAIN"

PELOTON

15

THE SELF-DRIVING DBMS

FORECAST MODELS

Search Tree ACTION CATALOG ACTION SEQUENCE

TARGET DATABASE WORKLOAD HISTORY

? ? ?

slide-38
SLIDE 38 PELOTON BUS TRACKING APP WITH ONE-HOUR HORIZON QUERY-BASED WORKLOAD FORECASTING FOR SELF-DRIVING DATABASE MANAGEMENT SYSTEM SIGMOD 2018 15000 30000 45000 60000 9-Jan 11-Jan 13-Jan 15-Jan 17-Jan

Ensemble (LR+RNN)

16

Actual Predicted Queries Per Hour

slide-39
SLIDE 39 PELOTON ADMISSIONS APP WITH THREE-DAY HORIZON

5 10 15 26-Nov 30-Nov 4-Dec 8-Dec 12-Dec 16-Dec

Millions

Actual Predicted Ensemble (LR+RNN)

17

Queries Per Hour

slide-40
SLIDE 40 PELOTON ADMISSIONS APP WITH THREE-DAY HORIZON

5 10 15 26-Nov 30-Nov 4-Dec 8-Dec 12-Dec 16-Dec

Millions

Actual Predicted

5 10 15 26-Nov 30-Nov 4-Dec 8-Dec 12-Dec 16-Dec

Millions

Ensemble (LR+RNN) Hybrid (LR+RNN+KR)

17

Queries Per Hour

slide-41
SLIDE 41

Design Considerations for Autonomous Operation

slide-42
SLIDE 42 AUTONMOUS DBMS

19

DESIGN CONSIDERATIONS

Configuration Knobs Internal Metrics Action Engineering

slide-43
SLIDE 43

Anything that requires a human value judgement should be marked as off-limits to autonomous components.

– File Paths – Network Addresses – Durability / Isolation Levels 20

UNTUNABLE KNOBS CONFIGURATION KNOBS
slide-44
SLIDE 44 CONFIGURATION KNOBS

The autonomous components need hints about how to change a knob

– Min/Max Ranges. – Non-Uniform Deltas. – Separate knobs to enable/disable a feature. 21

HOW TO CHANGE
slide-45
SLIDE 45 CONFIGURATION KNOBS

The autonomous components need hints about how to change a knob

– Min/Max Ranges. – Non-Uniform Deltas. – Separate knobs to enable/disable a feature. 21

HOW TO CHANGE
slide-46
SLIDE 46 CONFIGURATION KNOBS

Indicate which knobs are constrained by hardware resources.

– The sum of all buffers cannot exceed the total amount of available memory.

The problem is that sometimes it makes sense to overprovision.

22

HARDWARE RESOURCES
slide-47
SLIDE 47 INTERNAL METRICS

Expose DBMS's hardware capabilities through a SQL interface.

– CPU, Memory, Disk, Network 23

HARDWARE INFORMATION Configu figura rati tion
  • n
Reco commender nder
slide-48
SLIDE 48 INTERNAL METRICS

If the DBMS has sub-components that are tunable, then it must expose separate metrics for those components.

24

SUB-COMPONENTS
slide-49
SLIDE 49 INTERNAL METRICS

If the DBMS has sub-components that are tunable, then it must expose separate metrics for those components.

24

SUB-COMPONENTS
slide-50
SLIDE 50 INTERNAL METRICS

If the DBMS has sub-components that are tunable, then it must expose separate metrics for those components.

24

SUB-COMPONENTS
slide-51
SLIDE 51 INTERNAL METRICS

If the DBMS has sub-components that are tunable, then it must expose separate metrics for those components.

24

SUB-COMPONENTS
slide-52
SLIDE 52 ACTION ENGINEERING

No action should ever require the DBMS to restart in order for it to take affect. The commercial systems are much better than this than the open-source systems.

25

NO SHUTDOWN
slide-53
SLIDE 53 ACTION ENGINEERING

Provide a notification callback to indicate when an action starts and when it completes. Harder for changes that can be used before the action completes.

26

NOTIFICATIONS
slide-54
SLIDE 54 ACTION ENGINEERING

Support executing the same action with different resource usage levels.

27

RESOURCE USAGE
slide-55
SLIDE 55 ACTION ENGINEERING

Support executing the same action with different resource usage levels.

27

RESOURCE USAGE
slide-56
SLIDE 56 ACTION ENGINEERING

Support executing the same action with different resource usage levels.

27

RESOURCE USAGE
slide-57
SLIDE 57 ACTION ENGINEERING

Rejected actions should not cause DBMS to halt or unexpected application behavior.

28

REJECTION HANDLING

Worker Threads Network Threads Background Threads

slide-58
SLIDE 58 ACTION ENGINEERING

Rejected actions should not cause DBMS to halt or unexpected application behavior.

28

REJECTION HANDLING

Worker Threads Network Threads Background Threads

+2

slide-59
SLIDE 59 ACTION ENGINEERING

Rejected actions should not cause DBMS to halt or unexpected application behavior.

28

REJECTION HANDLING

Worker Threads Network Threads Background Threads

+2

  • 1
slide-60
SLIDE 60 ACTION ENGINEERING

Rejected actions should not cause DBMS to halt or unexpected application behavior.

28

REJECTION HANDLING

Worker Threads Network Threads Background Threads

+2

  • 1
  • 1
slide-61
SLIDE 61 ACTION ENGINEERING

Rejected actions should not cause DBMS to halt or unexpected application behavior.

28

REJECTION HANDLING

Worker Threads Network Threads Background Threads

+2

  • 1
  • 1
slide-62
SLIDE 62 ACTION ENGINEERING

Allow replica configurations to diverge from each other.

29

REPLICA EXPLORATION
slide-63
SLIDE 63 ACTION ENGINEERING

Allow replica configurations to diverge from each other.

29

REPLICA EXPLORATION

Master Replicas

slide-64
SLIDE 64 ACTION ENGINEERING

Allow replica configurations to diverge from each other.

29

REPLICA EXPLORATION

Master Replicas

slide-65
SLIDE 65 ACTION ENGINEERING

Allow replica configurations to diverge from each other.

29

REPLICA EXPLORATION

Master Replicas

slide-66
SLIDE 66

W hat About Oracle's Self-Driving DBMS?

slide-67
SLIDE 67 ORACLE SELF-DRIVING DBMS

31 September 2017 January 2017

slide-68
SLIDE 68 ORACLE

Automatic Indexing Automatic Recovery Automatic Scaling Automatic Query Tuning

SELF-DRIVING DBMS

31 September 2017

slide-69
SLIDE 69 ORACLE

Automatic Indexing Automatic Recovery Automatic Scaling Automatic Query Tuning

SELF-DRIVING DBMS

31

Problem #2 Reactionary Measures

September 2017

slide-70
SLIDE 70 ORACLE

Automatic Indexing Automatic Recovery Automatic Scaling Automatic Query Tuning

SELF-DRIVING DBMS

31

Problem #2 Reactionary Measures

September 2017

slide-71
SLIDE 71 CONCLUSION

True autonomous DBMSs are achievable in the next decade. You should think about how each new feature can be controlled by a machine.

MAIN TAKEAWAYS

32

slide-72
SLIDE 72

END

@andy_pavlo