1 self-tuning db technology & info services: from wishful thinking to viable engineering gerhard...

25
1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum [email protected] Acknowledgements to collaborators: Surajit Chaudhuri, Christoff Hasse, Arnd Christian König, Achim Kraiss, Axel Mönkeberg, Peter Muth, Guido Nerjes, Elizabeth O‘Neil, Teamwork is essential. It allows you to blame someone else.

Upload: amira-winford

Post on 30-Mar-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

1

Self-tuning DB Technology & Info Services:from Wishful Thinking to Viable Engineering

Gerhard [email protected]

Acknowledgements to collaborators:Surajit Chaudhuri, Christoff Hasse, Arnd Christian König, Achim

Kraiss, Axel Mönkeberg, Peter Muth, Guido Nerjes, Elizabeth O‘Neil,

Patrick O‘Neil, Peter Scheuermann, Markus Sinnwell, Peter Zabback

Teamwork is essential.It allows you to blame someone else.

Page 2: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

2

OutlineAuto-Tuning: What and Why?

Where Do We Go From Here?- Dreams and Directions -

The Feedback-Control Approach

Example 1: Load Control

Where Do We Stand Today? - Myths and Facts -

The COMFORT Experience

Example 2: Workflow System Configuration

Page 3: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

3

Auto-Tuning: What and Why?DBA manual (10 years ago):

• tuning experts are expensive• system cost dominated and growth limited by human care & feed automate sys admin and tuning!

Härder 1981: mission impossible

Page 4: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

4

Intriguing and Treacherous ApproachesInstant tuning: rules of thumb

KIWI principle: kill it with iron

DBA joystick method: feedback control loop

Columbus / Sisyphus approach: trial and error

+ ok for page size, striping unit, min cache size– insufficient for max cache size, MPL limit, etc.

+ ok if applied with care– waste of money otherwise

+ ok with simulation tools– risky with production system

An engineer is someone who can do for a dimewhat any fool can do for a dollar.

+ ok when it converges under stationary workload– susceptible to instability

Page 5: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

5

OutlineAuto-tuning: What and Why?

Where Do We Go From Here?- Dreams and Directions -

The Feedback-Control Approach

Example 1: Load Control

Where Do We Stand Today? - Myths and Facts -

The COMFORT Experience

Example 2: Workflow System Configuration

Page 6: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

6

Feedback Control Loop for Automatic Tuning

• Observe

• Predict

• React

Need aquantitativemodel !

Page 7: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

7

Performance Predictability is Key”Our ability to analyze and predict the performance of the enormously complex software systems ...are painfully inadequate”

(Report of the US President’s Technology Advisory Committee 1998)

ability to predict workload knobs performance !!! !!! ???

is prerequisite for finding the right knob settings workload knobs performance goal !!! ??? !!!

Page 8: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

8

Level, Scope, and Time Horizonof Tuning Issues

(workflow) system configuration

time

scopelevel

index selection

query opt.& db stats mgt.

caching

load control data placement

Page 9: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

9

Level, Scope, and Time Horizonof Tuning Issues

(workflow) system configuration

time

scopelevel

index selection

query opt.& db stats mgt.

caching

load control data placement

Page 10: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

uncontrolled memory or lock contentioncan lead to performance catastrophe

Load Control for Locking (MPL Tuning)

Page 11: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

Locking for Concurrent Transactions

Page 12: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

Locking and Lock Contention

t

lock conflict

lockwait

lockthrashing

Page 13: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

How Difficult Can This Be?

typical Sisyphus problem

arrivingtransactions

DBS

activetrans,

trans.queue

10 20 30 40 50

0.2

0.4

0.6

0.8

1.0

MPL

response time [s]

Page 14: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

Adaptive Load Control

transaction admission

transaction cancellation

transaction execution

abortedtrans.

committed trans.

arriving trans.

conflict ratio

conflict ratio =

.transrunningbyheldlocks#

.transallbyheldlocks#

criticalconflict ratio 1.3

restartedtrans.

backed upby math (Tay,Thomasian)

Page 15: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

15

WFMS Architecture for E-Services

Ms3.lnk

...

WF server type 1

App server type 1

Clients

Comm server

WF server type 2

App server type n

...

Page 16: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

16

Workflow System Configuration ToolWorkflowRepository Operational Workflow System Config.

Admin

Modeling Calibration

Evaluation

Recommendation

MonitoringMapping

Hypotheticalconfig

Max. ThroughputAvg. waiting timeExpected downtime

Page 17: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

17

Workflow System Configuration ToolWorkflowRepository Operational Workflow System Config.

Admin

Modeling Calibration

Evaluation

Recommendation

MonitoringMapping

Min-costre-config.

Goals:min(throughput)max(waiting time)max(downtime)+ constraints

Long-term feedback control• aims at global, user- perceived metrics and• uses more advanced math for prediction

Page 18: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

18

OutlineThe Problem – 10 Years Ago and Now

Where Do We Go From Here?- Dreams and Directions -

The Feedback-Control Approach

Example 1: Load Control

Where Do We Stand Today? - Myths and Facts -

The COMFORT Experience

Example 2: Workflow System Configuration

Page 19: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

19

Where Do We Stand Today? - Good News

Advances in Engineering:• Eliminate second-order knobs• Robust rules of thumb for some knobs• KIWI method where applicable

Scientific Progress:+ Feedback control approach+ Storage systems have become self-managing+ Index selection wizards hard to beat+ Materialized view wizards + Synopses selection and space allocation for DB statistics well understood

Page 20: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

Index Selection: Live or Let DieOrdersOrdersONo ODate ...

PartsPNo PName ...

LineItemsONo LNo Qty Price ODate ShipDate ...

CustomersCNo CName City State Discount ...

Data Workload

Select ... From ... Where City = ... And State = ...

Select ... From ... Where ShipDate – ODate > ...

Select ... From ... Where L.Ono = O.ONo And Price < ...

Update ... Set ShipDate = ...

Insert LineItems ...

100 x / min

20 x / min

15 x / min

300 x / min

300 x / min

NP-hard combinatorial problemwith complex cost formulas

Create Index ...ONo

ONo Price

ShipDate

CityState

Page 21: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

21

Where Do We Stand Today? - Good News

Advances in Engineering:• Eliminate second-order knobs• Robust rules of thumb for some knobs• KIWI method where applicable

Scientific Progress:+ Feedback control approach+ Storage systems have become self-managing+ Index selection wizards hard to beat+ Materialized view wizards + Synopses selection and space allocation for DB statistics well understood

Page 22: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

22

Where Do We Stand Today? - Bad News

, wrong Complex problems have simple, easy-to-understand answers

– Automatic system tuning based on few principles:

– Interactions across components and interference among different workload classes can make entire system unpredictable

Page 23: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

23

OutlineThe Problem – 10 Years Ago and Now

Where Do We Go From Here?- Dreams and Directions -

The Feedback-Control Approach

Example 1: Load Control

Where Do We Stand Today? - Myths and Facts -

The COMFORT Experience

Example 2: Workflow System Configuration

Page 24: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

24

Autonomic Computing: Path to Nirvana ?

My interpretation: need component design for predictability: self-inspection, self-analysis, self-tuning

Vision: all computer systems must be self-managed, self-organizing, and self-healing

Motivation:• ambient intelligence (sensors in every room, your body etc.)• reducing complexity and improving manageability of very large systems

aka. observation, prediction, reaction

Role model: biological, self-regulating systems (really ???)

Page 25: 1 Self-tuning DB Technology & Info Services: from Wishful Thinking to Viable Engineering Gerhard Weikum weikum@cs.uni-sb.de Acknowledgements to collaborators:

25

Summary & Concluding RemarksMajor advances towards automatic tuningduring last decade:

Major challenges remain:path towards „autonomic“ systems requiresrethinking & simplifying component architectures with design-for-predictability paradigm

• workload-aware feedback control approach fruitful• math models and online stats are vital assets• „low-hanging fruit“ engineering successful• important contributions from research community (AutoRAID, AutoAdmin, LEO, Härder/Rahm book, etc.)

Problem is long-standing but very difficult and requires good research stamina Success is a lousy teacher. (Bill Gates)