@andy_pavlo
@andy_pavlo Part #1 Background Part # 2 Engineering Part # 3 - - PowerPoint PPT Presentation
@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
Part #1 Part # 2 Part # 3 Background Engineering Oracle Rant
3
SELF-ADAPTIVE DATABASES1970-1990s Self-Adaptive Databases
SELECT * FROM A JOIN B ON A.ID = B.ID WHERE A.VAL > 123 AND B.NAME LIKE 'XY%' Admin3
SELF-ADAPTIVE DATABASES1970-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 Admin3
SELF-ADAPTIVE DATABASES1970-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 Admin3
SELF-ADAPTIVE DATABASES1970-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 Admin3
SELF-ADAPTIVE DATABASES1970-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 Admin3
SELF-ADAPTIVE DATABASES1970-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
4
SELF-TUNING DATABASES1990-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.NAME4
SELF-TUNING DATABASES1990-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 AdminAutoAdmin
A.ID A.VAL B.ID B.NAME Optimizer Cost Model541 291
200 400 600 2000 2004 2008 2012 2016 Number of Knobs
AUTONOMOUS DBMSs4
SELF-TUNING DATABASES1990-2000s Self-Tuning Databases
→Knob Configuration
5
CLOUD MANAGED DATABASES2010s Cloud Databases
5
CLOUD MANAGED DATABASES2010s Cloud Databases
→Initial Placement →Tenant Migration
W hy is this previous work insufficient?
7
A BRIEF HISTORYProblem #1 Human Judgements Problem #2 Reactionary Measures
W hat is different this time?
Better hardware. Better machine learning tools. Better appreciation for data. We seek to complete the circle in autonomous databases.
WHY NOW?10
RESEARCH PROJECTSOtterTune Existing Systems Peloton New System
OtterTune
Database Tuning-as-a-Service → Automatically generate DBMS knob configurations. → Reuse data from previous tuning sessions.
- ttertune.cs.cmu.edu
Supported Systems
12
AUTOMATIC DBMS TUNING SERVICETARGET DATABASE
CONTROLLER
COLLECTOR INSTALL AGENT12
AUTOMATIC DBMS TUNING SERVICETARGET DATABASE
TUNING MANAGER CONTROLLER
COLLECTOR INSTALL AGENT Configur igurat ation- n
12
AUTOMATIC DBMS TUNING SERVICETARGET DATABASE
TUNING MANAGER CONTROLLER
COLLECTOR INSTALL AGENT Configur igurat ation- n
12
AUTOMATIC DBMS TUNING SERVICETARGET DATABASE
TUNING MANAGER CONTROLLER
COLLECTOR INSTALL AGENT Configur igurat ation- n
12
AUTOMATIC DBMS TUNING SERVICETARGET DATABASE
TUNING MANAGER CONTROLLER
COLLECTOR INSTALL AGENT Configur igurat ation- n
12
AUTOMATIC DBMS TUNING SERVICETARGET DATABASE
TUNING MANAGER CONTROLLER
COLLECTOR INSTALL AGENT Configur igurat ation- n
12
AUTOMATIC DBMS TUNING SERVICETARGET DATABASE
TUNING MANAGER CONTROLLER
COLLECTOR INSTALL AGENT Configur igurat ation- n
12
AUTOMATIC DBMS TUNING SERVICETARGET DATABASE
TUNING MANAGER CONTROLLER
COLLECTOR INSTALL AGENT Configur igurat ation- n
12
AUTOMATIC DBMS TUNING SERVICETARGET DATABASE
TUNING MANAGER CONTROLLER
COLLECTOR INSTALL AGENT Configur igurat ation- n
12
AUTOMATIC DBMS TUNING SERVICETARGET DATABASE
TUNING MANAGER CONTROLLER
COLLECTOR INSTALL AGENT Configur igurat ation- n
250 500 750 1000
426 845 714 843 946250 500 750 1000
Throughput (txn/sec)Default RDS DBA Scripts OtterTune
13
Peloton
Self-Driving Database System → In-memory DBMS with integrated ML/RL framework. → Designed for autonomous
- perations.
pelotondb.io
15
THE SELF-DRIVING DBMSTARGET DATABASE WORKLOAD HISTORY
15
THE SELF-DRIVING DBMSFORECAST MODELS TARGET DATABASE WORKLOAD HISTORY
"THE BRAIN"
PELOTON15
THE SELF-DRIVING DBMSFORECAST MODELS
Search Tree ACTION CATALOGTARGET DATABASE WORKLOAD HISTORY
"THE BRAIN"
PELOTON15
THE SELF-DRIVING DBMSFORECAST MODELS
Search Tree ACTION CATALOG ACTION SEQUENCETARGET DATABASE WORKLOAD HISTORY
"THE BRAIN"
PELOTON15
THE SELF-DRIVING DBMSFORECAST MODELS
Search Tree ACTION CATALOG ACTION SEQUENCETARGET DATABASE WORKLOAD HISTORY
"THE BRAIN"
PELOTON15
THE SELF-DRIVING DBMSFORECAST MODELS
Search Tree ACTION CATALOG ACTION SEQUENCETARGET DATABASE WORKLOAD HISTORY
? ? ?
Ensemble (LR+RNN)
16
Actual Predicted Queries Per Hour
5 10 15 26-Nov 30-Nov 4-Dec 8-Dec 12-Dec 16-Dec
MillionsActual Predicted Ensemble (LR+RNN)
17
Queries Per Hour
5 10 15 26-Nov 30-Nov 4-Dec 8-Dec 12-Dec 16-Dec
MillionsActual Predicted
5 10 15 26-Nov 30-Nov 4-Dec 8-Dec 12-Dec 16-Dec
MillionsEnsemble (LR+RNN) Hybrid (LR+RNN+KR)
17
Queries Per Hour
Design Considerations for Autonomous Operation
19
DESIGN CONSIDERATIONSConfiguration Knobs Internal Metrics Action Engineering
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 KNOBSThe 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 CHANGEThe 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 CHANGEIndicate 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 RESOURCESExpose DBMS's hardware capabilities through a SQL interface.
– CPU, Memory, Disk, Network 23
HARDWARE INFORMATION Configu figura rati tion- n
If the DBMS has sub-components that are tunable, then it must expose separate metrics for those components.
24
SUB-COMPONENTSIf the DBMS has sub-components that are tunable, then it must expose separate metrics for those components.
24
SUB-COMPONENTSIf the DBMS has sub-components that are tunable, then it must expose separate metrics for those components.
24
SUB-COMPONENTSIf the DBMS has sub-components that are tunable, then it must expose separate metrics for those components.
24
SUB-COMPONENTSNo 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 SHUTDOWNProvide 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
NOTIFICATIONSSupport executing the same action with different resource usage levels.
27
RESOURCE USAGESupport executing the same action with different resource usage levels.
27
RESOURCE USAGESupport executing the same action with different resource usage levels.
27
RESOURCE USAGERejected actions should not cause DBMS to halt or unexpected application behavior.
28
REJECTION HANDLINGWorker Threads Network Threads Background Threads
Rejected actions should not cause DBMS to halt or unexpected application behavior.
28
REJECTION HANDLINGWorker Threads Network Threads Background Threads
+2
Rejected actions should not cause DBMS to halt or unexpected application behavior.
28
REJECTION HANDLINGWorker Threads Network Threads Background Threads
+2
- 1
Rejected actions should not cause DBMS to halt or unexpected application behavior.
28
REJECTION HANDLINGWorker Threads Network Threads Background Threads
+2
- 1
- 1
Rejected actions should not cause DBMS to halt or unexpected application behavior.
28
REJECTION HANDLINGWorker Threads Network Threads Background Threads
+2
- 1
- 1
Allow replica configurations to diverge from each other.
29
REPLICA EXPLORATIONAllow replica configurations to diverge from each other.
29
REPLICA EXPLORATIONMaster Replicas
Allow replica configurations to diverge from each other.
29
REPLICA EXPLORATIONMaster Replicas
Allow replica configurations to diverge from each other.
29
REPLICA EXPLORATIONMaster Replicas
W hat About Oracle's Self-Driving DBMS?
31 September 2017 January 2017
Automatic Indexing Automatic Recovery Automatic Scaling Automatic Query Tuning
SELF-DRIVING DBMS31 September 2017
Automatic Indexing Automatic Recovery Automatic Scaling Automatic Query Tuning
SELF-DRIVING DBMS31
Problem #2 Reactionary MeasuresSeptember 2017
Automatic Indexing Automatic Recovery Automatic Scaling Automatic Query Tuning
SELF-DRIVING DBMS31
Problem #2 Reactionary MeasuresSeptember 2017
True autonomous DBMSs are achievable in the next decade. You should think about how each new feature can be controlled by a machine.
MAIN TAKEAWAYS32
END
@andy_pavlo