+ All Categories
Home > Documents > COLORIS: A Dynamic Cache Partitioning System...

COLORIS: A Dynamic Cache Partitioning System...

Date post: 17-Feb-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
49
COLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West, Zhuoqun Cheng, Ye Li Computer Science Department Boston University
Transcript
Page 1: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

COLORIS: A Dynamic Cache Partitioning System UsingPage Coloring

Ying Ye, Richard West, Zhuoqun Cheng, Ye Li

Computer Science DepartmentBoston University

Page 2: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Overview

1 Background

2 Contribution

3 COLORIS Design

4 Evaluation

5 Conclusion

Page 3: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Background

For multicore platforms, tightly-coupled on-chip resources allow fasterdata sharing between processing cores, at the same time, sufferingfrom potentially heavy resource contention

Most commercial off-the-shelf systems only provide best effort servicefor accessing the shared LLC

unpredictable caching behaviorssevere performance degradationcompromised QoS

Performance isolation needed for QoS-demanding systems

Page 4: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Background

For multicore platforms, tightly-coupled on-chip resources allow fasterdata sharing between processing cores, at the same time, sufferingfrom potentially heavy resource contention

Most commercial off-the-shelf systems only provide best effort servicefor accessing the shared LLC

unpredictable caching behaviorssevere performance degradationcompromised QoS

Performance isolation needed for QoS-demanding systems

Page 5: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Background

For multicore platforms, tightly-coupled on-chip resources allow fasterdata sharing between processing cores, at the same time, sufferingfrom potentially heavy resource contention

Most commercial off-the-shelf systems only provide best effort servicefor accessing the shared LLC

unpredictable caching behaviorssevere performance degradationcompromised QoS

Performance isolation needed for QoS-demanding systems

Page 6: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Background

For multicore platforms, tightly-coupled on-chip resources allow fasterdata sharing between processing cores, at the same time, sufferingfrom potentially heavy resource contention

Most commercial off-the-shelf systems only provide best effort servicefor accessing the shared LLC

unpredictable caching behaviorssevere performance degradationcompromised QoS

Performance isolation needed for QoS-demanding systems

Page 7: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Page Coloring

Figure : Page Color Bits

Figure : Mapping Between MemoryPages and Cache Space

Page 8: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Page Coloring

Page 9: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Page Coloring

Page 10: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Dynamic Partitioning

When to re-partition LLC?

phase change; absent of a-priori knowledge

What is the right partition size?

How to recolor memory?

heavy overhead; inefficient use

How to work with over-committed systems?

Page 11: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Dynamic Partitioning

When to re-partition LLC?

phase change; absent of a-priori knowledge

What is the right partition size?

How to recolor memory?

heavy overhead; inefficient use

How to work with over-committed systems?

Page 12: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Dynamic Partitioning

When to re-partition LLC?

phase change; absent of a-priori knowledge

What is the right partition size?

How to recolor memory?

heavy overhead; inefficient use

How to work with over-committed systems?

Page 13: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Dynamic Partitioning

When to re-partition LLC?

phase change; absent of a-priori knowledge

What is the right partition size?

How to recolor memory?

heavy overhead; inefficient use

How to work with over-committed systems?

Page 14: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Dynamic Partitioning

When to re-partition LLC?

phase change; absent of a-priori knowledge

What is the right partition size?

How to recolor memory?

heavy overhead; inefficient use

How to work with over-committed systems?

Page 15: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Dynamic Partitioning

When to re-partition LLC?

phase change; absent of a-priori knowledge

What is the right partition size?

How to recolor memory?

heavy overhead; inefficient use

How to work with over-committed systems?

Page 16: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Dynamic Partitioning

When to re-partition LLC?

phase change; absent of a-priori knowledge

What is the right partition size?

How to recolor memory?

heavy overhead; inefficient use

How to work with over-committed systems?

Page 17: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Contribution

Our work tries to solve all problems above associated withimplementing dynamic page coloring in production systems

We proposes an efficient page recoloring framework in the Linuxkernel, called COLORIS (COLOR ISolation)

Page 18: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Page COLOR ISolation Architecture

Figure : COLORIS Architecture

Page 19: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Color-aware Page Allocator

Figure : Page Allocator

Page 20: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Page Color Manager

Static color assignment

Cache is divided into N sections of contiguous colors

Each cache section is statically assigned to a core

local core; remote core

Each process is assigned a section of page colors and runs on thecorresponding core

local color; remote color

Page 21: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Static Color Assignment

Page 22: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Dynamic Color Assignment

Dynamic color assignment:

Applications with low cache demand may give up page colorsApplications needing more cache may acquire page colors from othercache sections

Page 23: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Dynamic Color Assignment

Dynamic color assignment:

Applications with low cache demand may give up page colorsApplications needing more cache may acquire page colors from othercache sections

Page 24: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Utilization Monitor

Figure : COLORIS Architecture

Page 25: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Utilization Monitor

Measures cache usage of individual applications:

cache miss rate = missesaccesses

Triggers cache re-partitioning:

miss rate higher than HighThresholdmiss rate lower than LowThreshold

Page 26: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Utilization Monitor

Measures cache usage of individual applications:

cache miss rate = missesaccesses

Triggers cache re-partitioning:

miss rate higher than HighThresholdmiss rate lower than LowThreshold

Page 27: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Re-partitioning

Color Hotness

The number of processes sharing the color

Global Hotness: number of owners on all cores

Remote Hotness: number of owners on remote cores

if color A is in the cache section statically assigned to core X, all othercores are called remote cores with respect to A

Page 28: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Re-partitioning

Color Hotness

The number of processes sharing the color

Global Hotness: number of owners on all cores

Remote Hotness: number of owners on remote cores

if color A is in the cache section statically assigned to core X, all othercores are called remote cores with respect to A

Page 29: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Re-partitioning

Color Hotness

The number of processes sharing the color

Global Hotness: number of owners on all cores

Remote Hotness: number of owners on remote cores

if color A is in the cache section statically assigned to core X, all othercores are called remote cores with respect to A

Page 30: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Re-partitioning

procedure alloc colors(num)new ← φwhile num > 0if needRemote()new + =pick coldest remote()

elsenew + =pick coldest local()

num← num − 1return newend procedure

pick coldest remote:pick a color in a remotecache section, with thesmallest global hotness

pick coldest local:pick a color in the localcache section, with thesmallest remote hotness

Page 31: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Re-partitioning

procedure alloc colors(num)new ← φwhile num > 0if needRemote()new + =pick coldest remote()

elsenew + =pick coldest local()

num← num − 1return newend procedure

pick coldest remote:pick a color in a remotecache section, with thesmallest global hotness

pick coldest local:pick a color in the localcache section, with thesmallest remote hotness

Page 32: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Re-partitioning

procedure alloc colors(num)new ← φwhile num > 0if needRemote()new + =pick coldest remote()

elsenew + =pick coldest local()

num← num − 1return newend procedure

pick coldest remote:pick a color in a remotecache section, with thesmallest global hotness

pick coldest local:pick a color in the localcache section, with thesmallest remote hotness

Page 33: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,
Page 34: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Re-partitioning

procedure pick victims(num)victims ← φwhile num > 0if hasRemote()victims + =pick hottest remote()

elsevictims + =pick hottest local()

num← num − 1return victimsend procedure

pick hottest remote:pick a color in a remotecache section, with thelargest global hotness

pick hottest local:pick a color in the localcache section, with thelargest remote hotness

Page 35: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Re-partitioning

procedure pick victims(num)victims ← φwhile num > 0if hasRemote()victims + =pick hottest remote()

elsevictims + =pick hottest local()

num← num − 1return victimsend procedure

pick hottest remote:pick a color in a remotecache section, with thelargest global hotness

pick hottest local:pick a color in the localcache section, with thelargest remote hotness

Page 36: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Cache Re-partitioning

procedure pick victims(num)victims ← φwhile num > 0if hasRemote()victims + =pick hottest remote()

elsevictims + =pick hottest local()

num← num − 1return victimsend procedure

pick hottest remote:pick a color in a remotecache section, with thelargest global hotness

pick hottest local:pick a color in the localcache section, with thelargest remote hotness

Page 37: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,
Page 38: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Recoloring Engine

Figure : COLORIS Architecture

Page 39: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Recoloring Engine

Shrinkage: lazy recoloring [Lin et al:08]

look for pages of specific colors that are going to be taken away andclear the present bits of their page table entries

an unused bit is set to indicate recoloring needed

allocate new pages from assigned colors in a round-robin manner

Page 40: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Recoloring Engine

Expansion

Selective Moving:Assuming n-way set associative cache, scan the whole page table andrecolor one in every n + 1 pages of the same color

Redistribution:

clear the access bit of every page table entryafter a fixed time window, scan the page table againapply lazy recoloring to entries with access bits set

Page 41: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Recoloring Engine

Expansion

Selective Moving:Assuming n-way set associative cache, scan the whole page table andrecolor one in every n + 1 pages of the same color

Redistribution:

clear the access bit of every page table entryafter a fixed time window, scan the page table againapply lazy recoloring to entries with access bits set

Page 42: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Recoloring Engine

Expansion

Selective Moving:Assuming n-way set associative cache, scan the whole page table andrecolor one in every n + 1 pages of the same color

Redistribution:

clear the access bit of every page table entryafter a fixed time window, scan the page table againapply lazy recoloring to entries with access bits set

Page 43: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Evaluation

Experiment setup

Dell PowerEdge T410 machine with quad-core Intel Xeon E55062.13GHz processor, 8GB RAM, shared 4MB 16-way set-associative L3cache

Benchmark: SPEC CPU2006

Page 44: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Evaluation

Dynamic partitioning for QoS

Four benchmarks run together for an hour

In C1 and C2, HighThreshold is 65% and 75% respectively

Page 45: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Evaluation

Dynamic partitioning for QoS

Four benchmarks run together for an hourIn C1 and C2, HighThreshold is 65% and 75% respectively

Page 46: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Evaluation

COLORIS in over-committed systems

Eight applications run together, with each two pinned to a core

C7: Dynamic; C8: Static; C9: None (Linux default)

Page 47: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Evaluation

COLORIS in over-committed systems

Eight applications run together, with each two pinned to a coreC7: Dynamic; C8: Static; C9: None (Linux default)

Page 48: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

Conclusion

Designed a memory sub-system that provides static/dynamic cachepartitioning capabilities

Proposed a scheme for managing page colors, which works forover-committed systems

Studied two page selection policies for effective page recoloring

Page 49: COLORIS: A Dynamic Cache Partitioning System …cs-pub.bu.edu/fac/richwest/slides/coloris.pdfCOLORIS: A Dynamic Cache Partitioning System Using Page Coloring Ying Ye, Richard West,

The End

Thank you!


Recommended