Reverse Engineering Query Execution Engine Design Decisions

20
Reverse Engineering Query Execution Engine Design Decisions Helga Gudmundsdottir, Parmita Mehta, Magdalena Balazinska, and Dan R. K. Ports -- Work in Progress -- 1

Transcript of Reverse Engineering Query Execution Engine Design Decisions

Page 1: Reverse Engineering Query Execution Engine Design Decisions

Reverse Engineering Query Execution Engine Design Decisions

Helga Gudmundsdottir, Parmita Mehta, Magdalena Balazinska, and Dan R. K. Ports

-- Work in Progress --

1

Page 2: Reverse Engineering Query Execution Engine Design Decisions

2

Page 3: Reverse Engineering Query Execution Engine Design Decisions

3

Page 4: Reverse Engineering Query Execution Engine Design Decisions

Same analytics query on two different systems

4

Query

Page 5: Reverse Engineering Query Execution Engine Design Decisions

Different analytics query on same two systems

5

Query

Page 6: Reverse Engineering Query Execution Engine Design Decisions

•  Writing intermediate data to disk? Vs in-memory? •  CPU-intensive operations? •  Shuffling data?

•  Inefficient memory management? •  Any synchronization barriers? Data skew?

•  Able to use entire cluster? •  Were there failures?

•  ...

What are these systems really doing?

6

Page 7: Reverse Engineering Query Execution Engine Design Decisions

Requires: -  Deep expertise in each DBMS

-  Detailed experimentation

-  Knowledge of code base

-  Instrumentation & profiling

Want to understand the underlying design decisions of query execution engines

7

Page 8: Reverse Engineering Query Execution Engine Design Decisions

8

Page 9: Reverse Engineering Query Execution Engine Design Decisions

Is there a way to do this automatically?

9

Page 10: Reverse Engineering Query Execution Engine Design Decisions

System

Query

➔  80% workers utilized ➔  Three data shuffling ops ➔  No synch. barriers ➔  Periodic data

materialization ➔  Column-store storage

Do this automatically, for any engine

10

Page 11: Reverse Engineering Query Execution Engine Design Decisions

How do design decisions manifest in low-level system metrics? -  Can we learn their signatures?

Can system metrics provide insights into how design decisions manifest during query execution? -  Provide rich information about query execution and system behavior

11

Page 12: Reverse Engineering Query Execution Engine Design Decisions

System

Query

➔  80% workers utilized ➔  Three data shuffling ops ➔  No synch. barriers ➔  Periodic data

materialization ➔  Column-store storage

Automatically distill low-level metrics into design decisions

12

Do this automatically, for any engine

Page 13: Reverse Engineering Query Execution Engine Design Decisions

Sysstat gathers system metrics

System

Query Query

Initial Approach

Use TPC-H benchmark data at multiple scale factors

Simple queries: Select, Join, Aggregate

Learn signatures of basic operations for each system

13

Page 14: Reverse Engineering Query Execution Engine Design Decisions

Query Query

?

14

Can we distinguish between systems?

Page 15: Reverse Engineering Query Execution Engine Design Decisions

?

JOIN followed by a PROJECT

15

Can we distinguish between basic operators?

Page 16: Reverse Engineering Query Execution Engine Design Decisions

Questions to the audience

-  Would you use such a system? -  What design decisions are worth inferring? -  Other applications of this approach?

16

Page 17: Reverse Engineering Query Execution Engine Design Decisions

SLA for Multi-tenant Analytics as a Service

17

Page 18: Reverse Engineering Query Execution Engine Design Decisions

Analytics as a Service

Dedicated resources can provide performance guarantees Over-provisioning can provide predictable response times But, what if we want analytics cheaper?

18

Page 19: Reverse Engineering Query Execution Engine Design Decisions

SLA for Multi-tenant Analytics Service Can the information about system load be captured and displayed to customers utilizing the system? How to expose contention that is interpretable by the user?

-  Slow down factor for the service? -  How long before query will complete?

19

Page 20: Reverse Engineering Query Execution Engine Design Decisions

SLA for Multi-tenant Analytics Service What does the user want?

•  How should we think about SLAs in Analytics as a service with contention?

•  How should we expose this information to end users?

•  What scheduling algorithms make sense for Analytics as a service?

20