USING REFERENCE ATTRIBUTE GRAMMAR-CONTROLLED REWRITING FOR ENERGY - - PowerPoint PPT Presentation

using reference attribute grammar controlled rewriting
SMART_READER_LITE
LIVE PREVIEW

USING REFERENCE ATTRIBUTE GRAMMAR-CONTROLLED REWRITING FOR ENERGY - - PowerPoint PPT Presentation

, Models@Run.Time Workshop 2015 USING REFERENCE ATTRIBUTE GRAMMAR-CONTROLLED REWRITING FOR ENERGY AUTO-TUNING Christoff Brger Department of Computer Science, Lund University, Sweden Johannes Mey Software Technology Group, TU Dresden,


slide-1
SLIDE 1

,

Models@Run.Time Workshop 2015

USING REFERENCE ATTRIBUTE GRAMMAR-CONTROLLED REWRITING FOR ENERGY AUTO-TUNING

Christoff Bürger

Department of Computer Science, Lund University, Sweden

Johannes Mey

Software Technology Group, TU Dresden, Germany

René Schöne

Software Technology Group, TU Dresden, Germany

Sven Karol

Chair for Compiler Construction, TU Dresden, Germany

Daniel Langer

Software Technology Group, TU Dresden, Germany

Ottawa, September 29, 2015

slide-2
SLIDE 2

,

Presentation Overview

Our new idea: Use Reference Attribute Grammars and rewriting for runtime models. We use

  • a Reference Attribute Grammar (RAG)
  • to create and modify a runtime model
  • of batch process execution on a compute cluster and
  • use attributes and RAG-controlled rewrites to schedule the

system’s tasks

  • in an energy-optimized way.

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 2 of 25

slide-3
SLIDE 3

,

Outline

Case Study Solution Background (RACR) Our Solution Evaluation and Outlook

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 3 of 25

slide-4
SLIDE 4

,

A Case Study: Scheduling Batch Processes

  • f Wikipedia Indexing Tasks

Very simple case study to show use of RAGs for runtime model T ask: indexing of text chunks (taken from Wikipedia)

  • processing time predictable (proportional to chunk size)
  • requests arrive interactive (occur randomly)
  • requests have deadline

Energy Optimization: Minimize energy consumption of the indexing system

  • System is network of (embedded) computers
  • Computers (and connecting switches) can be turned off to save

energy

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 4 of 25

slide-5
SLIDE 5

,

A Case Study: Scheduling Batch Processes

  • f Wikipedia Indexing Tasks

C a m b r i

  • n

i x ( p

  • w

e r ) CubieBoard (worker) switch CubieTruck (master) n e t w

  • r

k l i n k power link power control link

real world

events (indexing requests, device removed/unavaila ble, etc.)

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 5 of 25

slide-6
SLIDE 6

,

A Case Study: Scheduling Batch Processes

  • f Wikipedia Indexing Tasks

C a m b r i

  • n

i x ( p

  • w

e r ) CubieBoard (worker) switch CubieTruck (master) n e t w

  • r

k l i n k power link power control link

real world

events (indexing requests, device removed/unavaila ble, etc.)

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 5 of 25

slide-7
SLIDE 7

,

A Case Study: Scheduling Batch Processes

  • f Wikipedia Indexing Tasks

C a m b r i

  • n

i x ( p

  • w

e r ) CubieBoard (worker) switch CubieTruck (master) n e t w

  • r

k l i n k power link power control link

virtual world

web interface abstract syntax graph (runtme model)

real world

events (indexing requests, device removed/unavaila ble, etc.)

  • bserve

controller

event queue & dispatch

updates (rewrites)

Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 5 of 25

slide-8
SLIDE 8

,

Solution Background

RACR - Reference Attrribute Grammar-Controlled Rewriting

RACR is . . .

  • a Reference Attribute Grammar (RAG) system

– declarative semantics – lazy, incremental evaluation

  • for RAG-controlled rewriting

– advanced AST manipulation

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 6 of 25

slide-9
SLIDE 9

,

Solution Background

RACR - Reference Attribute Grammar-Controlled Rewriting

RAG-controlled rewriting = RAGs + graph rewriting

  • reference attribute grammar for declarative analyses

– reference attributes induce sematic overlay graph on top of abstract sytax tree (AST) – enables deduction and analyses of graph structure → deduced, memoized abstract syntax graph (ASG)

  • graph rewriting for ASG transformations

– left hand: ASG pattern (ASTs connected via reference attributes) – right hand: manipulations on matched underlying AST → ASG changes with AST (updated by RAG)

  • seamless combination:

– use analyses to deduce rewrites – rewrites automatically update analyses → incremental

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 7 of 25

slide-10
SLIDE 10

,

Solution Background

RACR - Reference Attribute Grammar-Controlled Rewriting

The Implementation: RACR

  • reference implementation of RAG-controlled rewriting

in Scheme R6RS1 RACR contains API for:

  • ASG schema definition (AST schema + attribution)
  • ASG querying (AST + attributes)
  • rewriting:

– imperative and/or RAG-controlled and/or fixpoint – primitive and/or pattern-based – ... in any combination!

https://github.com/christoff-buerger/racr

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 8 of 25

slide-11
SLIDE 11

,

Solution Background

RACR - Reference Attribute Grammar-Controlled Rewriting

The Implementation: RACR

  • reference implementation of RAG-controlled rewriting

in Scheme R6RS1 RACR contains API for:

  • ASG schema definition (AST schema + attribution)
  • ASG querying (AST + attributes)
  • rewriting:

– imperative and/or RAG-controlled and/or fixpoint – primitive and/or pattern-based – ... in any combination!

https://github.com/christoff-buerger/racr

1Don’t panic! C bindings and .NET bindings are available.

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 8 of 25

slide-12
SLIDE 12

,

Our Solution

The Grammar

Grammar is encoded in Scheme symbols

  • production rule: left side -> right side
  • upper case: nonterminals
  • lower case: terminals
  • repetition (*), inheritance (:)

(ast-rule ’Root- >scheduler-backupworkers-CompositeWorker) (ast-rule ’AbstractWorker- >id-state-timestamp) (ast-rule ’CompositeWorker:AbstractWorker- >AbstractWorker *) (ast-rule ’Switch:CompositeWorker- >) (ast-rule ’Worker:AbstractWorker- >devicetype-Request*<Queue) (ast-rule ’Request- >id-size-deadline-dispatchtime)

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 9 of 25

slide-13
SLIDE 13

,

Our Solution

Example AST

Root

switching: 1‐3

Switch

Id: Switch1 state: RUNNING

Switch

Id: Switch2 state: OFF

Request

Id: 0003 size: 123.45 deadline: 12:00:00 Id: Cubie1

Worker

Id: Cubie3 state: RUNNING Id: Cubie1

Worker

Id: Cubie4 state: OFF scheduler: l.c.s. September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 10 of 25

slide-14
SLIDE 14

,

Our Solution

Scheduling a Request

Request

Id: 0004 size: 456.78 deadline: 13:37:00

Root

switching: 1‐3

Switch

Id: Switch1 state: RUNNING

Switch

Id: Switch2 state: OFF

Request

Id: 0003 size: 123.45 deadline: 12:00:00 Id: Cubie1

Worker

Id: Cubie3 state: RUNNING Id: Cubie1

Worker

Id: Cubie4 state: OFF scheduler: l.c.s. September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 11 of 25

slide-15
SLIDE 15

,

Our Solution

Scheduling by Rewriting

Scheduling a new task: rewriting the AST

  • insert a new Request node at the right position

(rewrite-insert (ast-child ’Queue worker) ;list-node to insert into index ;position of insertion (create-ast spec ’Request (list id size deadline #f)))

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 12 of 25

slide-16
SLIDE 16

,

Our Solution

Attribute-controlled Scheduling

Where to put the new Request?

  • evaluate attribute schedule to find insertion position
  • result is worker and position in worker’s queue
  • Attribute depends on terminal scheduler

→ scheduler can be exchanged at runtime!

(ag-rule schedule (Root (lambda (n time work-id load-size deadline) (att-value (ast-child ’scheduler n) n time work-id load-size deadline ))))

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 13 of 25

slide-17
SLIDE 17

,

Our Solution

Two schedulers implemented: schedule-shortest-queue simple scheduler inserting in shortest queue of any worker schedule-load-consolidating inserts request in fullest queue while ensuring deadline is kept

Root

switching: 1‐3 schedule‐shortest‐queue

find‐inseron‐posion

find‐inseron‐ posion

Switch

Id: Switch1 state: RUNNING schedule‐load‐consolidang

find‐inseron‐posion

find‐inseron‐ posion

Switch

Id: Switch2 state: OFF a a a workload‐heurisc a workload‐heurisc a

Request

Id: 0003 size: 123.45 deadline: 12:00:00 workload‐heurisc a workload‐heurisc Id: Cubie1 a

Worker

Id: Cubie3 state: RUNNING Id: Cubie1 a

Worker

Id: Cubie4 state: OFF a a scheduler: l.c.s. a schedule September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 14 of 25

slide-18
SLIDE 18

,

Our Solution

Attribute evaluation

Root

switching: 1‐3 schedule‐shortest‐queue

find‐inseron‐posion

find‐inseron‐ posion

Switch

Id: Switch1 state: RUNNING schedule‐load‐consolidang

calls

find‐inseron‐posion

find‐inseron‐ posion

reads

Switch

Id: Switch2 state: OFF a a a workload‐heurisc a workload‐heurisc a

Request

Id: 0003 size: 123.45 deadline: 12:00:00 workload‐heurisc a workload‐heurisc Id: Cubie1 a

Worker

Id: Cubie3 state: RUNNING Id: Cubie1 a

Worker

Id: Cubie4 state: OFF a a scheduler: l.c.s. a schedule September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 15 of 25

slide-19
SLIDE 19

,

Our Solution

Scheduling a Request

The resulting AST

Root

switching: 1‐3

Switch

Id: Switch1 state: RUNNING

Switch

Id: Switch2 state: OFF

Request

deadline: 13:37:00 size: 456.78 Id: 0004

Request

Id: 0003 size: 123.45 deadline: 12:00:00 Id: Cubie1

Worker

Id: Cubie3 state: RUNNING Id: Cubie1

Worker

Id: Cubie4 state: OFF scheduler: l.c.s. September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 16 of 25

slide-20
SLIDE 20

,

Our Solution

Saving Energy

Required workers are computed with attributes

  • adaptation strategy regularly computes how many and which

workers to switch on or off

  • interactive system requires backup workers
  • amount of backup workers and adaptation parameters described

in AST Saving energy by switching off workers:

  • Try to minimize amount of idle workers
  • use adaptation strategy
  • use load-consolidating scheduler to minimize required workers

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 17 of 25

slide-21
SLIDE 21

,

Evaluation

Test setup for measuring energy consumption

  • graphical interface to show system state and consumed power
  • Scenario generator to run controlled workloads with different

settings

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 18 of 25

slide-22
SLIDE 22

,

Evaluation

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

Shortest-queue scheduler, workers always on

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 19 of 25

slide-23
SLIDE 23

,

Evaluation

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

Power consumption (W) time (min) Shortest-queue scheduler Energy-aware shortest-queue scheduler Energy-aware load-consolidating scheduler

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

Shortest-queue scheduler, workers always on

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 19 of 25

slide-24
SLIDE 24

,

Evaluation

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

Energy-aware shortest-queue scheduler

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 20 of 25

slide-25
SLIDE 25

,

Evaluation

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

Power consumption (W) time (min) Shortest-queue scheduler Energy-aware shortest-queue scheduler Energy-aware load-consolidating scheduler

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

Energy-aware shortest-queue scheduler

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 20 of 25

slide-26
SLIDE 26

,

Evaluation

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

Energy-aware load-consolidating scheduler

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 21 of 25

slide-27
SLIDE 27

,

Evaluation

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

Power consumption (W) time (min) Shortest-queue scheduler Energy-aware shortest-queue scheduler Energy-aware load-consolidating scheduler

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

Energy-aware load-consolidating scheduler

RACRtune ∙ B01 Demo 1b: Distributed Indexing of

Wikipedia Text Data

time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Consumed energy (Ws) 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 20,000 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Average power consumption (W) 2 4 6 8 10 12 14 16 simple scheduler simple scheduler with adaptive switching of workers load­consolidating scheduler with adaptive switching of workers simple scheduler time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 simple scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5 load­consolidating scheduler with adaptive switching of workers time (min) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Power (W) Requests Switch 1 Cubie 1 Cubie 2 Cubie 3 Switch 2 Cubie 4 Cubie 5

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 21 of 25

slide-28
SLIDE 28

,

Evaluation

Properties of the Solution

  • scalable: incremental evaluation ensures only necessary

attributes are re-evaluated after system change

  • adaptive: ASG structure can be modified at runtime, schedulers

and parameters can be switched

  • fault-tolerant: system can handle device failures

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 22 of 25

slide-29
SLIDE 29

,

Evaluation

Results

  • Energy-aware shortest queue scheduler saves 13.1% compared to

regular shortest-queue scheduler

  • Energy-aware load-consolidating scheduler saves 17.5% compared

to regular shortest-queue scheduler

  • load-consolidating scheduler increases amount of request that can

be scheduled

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 23 of 25

slide-30
SLIDE 30

,

Outlook

Next steps

  • heterogeneous architecture
  • more interesting network structure
  • simulate large systems
  • more case studies for RACR for runtime models

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 24 of 25

slide-31
SLIDE 31

,

Conclusion

Benefits of RAG-Controlled Rewriting

Effjcient Rewritjng Effjcient Analyses Programmed / RAG Controlled Rewritjng

RACR

interactjve runtjme models model transformatjon incremental reasoning … …

September 29, 2015 Using RAG-Controlled Rewriting for Energy Auto-Tuning Slide 25 of 25