a self-tuning configurable cache

11
1 A Self-Tuning Configurable Cache Ann Gordon-Ross and Frank Vahid* Department of Computer Science and Engineering University of California, Riverside *Also with the Center for Embedded Computer Systems at UC Irvine This work was supported by the U.S. National Science Foundation, and by the Semiconductor Research Corporation

Upload: blake-hunt

Post on 31-Dec-2015

18 views

Category:

Documents


2 download

DESCRIPTION

A Self-Tuning Configurable Cache. Ann Gordon-Ross and Frank Vahid* Department of Computer Science and Engineering University of California, Riverside *Also with the Center for Embedded Computer Systems at UC Irvine. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Self-Tuning Configurable Cache

1

A Self-Tuning Configurable Cache

Ann Gordon-Ross and Frank Vahid*Department of Computer Science and Engineering

University of California, Riverside

*Also with the Center for Embedded Computer Systems at UC Irvine

This work was supported by the U.S. National Science Foundation, and by the Semiconductor Research Corporation

Page 2: A Self-Tuning Configurable Cache

2of 11

Cache Power Consumption

Memory access: 50% of embedded processor’s system power

Caches are power hungry ARM920T (Segars 01) M*CORE (Lee/Moyer/Arends 99)

Thus, caches are a good candidate for optimizations

Different applications have vastly different cache requirements

Total size, line size, associativity

4KB 16 byte, 2-way

2KB 32 byte

direct-mapped 8KB 64 byte, 4-way

Page 3: A Self-Tuning Configurable Cache

of 113

Cache Tuning

Cache tuning is the process of determining the appropriate cache parameters for an application - can be done during runtime

Requires a tunable cache Cache parameter values can be varied during runtime

Requires tuning hardware Orchestrates cache tuning Energy

Executing in base configuration

Tunable cache

Tuning hw

TC Cache TuningTCTCTCTCTCTC TCTCTCTC

Download application

Microprocessor

Page 4: A Self-Tuning Configurable Cache

4of 11

Online Cache Tuning

Reconfigure the cache dynamically to adapt to different phases of program execution or different applications in a multi-application environment

In this talk, I describe research that addresses when to reconfigure the cache for a periodic system

Feedback-control system for online cache tuning

Base cache energy

TimeEnergy Consumption

Phase-tuned

Change cache

Page 5: A Self-Tuning Configurable Cache

5of 11

Online Cache Tuning Challenges

Base cache energy

TimeEnergy Consumption

Phase Interval

Base cache energy

TimeEnergy Consumption

Runtime energy

Tuning interval

Excess tuning energy

Tuning interval too short

Tuning interval too long

Base cache energy

TimeEnergy Consumption

Runtime energy

Tuning interval

Wasted energy in suboptimal configuration

Need a good tuning interval Tuning interval is the time between invocations of the

tuning hardware Should closely match phase interval - length of time

the system executes between phase changes

Problem: How does the tuning hardware determine when to invoke cache tuning - must

have knowledge of the future to obtain optimal results

Previous methods use a fixed tuning

interval and do not analyze the value chosen

Page 6: A Self-Tuning Configurable Cache

6of 11

Periodic System - Fixed Phase Interval

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1m 2m 3m 4m 5m 6m 7m 8m 9m10m11

m12

m13

m14

m15

m16

m17

m18

m19

m20

m

Tuning interval (millions of cycles)

No

rma

lize

d e

ne

rgy

Online tuningenergynormalized tobase

Phase interval

fixed at 10 million cycles

Tuning interval too

short

Tuning interval too

long

Energy savings = 32% (includes 7% overhead due to tuning)

Base Line

Negative savings if tuning

interval is greater than

phase interval!

Page 7: A Self-Tuning Configurable Cache

7of 11

Online Algorithms

Need to determine tuning interval while system is executing

Online algorithms process data piecemeal - unable to view entire dataset

Online tuner must be able to determine the tuning interval based on current and past events with no knowledge of future

Goal: Adjust tuning interval (TI) to match phase interval

Observe change in energy due to tuningCache tuning

No change in energyNo change in energy

TimeEnergy Consumption

TI TITI TI TI TI TI

Change in energy

Phase change occurred

Phase change occurred

TITI TITI TITI

No change in energy

Page 8: A Self-Tuning Configurable Cache

8of 11

Online Cache Tuner – Feedback Control System

We model our online cache tuner as a feedback control system Controller Logic is based on attack/decay online algorithm

Draw on fuzzy logic to stabilize tuning interval

Change tuning interval based on how close or far the system is to being “stable”

Use a 2 part equation

Page 9: A Self-Tuning Configurable Cache

9of 11

Controller Logic

%∆E

0100%M

ultiplicative change to

tuning interval (∆TI)

Stable System

PoS

1.0

Large energy change, tunes too

infrequently, decrease tuning interval (tuning

interval too long)

Small energy change, tunes too frequently, increase tuning interval (tuning interval too short)

U

D

If %∆E < PoS,

y 1 U

PoSx U

If %∆E >= PoS,

y D 11 PoS

x 1D 11 PoS

PoS %∆E averaged over last W

measurements to eliminate erratic behavior

Determine U, D, PoS and W through experimentation

%∆E

∆TI

Page 10: A Self-Tuning Configurable Cache

10of 11

0

0.2

0.4

0.6

0.8

1

1.2Optimal Tuner Variable tuning interval

Online Cache Tuner Energy Savings

Base line

Observed similar results for less periodic systems and systems with more applications -

see paper for details.

29% energy savings - within 8% of optimalN

ormalized Energy

Page 11: A Self-Tuning Configurable Cache

11of 11

Conclusions

Observed that fixed tuning intervals may not reveal energy savings Important to vary tuning interval to match system needs

Developed a feedback control system for online cache tuning 29% energy savings on average - 8% from optimal

Continuing work for more random systems