1 of 42

ICGMM: CXL-enabled Memory Expansion with Intelligent Caching Using Gaussian Mixture Model

Hanqiu Chen, Yitu Wang, Luis Vitorio Cargnini3, Mohammadreza Soltaniyeh3, Dongyang Li3, Gongjin Sun3, Pradeep Subedi3, Andrew Chang3, Yiran Chen2 and Cong Hao1

1Georgia Institute of Technology, 2Duke University, and 3Samsung Semiconductor, Inc.

§ Equal contribution

Email: hanqiu.chen@gatech.edu

2 of 42

Background

(Hennessy, John L., and David A. Patterson. Computer architecture: a quantitative approach)

Memory wall

3 of 42

Background

(Hennessy, John L., and David A. Patterson. Computer architecture: a quantitative approach)

Memory wall

CXL-enabled memory expansion

4 of 42

Background

(Hennessy, John L., and David A. Patterson. Computer architecture: a quantitative approach)

Memory wall

  • DRAM acts as cache for SSD
  • FPGA acts as cache controller

CXL-enabled memory expansion

5 of 42

DRAM Cache for SSD: Challenges

DRAM data granularity

64 B

64 B

64 B

SSD data granularity

4 KB

64 B

64 B

64 B

Cache pollution & eviction

Granularity mismatch

6 of 42

DRAM Cache for SSD: Challenges

DRAM data granularity

64 B

64 B

64 B

SSD data granularity

4 KB

64 B

64 B

64 B

Cache pollution & eviction

Granularity mismatch

DRAM

FPGA

HW-inefficient cache controller

7 of 42

DRAM Cache for SSD: Challenges

DRAM data granularity

64 B

64 B

64 B

SSD data granularity

4 KB

64 B

64 B

64 B

Cache pollution & eviction

Granularity mismatch

DRAM

FPGA

Large cache miss penalty

HW-inefficient cache controller

8 of 42

DRAM Cache for SSD: Approaches

DRAM

FPGA

DRAM data granularity

64 B

64 B

64 B

SSD data granularity

4 KB

Lightweight HW cache controller

Host CPU

x

Smart caching

If not accessed frequently, do not cache in DRAM but directly to host

9 of 42

DRAM Cache for SSD: Approaches

DRAM

FPGA

Lightweight HW cache controller

Host CPU

x

Smart caching

If not accessed frequently, do not cache in DRAM but directly to host

Algorithm

2D Gaussian Mixture Model (GMM)

  • Light-weight
  • Captures spatial and temporal memory access patterns

10 of 42

2D GMM Motivations: Spatial Patterns

Spatial memory access profiling results

dlrm

parsec

sysbench

Memory access spatial distribution can be fitted with a combination of Gaussian functions

11 of 42

2D GMM Motivations: Temporal Patterns

Temporal memory access profiling results

Uneven access frequency within a specific range of addresses

dlrm

parsec

sysbench

12 of 42

2D GMM: Overview

Spatial

patterns

Temporal

patterns

13 of 42

2D GMM: Overview

Spatial

patterns

Temporal

patterns

2D GMM

14 of 42

2D GMM: Overview

Spatial

patterns

Temporal

patterns

2D GMM

Trained using Expectation-Maximization (EM) algorithm

15 of 42

2D GMM: Overview

Spatial

patterns

Temporal

patterns

2D GMM

Trained using Expectation-Maximization (EM) algorithm

Predict future memory access frequency with:

  • Physical address
  • Time stamp

16 of 42

Trace processing

An example of trace sequence with timestamp annotated

We empirically set len_window = 32,

len_access_shot = 10,000

32

Help capture temporal locality better for long trace

17 of 42

Trace processing

An example of trace sequence with timestamp annotated

We empirically set len_window = 32,

len_access_shot = 10,000

32

An access shot

Help capture temporal locality better for long trace

18 of 42

Trace processing

An example of trace sequence with timestamp annotated

We empirically set len_window = 32,

len_access_shot = 10,000

32

A time window

Help capture temporal locality better for long trace

19 of 42

Intelligent Caching with 2D GMM

[page index, time stamp]

Memory request

DRAM cache

Host

20 of 42

Intelligent Caching with 2D GMM

[page index, time stamp]

Memory request

DRAM cache

Host

Hit

Directly send data back to host from DRAM cache

If cache hit

21 of 42

Intelligent Caching with 2D GMM

[page index, time stamp]

Memory request

DRAM cache

Host

Hit

GMM engine

Miss

GMM score

Directly send data back to host from DRAM cache

If cache hit

SSD

22 of 42

Intelligent Caching with 2D GMM

[page index, time stamp]

Memory request

DRAM cache

Host

Hit

GMM engine

Miss

GMM score

Directly send data back to host from DRAM cache

If cache hit

SSD

GMM score indicates access frequency

larger score -> higher frequency

23 of 42

Intelligent Caching with 2D GMM

[page index, time stamp]

Memory request

DRAM cache

Host

Hit

GMM engine

Miss

GMM score

Score < Threshold

Directly send data back to host from DRAM cache

If cache hit

Directly send data from SSD to host

If cache miss

SSD

GMM score indicates access frequency

larger score -> higher frequency

S < T

24 of 42

Intelligent Caching with 2D GMM

[page index, time stamp]

Memory request

DRAM cache

Host

Hit

GMM engine

Miss

GMM score

Score < Threshold

 

Directly send data back to host from DRAM cache

If cache hit

Directly send data from SSD to host

If cache miss

Cache SSD data into DRAM

SSD

GMM score indicates access frequency

larger score -> higher frequency

S < T

 

25 of 42

Intelligent Eviction with 2D GMM

[page index, time stamp]

Memory request

DRAM cache

Host

Hit

GMM engine

Miss

GMM score

Score < Threshold

 

SSD

Block-0

0.63

Block-1

0.73

Block-8

0.61

Set-0

Block-0

0.82

Block-1

0.72

Block-8

0.91

Set-N

GMM score

Data

GMM score is also cached in the DRAM

Eviction when DRAM cache is full

4KB (page size)

26 of 42

Intelligent Eviction with 2D GMM

[page index, time stamp]

Memory request

DRAM cache

Host

Hit

GMM engine

Miss

GMM score

Score < Threshold

 

SSD

Block-0

0.63

Block-1

0.73

Block-8

0.61

Set-0

Block-0

0.82

Block-1

0.72

Block-8

0.91

Set-N

GMM score

to be evicted

Find the cache block with lowest GMM score to evict

Data

GMM score is also cached in the DRAM

Eviction when DRAM cache is full

27 of 42

Hardware Prototype

ICGMM is prototyped on FPGA, using FPGA DRAM as cache

Opens up a new opportunity of using SmartSSD as a CXL-enabled memory expansion device

Potential application

28 of 42

Hardware Prototype

ICGMM is prototyped on FPGA, using FPGA DRAM as cache

Complex run-time dynamic control

29 of 42

Hardware System Design

An overview of ICGMM design on FPGA (Xilinx Alev0 U50)

ICGMM is prototyped as a dataflow architecture with FIFO interfaces between different modules

Three modules

  • Cache policy engine
  • Cache control engine
  • Signal controller

30 of 42

Hardware System Design

An overview of ICGMM design on FPGA (Xilinx Alev0 U50)

ICGMM is prototyped as a dataflow architecture with FIFO interfaces between different modules

Three modules

  • Cache policy engine
  • Cache control engine
  • Signal controller

31 of 42

Module 1: Cache Policy Engine

Trace FIFO

PA

Time

Rsp FIFO

Ctrl.

Cache policy engine

GMM

PE

Control module

Score

Weight buffer

One-time loading from HBM before kernel starts

Control

  • Independent and data-driven module
  • Control module activates and close GMM PE based on Ctrl. signal

32 of 42

Module 1: Cache Policy Engine

Trace FIFO

PA

Time

Rsp FIFO

Ctrl.

Cache policy engine

GMM

PE

Control module

Score

Weight buffer

One-time loading from HBM before kernel starts

Control

  • Independent and data-driven module
  • Control module activates and close GMM PE based on Ctrl. signal

Highly parallelized GMM PE

  • Deep computation pipeline with II = 1 for GMM score calculation
  • Shift register to resolve data dependency in GMM score accumulation

33 of 42

Hardware System Design

An overview of ICGMM design on FPGA (Xilinx Alev0 U50)

ICGMM is prototyped as a dataflow architecture with FIFO interfaces between different modules

Three modules

  • Cache policy engine
  • Cache control engine
  • Signal controller

34 of 42

Module 2: Cache Control Engine

Cache management module

  • Check cache hit/miss and control cache loading and eviction
  • Only cache tags and GMM scores are transferred to BRAM and partitioned for quick hit/miss determination

35 of 42

Module 2: Cache Control Engine

Cache management module

  • Check cache hit/miss and control cache loading and eviction
  • Only cache tags and GMM scores are transferred to BRAM and partitioned for quick hit/miss determination

SSD access latency emulator

  • Stalls the dataflow in the cache control engine for a set duration to emulate SSD response time upon cache miss

36 of 42

Hardware System Design

An overview of ICGMM design on FPGA (Xilinx Alev0 U50)

ICGMM is prototyped as a dataflow architecture with FIFO interfaces between different modules

Three modules

  • Cache policy engine
  • Cache control engine
  • Signal controller

37 of 42

Module 3: Signal Controller

Controller

Manage control signals on FPGA

Trace FIFO

PA

Time

Rsp FIFO

Ctrl.

Score

HBM bank 1

Trace FIFO

[R/W, PA, Time]

Trace FIFO

R/W

PA

Score FIFO

Score

Rsp FIFO

Hit/miss

To cache control engine

To cache policy engine

  • The signal controller acts like a bridge between cache control engine and cache policy engine

  • Generates control signals, manages data flow between HBM, on-board buffers, and different modules and blocks

38 of 42

Experiment Results: Cache Miss Rate

0.32% ~ 6.14% reduction in cache miss rate

Compared to Least Recently Used (LRU) cache policy, GMM can achieve

The policy we choose is marked in shadow

The cache miss rate comparison

Setting: cach size = 64MB, block size = 4KB, associativity = 8. We use 256 Gaussian functions.

39 of 42

Experiment Results: SSD access latency

Average SSD access latency

Compared to Least Recently Used (LRU) cache policy, GMM can achieve

16.23% ~ 39.14% reduction in SSD access latency

Setting: read latency = 75𝜇𝑠 and write latency = 900𝜇𝑠

40 of 42

Experiment Results: Hardware Performance

Resource utilization and latency comparison between a lightweight LSTM and GMM for cache policy engine

Compared to LSTM cache controller, GMM has following benefits:

More than 10,000x latency reduction with only 2% BRAM utilization

Completely hidden GMM overhead with dataflow streaming

41 of 42

Experiment Results: Hardware Performance

Resource utilization and latency comparison between a lightweight LSTM and GMM for cache policy engine

Compared to LSTM cache controller, GMM has following benefits:

More than 10,000x latency reduction with only 2% BRAM utilization

Completely hidden GMM overhead with dataflow streaming

The lightweight LSTM has low cache hit rate (<50%)

42 of 42

Summary & Thanks

  • ICGMM is a hardware-managed DRAM caching system for CXL-enabled memory expansion prototyped on FPGA using Gaussian Mixture Model as cache policy engine

    • Algorithm – GMM-based cache policy for intelligent caching and eviction

    • Hardware – Optimized GMM hardware design with dataflow architecture

    • System – Hardware-managed DRAM cache system design

    • Performance – Improved DRAM cache hit rate and reduced average SSD access latency