19
Speed Scaling To Manage Temperature Nikhil Bansal IBM T.J. Watson Kirk Pruhs University of Pittsburgh

Speed Scaling To Manage Temperature Nikhil Bansal IBM T.J. Watson Kirk Pruhs University of Pittsburgh

Embed Size (px)

Citation preview

Speed Scaling To Manage Temperature

Nikhil BansalIBM T.J. Watson

Kirk PruhsUniversity of Pittsburgh

February 25, 2005 STACS 2005 2

Microprocessor Power Increasing Exponentially

P6Pentium ®

486

3862868086

80858080

80084004

0.1

1

10

100

1971 1974 1978 1985 1992 2000Year

Pow

er

(Watt

s)

Source: Borkar, De Intel

February 25, 2005 STACS 2005 3

Why worry about power ? Most Obvious Answer: Batteries have finite energy

Expected battery lifetime increase over the next 5 years: 30 to 40%

From Rabaey, 1995From Rabaey, 1995

65 70 75 80 85 90 95

0

10

20

30

40

50

Rechargable Lithium

Year

Nickel-Cadmium

Ni-Metal Hydride

Nom

inal C

apaci

ty (

W-h

r/lb

)

February 25, 2005 STACS 2005 4

Why worry about power ? Less Obvious Answer 2: Chips get hot

February 25, 2005 STACS 2005 5

Intel Hits “Thermal Wall”

Reuters Friday May 7,

SAN FRANCISCO, May 7 (Reuters) - Intel Corp. said on Friday it has scrapped the development of two new computer chips ( code-named Tejas and Jayhawk) for desktop/server systems in order to rush to the marketplace a more efficient chip technology more than a year ahead of schedule. Analysts said the move showed how eager the world's largest chip maker was to cut back on the heat its chips generate. Intel's method of cranking up chip speed was beginning to require expensive and noisy cooling systems for computers.

February 25, 2005 STACS 2005 6

Laptops may damage male fertility

Reuters: December 9, 2004 Men should keep their laptops off their laps because they could damage

fertility, an expert said on Thursday. Laptops, which reach high internal operating temperatures, can heat up the scrotum which could affect the quality and quantity of men’s sperm. “The increase in scrotal temperature is significant enough to cause changes in sperm parameters,” said Dr Yefim Sheynkin, an associate professor of urology at the State University of New York at Stony Brook.

STACS PC

February 25, 2005 STACS 2005 7

Pentium 4

February 25, 2005 STACS 2005 8

Power (Heat) Dissipation Illustration

February 25, 2005 STACS 2005 9

Problem Statement: Speed Scaling with Deadlines

Input: A collection of tasks, where task i has Release time ri when it arrives in the system

Deadline di when it must finish by

Work requirement wi

The processor must perform wi units of work on each task i between time ri and time di Preemption is allowed

Objective: minimize the maximum temperature For each time, the scheduler must specify both

Job Selection: which job to run wlog, may assume Earliest Deadline First policy

Speed Setting: at what speed the processor should run at

February 25, 2005 STACS 2005 10

The Relationship Between Speed and Power

P = c V2 s There is a minimum voltage V required to run

the processor at speed s, and V is roughly linear in s.

Therefore P = c s3

Generalize to P = sp for some constant p ≥ 1

Energy E = ∫Time P dt

February 25, 2005 STACS 2005 11

Our Basic Temperature Equation

Key Assumption: fixed ambient temperature Ta

Basic temperature equation

dT/dt = a P – b (T – Ta) = a P – b T

T = Temperature t = time P = supplied power a, b are constants For simplicity rescale so that Ta = 0

Fourier Law of Heat Conduction = rate of cooling is proportional to the temperature difference

February 25, 2005 STACS 2005 12

Summary of Results (New, Main Result)

Recall dT/dt = a P – b T

Equals Maxt ∫t

t+x P dt Offline Online

Energyb=0

x=∞Optimal YDS algorithmYDS 1995

Cute correctness proof

O(1)-competitive algorithmsOA AVR : YDS 1995BKP : BKP 2004

Temperature0 < b < ∞

x= Θ(1/b)Ellipsoid ExactBKP 2004

YDS is O(1)-approximation

BKP is O(1)-competitive

MaximumPowerb=∞

x=infinitesimal

Optimal YDS algorithm YDS 1995

BKP is strongly O(1)-competitiveBKP 2004

February 25, 2005 STACS 2005 13

Offline YDS Algorithm [YDS 95]

Repeat Find the interval I with maximum intensity

Intensity of time interval I = Σ wi / |I| Where the sum is over tasks i with [ri, di] in I

During I speed = to the intensity of I earliest deadline first scheduling policy

Remove I, and the jobs completed in I

February 25, 2005 STACS 2005 14

YDS Example(1)

Input

release time

deadlineArea = work of job

February 25, 2005 STACS 2005 15

YDS Example(2)

First Interval

Intensity

Second IntervalIntensity = green work + blue work

Length of solid green line

February 25, 2005 STACS 2005 16

YDS Example(3)

Final YDS Schedule Height = processor speed

YDS Theorem: The YDS schedule is optimal for energy, or equivalently temperature when b=0. And YDS is optimal for maximum power, or equivalently when b=∞. Our Proof: A cute consequence of KKT optimality

Our Theorem: The YDS schedule is at worst 20-competitive with respect to temperature for all cooling parameters b

February 25, 2005 STACS 2005 17

Algorithm Description: Speed k(t) at time t = e * maximum over all t2 > t of

Σ wi / (t2 – t1)

Sum is over jobs i with t1 = et – (e-1)t2 < ri < t and di < t2

BKP Algorithm

t t2ri di dit1= et – (e-1)t2

currenttime

February 25, 2005 STACS 2005 18

BKP Analysis

Theorem [BKP 2004] BKP completes all jobs by their deadlines

Main Theorem: BKP is O(1)-competitive with respect to temperature Proof: If YDS does y(t) work at time t, then we modify

the instance so that y(t) work arrives at time t with deadline t+1

This transformation doesn’t effect YDS and won’t decrease speed/temperature for BKP

Show that ∫t t+1/b k(t) dt (an upper bound for the energy used by BKP during a interval of length 1/b) is O(1) times the energy that YDS uses during that interval

Hilbert’s Theorem, Hardy and Littlewood inequalities

February 25, 2005 STACS 2005 19

Conclusion: Future Work

Try to understand speed scaling better by studying other scheduling problems/objectives Some results on flow time in [PUW 2004]

Consider the energy-bound and/or temperature-bound variation of your favorite scheduling problem Energy-bound constraint: Total energy used ≤ E =

Energy in battery Temperature-bound constraint: Maximum temperature ≤

Tmax = Thermal threshold of the device A cooling oblivious algorithm, that is one that works

for all cooling parameters b, will also give an energy bound result

Speed scaling can make many scheduling problems more difficult and interesting. Lots of nice problems here.