18-741 advanced computer architecture lecture 1: intro and ... · 21 retrospective: conventional...

115
Computer Architecture Lecture 10b: Memory Latency Prof. Onur Mutlu ETH Zürich Fall 2018 18 October 2018

Upload: others

Post on 03-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Computer Architecture

Lecture 10b: Memory Latency

Prof. Onur Mutlu

ETH Zürich

Fall 2018

18 October 2018

Page 2: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Memory:

A Low-Level Perspective

Page 3: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Module and Chip

3

Page 4: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Goals

• Cost

• Latency

• Bandwidth

• Parallelism

• Power

• Energy

• Reliability

• …

4

Page 5: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Chip

5

Row Decoder

Array o

f Sen

se A

mp

lifiers

Ce

ll Array

Ce

ll Array

Row Decoder

Array o

f Sen

se A

mp

lifiers

Ce

ll Array

Ce

ll Array

Ban

k I/O

Page 6: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Sense Amplifier

6

enable

top

bottom

Inverter

Page 7: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Sense Amplifier – Two Stable States

7

1 1

0

0VDD

VDD

Logical “1” Logical “0”

Page 8: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Sense Amplifier Operation

8

0

VT

VB

VT > VB1

0

VDD

Page 9: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Cell – Capacitor

9

Empty State Fully Charged State

Logical “0” Logical “1”

1

2

Small – Cannot drive circuits

Reading destroys the state

Page 10: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Capacitor to Sense Amplifier

10

1

0

VDD

1

VDD

0

Page 11: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Cell Operation

11

½VDD

½VDD

01

0

VDD½VDD+δ

Page 12: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Subarray – Building Block for DRAM Chip

12

Ro

w D

eco

de

r

Cell Array

Cell Array

Array of Sense Amplifiers (Row Buffer) 8Kb

Page 13: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Bank

13

Ro

w D

eco

de

r

Array of Sense Amplifiers (8Kb)

Cell Array

Cell Array

Ro

w D

eco

de

r

Array of Sense Amplifiers

Cell Array

Cell Array

Bank I/O (64b)

Ad

dre

ss

AddressData

Page 14: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Chip

14

Row Decoder

Array o

f Sen

se A

mp

lifiers

Ce

ll Array

Ce

ll Array

Row Decoder

Array o

f Sen

se A

mp

lifiers

Ce

ll Array

Ce

ll Array

Ban

k I/O

Row Decoder

Array o

f Sen

se

Am

plifie

rs

Ce

ll Array

Ce

ll Array

Row Decoder

Array o

f Sen

se

Am

plifie

rs

Ce

ll Array

Ce

ll Array

Ban

k I/O

Row Decoder

Array o

f Sense

Am

plifie

rs

Ce

ll Array

Cell A

rray

Row Decoder

Array o

f Sense

Am

plifie

rs

Ce

ll Array

Cell A

rray

Ban

k I/O

Row Decoder

Array o

f Sense

Am

plifiers

Cell A

rray

Cell A

rray

Row Decoder

Array o

f Sense

Am

plifiers

Cell A

rray

Cell A

rray

Ban

k I/O

Row Decoder

Arr

ay o

f Se

nse

A

mp

lifie

rs

Ce

ll A

rray

Ce

ll A

rray

Row Decoder

Arr

ay o

f Se

nse

A

mp

lifie

rs

Ce

ll A

rray

Ce

ll A

rray

Ban

k I/

O

Row Decoder

Arr

ay o

f Se

nse

A

mp

lifie

rs

Cel

l Arr

ay

Cel

l Arr

ay

Row Decoder

Arr

ay o

f Se

nse

A

mp

lifie

rs

Cel

l Arr

ay

Cel

l Arr

ay

Ban

k I/

O

Row Decoder

Arr

ay o

f Se

nse

A

mp

lifie

rs

Ce

ll A

rray

Ce

ll A

rray

Row Decoder

Arr

ay o

f Se

nse

A

mp

lifie

rs

Ce

ll A

rray

Ce

ll A

rray

Ban

k I/

O

Row Decoder

Arr

ay o

f Se

nse

A

mp

lifie

rs

Ce

ll A

rray

Cel

l Arr

ay

Row DecoderA

rray

of

Sen

se

Am

plif

iers

Ce

ll A

rray

Ce

ll A

rray

Ban

k I/

O

Shared internal bus

Memory channel - 8bits

Page 15: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Operation

15

Ro

w D

eco

de

rR

ow

De

cod

er

Array of Sense Amplifiers

Cell Array

Cell Array

Bank I/O

Data

1

2

ACTIVATE Row

READ/WRITE Column

3 PRECHARGE

Ro

w A

dd

ress

Column Address

Page 16: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Memory Latency:

Fundamental Tradeoffs

Page 17: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

1

10

100

1999 2003 2006 2008 2011 2013 2014 2015 2016 2017

DR

AM

Im

pro

vem

ent

(log)

Capacity Bandwidth Latency

Review: Memory Latency Lags Behind

128x

20x

1.3x

Memory latency remains almost constant

Page 18: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Latency Is Critical for Performance

In-Memory Data Analytics [Clapp+ (Intel), IISWC’15;

Awan+, BDCloud’15]

Datacenter Workloads [Kanev+ (Google), ISCA’15]

In-memory Databases [Mao+, EuroSys’12;

Clapp+ (Intel), IISWC’15]

Graph/Tree Processing [Xu+, IISWC’12; Umuroglu+, FPL’15]

Page 19: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Latency Is Critical for Performance

In-Memory Data Analytics [Clapp+ (Intel), IISWC’15;

Awan+, BDCloud’15]

Datacenter Workloads [Kanev+ (Google), ISCA’15]

In-memory Databases [Mao+, EuroSys’12;

Clapp+ (Intel), IISWC’15]

Graph/Tree Processing [Xu+, IISWC’12; Umuroglu+, FPL’15]

Long memory latency → performance bottleneck

Page 20: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

The Memory Latency Problem

High memory latency is a significant limiter of system performance and energy-efficiency

It is becoming increasingly so with higher memory contention in multi-core and heterogeneous architectures

Exacerbating the bandwidth need

Exacerbating the QoS problem

It increases processor design complexity due to the mechanisms incorporated to tolerate memory latency

20

Page 21: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

21

Retrospective: Conventional Latency Tolerance Techniques

Caching [initially by Wilkes, 1965] Widely used, simple, effective, but inefficient, passive Not all applications/phases exhibit temporal or spatial locality

Prefetching [initially in IBM 360/91, 1967] Works well for regular memory access patterns Prefetching irregular access patterns is difficult, inaccurate, and hardware-

intensive

Multithreading [initially in CDC 6600, 1964] Works well if there are multiple threads Improving single thread performance using multithreading hardware is an

ongoing research effort

Out-of-order execution [initially by Tomasulo, 1967] Tolerates cache misses that cannot be prefetched Requires extensive hardware resources for tolerating long latencies

Page 22: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Two Major Sources of Latency Inefficiency

Modern DRAM is not designed for low latency

Main focus is cost-per-bit (capacity)

Modern DRAM latency is determined by worst case conditions and worst case devices

Much of memory latency is unnecessary

22

Page 23: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

What Causes

the Long Memory Latency?

Page 24: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Why the Long Memory Latency?

Reason 1: Design of DRAM Micro-architecture

Goal: Maximize capacity/area, not minimize latency

Reason 2: “One size fits all” approach to latency specification

Same latency parameters for all temperatures

Same latency parameters for all DRAM chips

Same latency parameters for all parts of a DRAM chip

Same latency parameters for all supply voltage levels

Same latency parameters for all application data

24

Page 25: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Tiered Latency DRAM

25

Page 26: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

26

DRAM Latency = Subarray Latency + I/O Latency

What Causes the Long Latency?DRAM Chip

channel

cell array

I/O

DRAM Chip

channel

I/O

subarray

DRAM Latency = Subarray Latency + I/O Latency

DominantSu

bar

ray

I/O

Page 27: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

27

Why is the Subarray So Slow?

Subarray

row

dec

od

er

sense amplifier

cap

acit

or

accesstransistor

wordline

bit

line

Cell

large sense amplifier

bit

line:

51

2 c

ells

cell

• Long bitline– Amortizes sense amplifier cost Small area

– Large bitline capacitance High latency & power

sen

se a

mp

lifie

r

row

dec

od

er

Page 28: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

28

Trade-Off: Area (Die Size) vs. Latency

Faster

Smaller

Short BitlineLong Bitline

Trade-Off: Area vs. Latency

Page 29: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

29

Trade-Off: Area (Die Size) vs. Latency

0

1

2

3

4

0 10 20 30 40 50 60 70

No

rmal

ize

d D

RA

M A

rea

Latency (ns)

64

32

128

256 512 cells/bitline

Commodity DRAM

Long Bitline

Ch

eap

er

Faster

Fancy DRAMShort Bitline

Page 30: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

30

Short Bitline

Low Latency

Approximating the Best of Both Worlds

Long Bitline

Small Area

Long Bitline

Low Latency

Short BitlineOur Proposal

Small Area

Short Bitline Fast

Need Isolation

Add Isolation Transistors

High Latency

Large Area

Page 31: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

31

Approximating the Best of Both Worlds

Low Latency

Our Proposal

Small Area Long BitlineSmall Area

Long Bitline

High Latency

Short Bitline

Low Latency

Short Bitline

Large Area

Tiered-Latency DRAM

Low Latency

Small area using long

bitline

Page 32: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

32

Latency, Power, and Area Evaluation• Commodity DRAM: 512 cells/bitline

• TL-DRAM: 512 cells/bitline– Near segment: 32 cells

– Far segment: 480 cells

• Latency Evaluation– SPICE simulation using circuit-level DRAM model

• Power and Area Evaluation– DRAM area/power simulator from Rambus

– DDR3 energy calculator from Micron

Page 33: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

33

0%

50%

100%

150%

0%

50%

100%

150%

Commodity DRAM vs. TL-DRAM [HPCA 2013] La

ten

cy

Po

we

r

–56%

+23%

–51%

+49%

• DRAM Latency (tRC) • DRAM Power

• DRAM Area Overhead~3%: mainly due to the isolation transistors

TL-DRAMCommodity

DRAM

Near Far Commodity DRAM

Near Far

TL-DRAM

(52.5ns)

Page 34: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

34

Trade-Off: Area (Die-Area) vs. Latency

0

1

2

3

4

0 10 20 30 40 50 60 70

No

rmal

ize

d D

RA

M A

rea

Latency (ns)

64

32

128256 512 cells/bitline

Ch

eap

er

Faster

Near Segment Far Segment

Page 35: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

35

Leveraging Tiered-Latency DRAM

• TL-DRAM is a substrate that can be leveraged by the hardware and/or software

• Many potential uses1. Use near segment as hardware-managed inclusive

cache to far segment

2. Use near segment as hardware-managed exclusivecache to far segment

3. Profile-based page mapping by operating system

4. Simply replace DRAM with TL-DRAM

Lee+, “Tiered-Latency DRAM: A Low Latency and Low Cost DRAM Architecture,” HPCA 2013.

Page 36: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

36

subarray

Near Segment as Hardware-Managed Cache

TL-DRAM

I/O

cache

mainmemory

• Challenge 1: How to efficiently migrate a row between segments?

• Challenge 2: How to efficiently manage the cache?

far segment

near segmentsense amplifier

channel

Page 37: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

37

Inter-Segment Migration

Near Segment

Far Segment

Isolation Transistor

Sense Amplifier

Source

Destination

• Goal: Migrate source row into destination row

• Naïve way: Memory controller reads the source row byte by byte and writes to destination row byte by byte

→ High latency

Page 38: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

38

Inter-Segment Migration• Our way:

– Source and destination cells share bitlines

– Transfer data from source to destination across shared bitlines concurrently

Near Segment

Far Segment

Isolation Transistor

Sense Amplifier

Source

Destination

Page 39: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

39

Inter-Segment Migration

Near Segment

Far Segment

Isolation Transistor

Sense Amplifier

• Our way: – Source and destination cells share bitlines

– Transfer data from source to destination acrossshared bitlines concurrently

Step 2: Activate destination row to connect cell and bitline

Step 1: Activate source row

Additional ~4ns over row access latency

Migration is overlapped with source row access

Page 40: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

40

subarray

Near Segment as Hardware-Managed Cache

TL-DRAM

I/O

cache

mainmemory

• Challenge 1: How to efficiently migrate a row between segments?

• Challenge 2: How to efficiently manage the cache?

far segment

near segmentsense amplifier

channel

Page 41: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

41

0%

20%

40%

60%

80%

100%

120%

1 (1-ch) 2 (2-ch) 4 (4-ch)0%

20%

40%

60%

80%

100%

120%

1 (1-ch) 2 (2-ch) 4 (4-ch)

Performance & Power Consumption

11.5%

No

rmal

ize

d P

erf

orm

ance

Core-Count (Channel)N

orm

aliz

ed

Po

we

rCore-Count (Channel)

10.7%12.4%–23% –24% –26%

Using near segment as a cache improves performance and reduces power consumption

Lee+, “Tiered-Latency DRAM: A Low Latency and Low Cost DRAM Architecture,” HPCA 2013.

Page 42: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

42

0%

2%

4%

6%

8%

10%

12%

14%

1 2 4 8 16 32 64 128 256

Single-Core: Varying Near Segment Length

By adjusting the near segment length, we can trade off cache capacity for cache latency

Larger cache capacity

Higher cache access latency

Maximum IPC Improvement

Pe

rfo

rman

ce Im

pro

vem

en

t

Near Segment Length (cells)

Page 43: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

More on TL-DRAM

Donghyuk Lee, Yoongu Kim, Vivek Seshadri, Jamie Liu, Lavanya Subramanian, and Onur Mutlu,"Tiered-Latency DRAM: A Low Latency and Low Cost DRAM Architecture"Proceedings of the 19th International Symposium on High-Performance Computer Architecture (HPCA), Shenzhen, China, February 2013. Slides (pptx)

43

Page 44: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

LISA: Low-Cost Inter-Linked Subarrays[HPCA 2016]

44

Page 45: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Problem: Inefficient Bulk Data Movement

45

Bulk data movement is a key operation in many applications

– memmove & memcpy: 5% cycles in Google’s datacenter [Kanev+ ISCA’15]

Mem

ory

Contr

olle

r

CPU Memory

Channeldst

src

Long latency and high energy

LLCC

ore

Core

Core

Core 64 bits

Page 46: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Moving Data Inside DRAM?

46

DRAM

cell

Subarray 1

Subarray 2

Subarray 3

Subarray N

Internal

Data Bus (64b)

8Kb512

rowsBank

Bank

Bank

Bank

DRAM

Low connectivity in DRAM is the fundamental

bottleneck for bulk data movement

Goal: Provide a new substrate to enable

wide connectivity between subarrays

Page 47: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Key Idea and Applications

• Low-cost Inter-linked subarrays (LISA)

– Fast bulk data movement between subarrays

– Wide datapath via isolation transistors: 0.8% DRAM chip area

• LISA is a versatile substrate → new applications

47

Subarray 1

Subarray 2

Fast bulk data copy: Copy latency 1.363ms→0.148ms (9.2x)→ 66% speedup, -55% DRAM energy

In-DRAM caching: Hot data access latency 48.7ns→21.5ns (2.2x)→ 5% speedup

Fast precharge: Precharge latency 13.1ns→5.0ns (2.6x)→ 8% speedup

Page 48: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

New DRAM Command to Use LISA

Row Buffer Movement (RBM): Move a row of data in

an activated row buffer to a precharged one

48

SP

SP

SP

SP

SP

SP

SP

SP

Subarray 1

Subarray 2

RBM: SA1→SA2

Vdd

Vdd…

Vdd

Vdd/2

Vdd-Δ

Vdd/2+Δ

onCharge

Sharing

Activated

Precharged Amplify the chargeActivatedRBM transfers an entire row b/w subarrays

Page 49: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

RBM Analysis

• The range of RBM depends on the DRAM design

– Multiple RBMs to move data across > 3 subarrays

• Validated with SPICE using worst-case cells

– NCSU FreePDK 45nm library

• 4KB data in 8ns (w/ 60% guardband)

→ 500 GB/s, 26x bandwidth of a DDR4-2400 channel

• 0.8% DRAM chip area overhead [O+ ISCA’14]49

Subarray 1

Subarray 2

Subarray 3

Page 50: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

1. Rapid Inter-Subarray Copying (RISC)

• Goal: Efficiently copy a row across subarrays

• Key idea: Use RBM to form a new command sequence

50

SP

SP

SP

SP

SP

SP

SP

SP

Subarray 1

Subarray 2

Activate dst row

(write row buffer into dst row)3

RBM SA1→SA22

Activate src row1 src row

dst rowReduces row-copy latency by 9.2x,

DRAM energy by 48.1x

Page 51: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

2.Variable Latency DRAM (VILLA)

• Goal: Reduce DRAM latency with low area overhead

• Motivation: Trade-off between area and latency

51

High area overhead: >40%

Long Bitline

(DDRx)

Short Bitline

(RLDRAM)

Shorter bitlines → faster activate and precharge time

Page 52: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

2. Variable Latency DRAM (VILLA)

• Key idea: Reduce access latency of hot data via a

heterogeneous DRAM design [Lee+ HPCA’13, Son+ ISCA’13]

• VILLA: Add fast subarrays as a cache in each bank

52

Slow Subarray

Slow Subarray

Fast Subarray LISA: Cache rows rapidly from slow

to fast subarrays

32

rows

512

rows

Reduces hot data access latency by 2.2x

at only 1.6% area overhead

Challenge: VILLA cache requires

frequent movement of data rows

Page 53: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

3. Linked Precharge (LIP)

53

• Problem: The precharge time is limited by the strength

of one precharge unit

• Linked Precharge (LIP): LISA precharges a subarray

using multiple precharge units

S

P

S

P

S

P

S

P

S

P

S

P

S

P

S

P

S

P

S

P

S

P

S

P

Precharging

S

P

S

P

S

P

S

P

Activated row

on on

on

Linked

Precharging

Conventional DRAM LISA DRAM

Reduces precharge latency by 2.6x

(43% guardband)

Page 54: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

More on LISA

Kevin K. Chang, Prashant J. Nair, Saugata Ghose, Donghyuk Lee, Moinuddin K. Qureshi, and Onur Mutlu,"Low-Cost Inter-Linked Subarrays (LISA): Enabling Fast Inter-Subarray Data Movement in DRAM"Proceedings of the 22nd International Symposium on High-Performance Computer Architecture (HPCA), Barcelona, Spain, March 2016. [Slides (pptx) (pdf)] [Source Code]

54

Page 55: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

What Causes

the Long DRAM Latency?

Page 56: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Why the Long Memory Latency?

Reason 1: Design of DRAM Micro-architecture

Goal: Maximize capacity/area, not minimize latency

Reason 2: “One size fits all” approach to latency specification

Same latency parameters for all temperatures

Same latency parameters for all DRAM chips

Same latency parameters for all parts of a DRAM chip

Same latency parameters for all supply voltage levels

Same latency parameters for all application data

56

Page 57: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Tackling the Fixed Latency Mindset Reliable operation latency is actually very heterogeneous

Across temperatures, chips, parts of a chip, voltage levels, …

Idea: Dynamically find out and use the lowest latency one can reliably access a memory location with

Adaptive-Latency DRAM [HPCA 2015]

Flexible-Latency DRAM [SIGMETRICS 2016]

Design-Induced Variation-Aware DRAM [SIGMETRICS 2017]

Voltron [SIGMETRICS 2017]

DRAM Latency PUF [HPCA 2018]

...

We would like to find sources of latency heterogeneity and exploit them to minimize latency

57

Page 58: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Latency Variation in Memory Chips

58

HighLow

DRAM Latency

DRAM BDRAM A DRAM C

Slow cells

Heterogeneous manufacturing & operating conditions → latency variation in timing parameters

Page 59: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Why is Latency High?

59

• DRAM latency: Delay as specified in DRAM standards

– Doesn’t reflect true DRAM device latency

• Imperfect manufacturing process → latency variation

• High standard latency chosen to increase yield

HighLow

DRAM Latency

DRAM A DRAM B DRAM C

Manufacturing

Variation

Standard

Latency

Page 60: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

What Causes the Long Memory Latency?

Conservative timing margins!

DRAM timing parameters are set to cover the worst case

Worst-case temperatures

85 degrees vs. common-case

to enable a wide range of operating conditions

Worst-case devices

DRAM cell with smallest charge across any acceptable device

to tolerate process variation at acceptable yield

This leads to large timing margins for the common case

60

Page 61: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Understanding and Exploiting

Variation in DRAM Latency

Page 62: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

62

DRAM Stores Data as Charge

1. Sensing2. Restore3. Precharge

DRAM Cell

Sense-Amplifier

Three steps of charge movement

Page 63: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

63

Data 0

Data 1

Cell

time

char

ge

Sense-Amplifier

DRAM Charge over Time

Sensing Restore

Why does DRAM need the extra timing margin?

Timing ParametersIn theory

In practicemargin

Cell

Sense-Amplifier

Page 64: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

64

1. Process Variation – DRAM cells are not equal

– Leads to extra timing margin for cell that can store small amount of charge

`2. Temperature Dependence– DRAM leaks more charge at higher temperature

– Leads to extra timing margin when operating at low temperature

Two Reasons for Timing Margin

1. Process Variation – DRAM cells are not equal

– Leads to extra timing margin for a cell that can store a large amount of charge

1. Process Variation – DRAM cells are not equal

– Leads to extra timing margin for a cell that can store a large amount of charge

Page 65: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

65

DRAM Cells are Not EqualRealIdeal

Same Size Same Charge

Different Size Different Charge

Largest Cell

Smallest Cell

Same Latency Different Latency

Large variation in cell size Large variation in charge

Large variation in access latency

Page 66: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

66

Contact

Process Variation

Access Transistor

Bitline

Capacitor

Small cell can store small charge

• Small cell capacitance• High contact resistance• Slow access transistor

❶ Cell Capacitance

❷ Contact Resistance

❸ Transistor Performance

ACCESS

DRAM Cell

High access latency

Page 67: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

67

Two Reasons for Timing Margin

1. Process Variation – DRAM cells are not equal

– Leads to extra timing margin for a cell that can store a large amount of charge

`2. Temperature Dependence – DRAM leaks more charge at higher temperature

– Leads to extra timing margin for cells that operate at the high temperature

2. Temperature Dependence – DRAM leaks more charge at higher temperature

– Leads to extra timing margin for cells that operate at the high temperature

2. Temperature Dependence – DRAM leaks more charge at higher temperature

– Leads to extra timing margin for cells that operate at low temperature

Page 68: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

68

Charge Leakage Temperature

Room Temp. Hot Temp. (85°C)

Small Leakage Large LeakageCells store small charge at high temperature and large charge at low temperature Large variation in access latency

Page 69: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

69

DRAM Timing Parameters

• DRAM timing parameters are dictated by the worst-case

– The smallest cell with the smallest charge in all DRAM products

– Operating at the highest temperature

• Large timing margin for the common-case

Page 70: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Adaptive-Latency DRAM [HPCA 2015]

Idea: Optimize DRAM timing for the common case

Current temperature

Current DRAM module

Why would this reduce latency?

A DRAM cell can store much more charge in the common case (low temperature, strong cell) than in the worst case

More charge in a DRAM cell

Faster sensing, charge restoration, precharging

Faster access (read, write, refresh, …)

Lee+, “Adaptive-Latency DRAM: Optimizing DRAM Timing for the Common-Case,” HPCA 2015.

Page 71: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

71

Extra Charge Reduced Latency

1. Sensing

2. Restore

3. Precharge

Sense cells with extra charge faster Lower sensing latency

No need to fully restore cells with extra charge Lower restoration latency

No need to fully precharge bitlines for cells with extra charge Lower precharge latency

Page 72: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Characterization Infrastructure

72Kim+, “Flipping Bits in Memory Without Accessing Them: An

Experimental Study of DRAM Disturbance Errors,” ISCA 2014.

TemperatureController

PC

HeaterFPGAs FPGAs

Page 73: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DRAM Characterization Infrastructure

Hasan Hassan et al., SoftMC: A Flexible and Practical Open-Source Infrastructure for Enabling Experimental DRAM Studies, HPCA 2017.

Flexible

Easy to Use (C++ API)

Open-source

github.com/CMU-SAFARI/SoftMC

73

Page 74: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

SoftMC: Open Source DRAM Infrastructure

https://github.com/CMU-SAFARI/SoftMC

74

Page 75: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

75

Typical DIMM at Low Temperature

Observation 1. Faster Sensing

More Charge

Strong ChargeFlow

Faster Sensing

Typical DIMM at Low TemperatureMore charge Faster sensing

Timing(tRCD)

17% ↓No Errors

115 DIMM Characterization

Page 76: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

76

Observation 2. Reducing Restore Time

Less Leakage Extra Charge

No Need to FullyRestore Charge

Typical DIMM at lower temperatureMore charge Restore time reduction

Typical DIMM at Low Temperature

Read (tRAS)

37% ↓Write (tWR)

54% ↓No Errors

115 DIMM Characterization

Page 77: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

77

AL-DRAM

• Key idea– Optimize DRAM timing parameters online

• Two components– DRAM manufacturer provides multiple sets of

reliable DRAM timing parameters at different temperatures for each DIMM

– System monitors DRAM temperature & uses appropriate DRAM timing parameters

reliable DRAM timing parameters

DRAM temperature

Lee+, “Adaptive-Latency DRAM: Optimizing DRAM Timing for the Common-Case,” HPCA 2015.

Page 78: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

78

DRAM Temperature• DRAM temperature measurement

• Server cluster: Operates at under 34°C• Desktop: Operates at under 50°C• DRAM standard optimized for 85°C

• Previous works – DRAM temperature is low• El-Sayed+ SIGMETRICS 2012• Liu+ ISCA 2007

• Previous works – Maintain low DRAM temperature • David+ ICAC 2011• Liu+ ISCA 2007• Zhu+ ITHERM 2008

DRAM operates at low temperatures in the common-case

Page 79: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

79

Latency Reduction Summary of 115 DIMMs

• Latency reduction for read & write (55°C)– Read Latency: 32.7%

– Write Latency: 55.1%

• Latency reduction for each timing parameter (55°C) – Sensing: 17.3%

– Restore: 37.3% (read), 54.8% (write)

– Precharge: 35.2%

Lee+, “Adaptive-Latency DRAM: Optimizing DRAM Timing for the Common-Case,” HPCA 2015.

Page 80: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

80

AL-DRAM: Real System Evaluation

• System– CPU: AMD 4386 ( 8 Cores, 3.1GHz, 8MB LLC)

– DRAM: 4GByte DDR3-1600 (800Mhz Clock)

– OS: Linux

– Storage: 128GByte SSD

• Workload– 35 applications from SPEC, STREAM, Parsec,

Memcached, Apache, GUPS

Page 81: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

81

0%5%

10%15%20%25%

sop

lex

mcf

milc

libq

lbm

gem

s

cop

y

s.cl

ust

er

gup

s

no

n-i

nte

nsi

ve

inte

nsi

ve

all-

wo

rklo

ads

Single Core Multi Core

0%5%

10%15%20%25%

sop

lex

mcf

milc

libq

lbm

gem

s

cop

y

s.cl

ust

er

gup

s

no

n-i

nte

nsi

ve

inte

nsi

ve

all-

wo

rklo

ads

Single Core Multi Core

1.4%

6.7%

0%5%

10%15%20%25%

sop

lex

mcf

milc

libq

lbm

gem

s

cop

y

s.cl

ust

er

gup

s

no

n-i

nte

nsi

ve

inte

nsi

ve

all-

wo

rklo

ads

Single Core Multi Core

5.0%

AL-DRAM: Single-Core Evaluation

AL-DRAM improves performance on a real system

Perf

orm

ance

Imp

rove

men

t AverageImprovement

all-

35

-wo

rklo

ad

Page 82: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

82

0%5%

10%15%20%25%

sop

lex

mcf

milc

libq

lbm

gem

s

cop

y

s.cl

ust

er

gup

s

no

n-i

nte

nsi

ve

inte

nsi

ve

all-

wo

rklo

ads

Single Core Multi Core

0%5%

10%15%20%25%

sop

lex

mcf

milc

libq

lbm

gem

s

cop

y

s.cl

ust

er

gup

s

no

n-i

nte

nsi

ve

inte

nsi

ve

all-

wo

rklo

ads

Single Core Multi Core

0%5%

10%15%20%25%

sop

lex

mcf

milc

libq

lbm

gem

s

cop

y

s.cl

ust

er

gup

s

no

n-i

nte

nsi

ve

inte

nsi

ve

all-

wo

rklo

ads

Single Core Multi Core

14.0%

2.9%0%5%

10%15%20%25%

sop

lex

mcf

milc

libq

lbm

gem

s

cop

y

s.cl

ust

er

gup

s

no

n-i

nte

nsi

ve

inte

nsi

ve

all-

wo

rklo

ads

Single Core Multi Core

10.4%

AL-DRAM: Multi-Core Evaluation

AL-DRAM provides higher performance formulti-programmed & multi-threaded workloads

Perf

orm

ance

Imp

rove

men

t Average Improvement

all-

35

-wo

rklo

ad

Page 83: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Reducing Latency Also Reduces Energy

AL-DRAM reduces DRAM power consumption by 5.8%

Major reason: reduction in row activation time

83

Page 84: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

AL-DRAM: Advantages & Disadvantages

Advantages

+ Simple mechanism to reduce latency

+ Significant system performance and energy benefits

+ Benefits higher at low temperature

+ Low cost, low complexity

Disadvantages

- Need to determine reliable operating latencies for different temperatures and different DIMMs higher testing cost

(might not be that difficult for low temperatures)

84

Page 85: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

More on AL-DRAM

Donghyuk Lee, Yoongu Kim, Gennady Pekhimenko, Samira Khan, Vivek Seshadri, Kevin Chang, and Onur Mutlu,"Adaptive-Latency DRAM: Optimizing DRAM Timing for the Common-Case"Proceedings of the 21st International Symposium on High-Performance Computer Architecture (HPCA), Bay Area, CA, February 2015. [Slides (pptx) (pdf)] [Full data sets]

85

Page 86: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Different Types of Latency Variation

AL-DRAM exploits latency variation

Across time (different temperatures)

Across chips

Is there also latency variation within a chip?

Across different parts of a chip

86

Page 87: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Variation in Activation Errors

87

Different characteristics across DIMMs

No ACT Errors

Results from 7500 rounds over 240 chips

Very few errors

Modern DRAM chips exhibit

significant variation in activation latency

Rife w/ errors

13.1ns

standard

Many errorsMax

Min

Quartiles

Page 88: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Spatial Locality of Activation Errors

88

Activation errors are concentrated

at certain columns of cells

One DIMM @ tRCD=7.5ns

Page 89: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Mechanism to Reduce DRAM Latency

• Observation: DRAM timing errors (slow DRAM

cells) are concentrated on certain regions

• Flexible-LatencY (FLY) DRAM

– A software-transparent design that reduces latency

• Key idea:

1) Divide memory into regions of different latencies

2) Memory controller: Use lower latency for regions without

slow cells; higher latency for other regions

Chang+, “Understanding Latency Variation in Modern DRAM Chips: Experimental Characterization, Analysis, and Optimization",” SIGMETRICS 2016.

Page 90: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

FLY-DRAM Configurations

0%

20%

40%

60%

80%

100%

Baseline

(DDR3)

D1 D2 D3 Upper

Bound

Fra

cti

on

of

Cells

13ns

10ns

7.5ns

0%

20%

40%

60%

80%

100%

Baseline

(DDR3)

D1 D2 D3 Upper

Bound

Fra

cti

on

of

Cells

13ns

10ns

7.5ns

Profiles of 3 real DIMMs

12%

93%

99%

13%

74%99%

tRCD

tRP

Chang+, “Understanding Latency Variation in Modern DRAM Chips: Experimental Characterization, Analysis, and Optimization",” SIGMETRICS 2016.

Page 91: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Chang+, “Understanding Latency Variation in Modern DRAM Chips: Experimental Characterization, Analysis, and Optimization",” SIGMETRICS 2016.

Results

0.9

0.95

1

1.05

1.1

1.15

1.2

1.25

No

rmal

ize

d P

erf

orm

ance

40 Workloads

Baseline (DDR3)

FLY-DRAM (D1)

FLY-DRAM (D2)

FLY-DRAM (D3)

Upper Bound

17.6%19.5%

19.7%

13.3%

FLY-DRAM improves performance

by exploiting spatial latency variation in DRAM

Page 92: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

FLY-DRAM: Advantages & Disadvantages

Advantages

+ Reduces latency significantly

+ Exploits significant within-chip latency variation

Disadvantages

- Need to determine reliable operating latencies for different parts of a chip higher testing cost

- Slightly more complicated controller

92

Page 93: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Analysis of Latency Variation in DRAM Chips

Kevin Chang, Abhijith Kashyap, Hasan Hassan, Samira Khan, Kevin Hsieh, Donghyuk Lee, Saugata Ghose, Gennady Pekhimenko, Tianshi Li, and Onur Mutlu,"Understanding Latency Variation in Modern DRAM Chips: Experimental Characterization, Analysis, and Optimization"Proceedings of the ACM International Conference on Measurement and Modeling of Computer Systems (SIGMETRICS), Antibes Juan-Les-Pins, France, June 2016. [Slides (pptx) (pdf)] [Source Code]

93

Page 94: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Computer Architecture

Lecture 10b: Memory Latency

Prof. Onur Mutlu

ETH Zürich

Fall 2018

18 October 2018

Page 95: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

We did not cover the following slides in lecture.

These are for your benefit.

Page 96: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Activation failures are highly constrained to local bitlines

Spatial Distribution of Failures

96

Su

ba

rray b

ord

er

Re

ma

pp

ed

row

DR

AM

ro

ws (

1 c

ell

)

DRAM columns (1 cell)

0 512 1024

1024

512

1024

512

0 512 1024

DR

AM

Ro

w (

nu

mb

er)

Subarray Edge

DRAM Column (number)

How are activation failures spatially distributed in DRAM?

Page 97: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

A weak bitline is likely to remain weak and a strong bitline is likely to remain strong over time

Fail probability at time 1 (%)

Fa

il p

rob

ab

ilit

y a

t ti

me

2 (

%)

F pro

bat

tim

e t

2(%

)

Fprob at time t1 (%)

Short-term Variation

97

Does a bitline’s probability of failure change over time?

Page 98: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

A weak bitline is likely to remain weak and a strong bitline is likely to remain strong over time

Fail probability at time 1 (%)

Fa

il p

rob

ab

ilit

y a

t ti

me

2 (

%)

F pro

bat

tim

e t

2(%

)

Fprob at time t1 (%)

Short-term Variation

98

Does a bitline’s probability of failure change over time?

This shows that we can rely on a static profile of weak bitlines to determine whether an access will cause failures

We can rely on a static profile of weak bitlinesto determine whether an access will cause failures

Page 99: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

We can reliably issue write operations with significantly reduced tRCD (e.g., by 77%)

How are write operations affected by reduced tRCD?

99

Write Operations

…… …

Local Row Buffer

Weak bitline

Local Row Buffer

Cache line

Ro

w D

eco

der

WRITE

✔ ✔

✔ ✔

Page 100: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Solar-DRAM

Uses a static profile of weak subarray columns• Identifies subarray columns as weak or strong

• Obtained in a one-time profiling step

Three Components

1. Variable-latency cache lines (VLC)

2. Reordered subarray columns (RSC)

3. Reduced latency for writes (RLW)

100

Page 101: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Solar-DRAM

Uses a static profile of weak subarray columns• Identifies subarray columns as weak or strong

• Obtained in a one-time profiling step

Three Components

1. Variable-latency cache lines (VLC)

2. Reordered subarray columns (RSC)

3. Reduced latency for writes (RLW)

101

Page 102: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Solar-DRAM

Uses a static profile of weak subarray columns• Identifies subarray columns as weak or strong

• Obtained in a one-time profiling step

Three Components

1. Variable-latency cache lines (VLC)

2. Reordered subarray columns (RSC)

3. Reduced latency for writes (RLW)

102

Page 103: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

103

Solar-DRAM: VLC (I)

Ro

w D

eco

der Cache line

…… …

Identify cache lines comprised of strong bitlines

Access such cache lines with a reduced tRCD

Local Row Buffer

Weak bitline Strong bitline

Page 104: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Solar-DRAM

Uses a static profile of weak subarray columns• Identifies subarray columns as weak or strong

• Obtained in a one-time profiling step

Three Components

1. Variable-latency cache lines (VLC)

2. Reordered subarray columns (RSC)

3. Reduced latency for writes (RLW)

104

Page 105: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

105

Solar-DRAM: RSC (II)

Ro

w D

eco

der Cache line

…… …

Local Row Buffer

Cache line 0 Cache line 1Cache line 0 Cache line 1

Remap cache lines across DRAM at the memory controller level so cache line 0 will likely map to a strong cache line

Page 106: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Solar-DRAM

Uses a static profile of weak subarray columns• Identifies subarray columns as weak or strong

• Obtained in a one-time profiling step

Three Components

1. Variable-latency cache lines (VLC)

2. Reordered subarray columns (RSC)

3. Reduced latency for writes (RLW)

106

Page 107: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

107

Solar-DRAM: RLW (III)

Ro

w D

eco

der Cache line

Local Row Buffer

…… …

Write to all locations in DRAM with a significantly reduced tRCD (e.g., by 77%)

All bitlines are strong when issuing writes

Page 108: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

More on Solar-DRAM

Jeremie S. Kim, Minesh Patel, Hasan Hassan, and Onur Mutlu,"Solar-DRAM: Reducing DRAM Access Latency by Exploiting the Variation in Local Bitlines"Proceedings of the 36th IEEE International Conference on Computer Design (ICCD), Orlando, FL, USA, October 2018.

108

Page 109: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Why Is There

Spatial Latency Variation

Within a Chip?

109

Page 110: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

110

Inherently fast

inherently slow

What Is Design-Induced Variation?slowfast

slow

fast

Systematic variation in cell access timescaused by the physical organization of DRAM

sense amplifiers

wo

rdlin

ed

rivers

across row

distance from sense amplifier

across column

distance from wordline driver

Page 111: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

111

DIVA Online Profiling

inherently slow

Profile only slow regions to determine min. latencyDynamic & low cost latency optimization

sense amplifier

wo

rdlin

ed

river

Design-Induced-Variation-Aware

Page 112: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

112

inherently slow

DIVA Online Profiling

slow cells

design-inducedvariation

processvariation

localized errorrandom error

online profilingerror-correcting code

Combine error-correcting codes & online profiling Reliably reduce DRAM latency

sense amplifier

wo

rdlin

ed

river

Design-Induced-Variation-Aware

Page 113: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

113

DIVA-DRAM Reduces LatencyRead Write

31.2%

25.5%

35.1%34.6%36.6%35.8%

0%

10%

20%

30%

40%

50%

55°C 85°C 55°C 85°C 55°C 85°C

AL-DRAM AVA Profiling AVA Profiling + Shuffling

Late

ncy

Red

uct

ion

DIVADIVA

36.6%

27.5%

39.4%38.7%41.3%40.3%

0%

10%

20%

30%

40%

50%

55°C 85°C 55°C 85°C 55°C 85°C

AL-DRAM AVA Profiling AVA Profiling + Shuffling

DIVADIVA

DIVA-DRAM reduces latency more aggressivelyand uses ECC to correct random slow cells

Page 114: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

DIVA-DRAM: Advantages & Disadvantages

Advantages

++ Automatically finds the lowest reliable operating latency at system runtime (lower production-time testing cost)

+ Reduces latency more than prior methods (w/ ECC)

+ Reduces latency at high temperatures as well

Disadvantages

- Requires knowledge of inherently-slow regions

- Requires ECC (Error Correcting Codes)

- Imposes overhead during runtime profiling

114

Page 115: 18-741 Advanced Computer Architecture Lecture 1: Intro and ... · 21 Retrospective: Conventional Latency Tolerance Techniques Caching [initially by Wilkes, 1965] Widely used, simple,

Design-Induced Latency Variation in DRAM

Donghyuk Lee, Samira Khan, Lavanya Subramanian, Saugata Ghose, Rachata Ausavarungnirun, Gennady Pekhimenko, Vivek Seshadri, and Onur Mutlu,"Design-Induced Latency Variation in Modern DRAM Chips: Characterization, Analysis, and Latency Reduction Mechanisms"Proceedings of the ACM International Conference on Measurement and Modeling of Computer Systems (SIGMETRICS), Urbana-Champaign, IL, USA, June 2017.

115