Caching less for better performance: Balancing cache size and update - - PowerPoint PPT Presentation

caching less for better performance balancing cache size
SMART_READER_LITE
LIVE PREVIEW

Caching less for better performance: Balancing cache size and update - - PowerPoint PPT Presentation

Caching less for better performance: Balancing cache size and update cost of flash memory cache in hybrid storage systems Yongseok Oh Jongmoo Choi Donghee Lee Sam H. Noh University of Seoul Dankook University


slide-1
SLIDE 1

Caching less for better performance: 
 Balancing cache size and update cost 


  • f flash memory cache 


in hybrid storage systems

1

Yongseok Oh Jongmoo Choi Donghee Lee Sam H. Noh

Hongik University samhnoh@hongik.ac.kr

University of Seoul

{ysoh,dhl_express}@uos.ac.kr

Dankook University

choijm@dankook.ac.kr

slide-2
SLIDE 2

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Harness benefits of SSDs and HDDs

§ High performance, large capacity, affordable cost

  • SSDs used as flash cache (NVCache)

§ Seagate Momentus XT(SLC 4GB), OCZ RevoDrive Hybrid (MLC 100GB)

  • Our focus: issue of managing flash cache

2

Hybrid Storage Systems

+

High performance Low power consumption Large Capacity Low cost

  • SSD

HDD Hybrid Storage System

slide-3
SLIDE 3

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Maintain Over-Provisioned Space (OPS)

§ Reserved space for Garbage Collection (GC) § Greatly influence GC performance

  • Typical SSDs

§ OPS size is fixed § Optimal size is unknown § Cannot adapt to workload changes

3

Important Characteristics of Flash based SSDs

Flash based SSD Caching
 Space OPS Fixed Size OPS

slide-4
SLIDE 4

10th USENIX Conference on File and Storage Technologies (FAST’12) 4

Our Goal: Find Optimal OPS Size

Less

Performance

Overall cost (e.g., response time

  • f hybrid storage)

GC cost Cache 
 miss rate Over-Provisioned 
 Space

More

Point of Optimal 
 Performance (Our Goal)

Caching
 Space

OPS

Caching
 Space

OPS

slide-5
SLIDE 5

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Periodically adjust OPS size to maximize the performance

§ Based on hit ratio and garbage collection cost

  • Question: how to find optimal OPS size?

§ Solution: Hybrid Storage Cost Model (Dynamically adjusted

according to workload)

5

Workload Dependent Optimal Partitioning

Proposed Hybrid Storage

HDD

Flash Cache

Workload Dependent 
 Optimal Partitioning

OPS Caching Space

Idea

OPS

Cachi ng
 Space

Flash Cache Perf. Hit

Caching Space Size

Optimal OPS size changes OPS Caching Space Flash Cache Perf. Hit

Caching Space Size

slide-6
SLIDE 6

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Introduction
  • Hybrid Cost Model
  • Implementation
  • Evaluation
  • Conclusion

6

Outline

slide-7
SLIDE 7

10th USENIX Conference on File and Storage Technologies (FAST’12) 7

OS 101: Access Cost Model (ACM)

CACM = Hit Rate x Cache Cost + (1-Hit Rate) x Miss Penalty

Storage Hierarchy Hit Request Miss Performance HDD

Buffer Cache

Capacity Expected I/O cost

slide-8
SLIDE 8

10th USENIX Conference on File and Storage Technologies (FAST’12) 8

Hybrid Storage: Access Cost Model

CACM(u)= Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u)

Hit Request Miss

HDD

  • CACM(u) represents expected I/O cost based on u

§ Incorporating u into the access cost model

  • Flash Cache is divided based on u (tunable)

§ u is fraction of caching space in flash cache (e.g., 0 ≤ u ≤ 1.0) § u influences hit ratio and access cost of flash cache

Caching Space OPS

u 1-u Flash 
 Cache

slide-9
SLIDE 9

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Hybrid cost model represents expected I/O cost

§ Combines hybrid read cost model and hybrid write cost model § Caching space divided into read and write spaces

  • For this talk we derive hybrid read cost model

9

Overview of Hybrid Cost Model

Read OPS Write HDD

Hybrid Cost Model Hybrid Read 
 Cost Model Hybrid Write 
 Cost Model

Flash 
 Cache

slide-10
SLIDE 10

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Hybrid cost model represents expected I/O cost

§ Combines hybrid read cost model and hybrid write cost model § Caching space divided into read and write spaces

  • For this talk we derive hybrid read cost model

10

Overview of Hybrid Cost Model

Read OPS Write HDD

Hybrid Cost Model Hybrid Read 
 Cost Model

Read OPS HDD

Hybrid Cost Model Hybrid Read 
 Cost Model

Flash 
 Cache

slide-11
SLIDE 11

10th USENIX Conference on File and Storage Technologies (FAST’12) 11

OPS Aware Hybrid Read Cost Model

CHR(u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u)

Read Hit Rate

  • Requirements for derivation

§ Read Hit Rate Function § HDD Cost Model § Flash Cache Cost Model

Flash Read Hit

HDD Read Cache OPS

u 1-u Maintain read data from HDD Flash 
 Cache HDD Read + Flash Write Miss

slide-12
SLIDE 12

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Read Hit Rate Function
  • HDD Cost Model
  • Flash Cache Cost Model
  • Finding Optimal Point

12

Hybrid Read Cost Model

CHR(u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u)

Flash Cache Read HDD Read + Flash Cache Write Read Hit Rate

slide-13
SLIDE 13

10th USENIX Conference on File and Storage Technologies (FAST’12) 13

Read Hit Rate Function

  • Read Hit rate function: HR(u), miss rate: 1-HR(u)

§ Related to workload pattern § Depends on u

u Hit Rate

HR(0.1)

Read Cache

OPS

Hit Miss u=0.1 Flash 
 Cache Low u Hit Rate

HR(0.9)

Read Cache OPS

Hit Miss u=0.9 Flash 
 Cache High

slide-14
SLIDE 14

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Read Hit Rate Function
  • HDD Cost Model
  • Flash Cache Cost Model
  • Finding Optimal Point

14

Hybrid Read Cost Model

CHR(u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u)

Flash Cache Read HDD Read + Flash Cache Write HR(u)

slide-15
SLIDE 15

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • HDD I/O requires positioning cost + bus transfer cost [Hylog]

§ HDD Read: CDR = CD_RPOS + P/B § HDD Write: CDW = CD_WPOS + P/B

  • Independent from u

HDD Read Cache OPS

u 1-u Hit Miss

15

HDD Cost Model

Notation Description CD_RPOS Read positioning Cost CD_WPOS Write positioning Cost P Page size (in bytes) B Bandwidth Read

slide-16
SLIDE 16

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Read Hit Rate Function
  • HDD Cost Model
  • Flash Cache Cost Model

§ Read Cost Model § Write Cost Model

  • Finding Optimal Point

16

Hybrid Read Cost Model

CHR(u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u)

Flash Cache Read CDR + Flash Cache Write HR(u)

slide-17
SLIDE 17

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Hit request requires flash page read: CPR

§ Near constant cost (e.g., 25us) § Regardless of garbage collection cost § Independent from u

Flash Cache Read Cost Model

17

Read Cache OPS

u 1-u Hit Miss

Flash Read

HDD

slide-18
SLIDE 18

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Read Hit Rate Function
  • HDD Cost Model
  • Flash Cache Cost Model

§ Read Cost Model § Write Cost Model

  • Finding Optimal Point

18

Hybrid Read Cost Model

CHR(u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u)

CPR CDR + Flash Cache Write HR(u)

slide-19
SLIDE 19

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Miss request requires flash page write: CPW(u)

§ Write cost + GC cost(u) § GC cost(u) varies depending on u [LFS, Janus-FTL]

§ As u increases, GC cost(u) increases CPW(u) increases

Flash Cache Write Cost Model

19

Read Cache OPS

u 1-u Hit Miss

Flash 
 Write

HDD

CPW (u) = CGC(u) (1−u)⋅ NP +CPROG CGC(u) = u⋅ NNP ⋅CCP +CE

Detailed Derivation See the paper for derivation

slide-20
SLIDE 20

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Read Hit Rate Function
  • HDD Cost Model
  • Flash Cache Cost Model
  • Finding Optimal Point

20

Hybrid Read Cost Model

CHR(u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u)

CHR(u) = HR(u) * CPR + (1-HR(u)) * (CDR+CPW(u))

Derive

slide-21
SLIDE 21

10th USENIX Conference on File and Storage Technologies (FAST’12) (b) Read access cost

  • 3. Find Optimal Point

Optimal Point u=0.92 21

Finding Optimal Point

(a) Read hit ratio

  • 1. Observe Hit Ratio
  • 2. Calculate for all values of u

CHR(u) = HR(u) * CPR + (1-HR(u)) * (CDR+CPW(u))

Partition based on optimal u = 0.92

Flash Cache: e.g., 4GB

OPS
 0.32GB

Caching Space
 3.68GB

  • 4. Adjust
slide-22
SLIDE 22

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • CHY(u, r) represents expected I/O cost based on u and r

§ Caching space divided into read and write spaces based on r § r is fraction of read space in caching space (e.g., 0 ≤ r ≤ 1.0) § Modification: CHR(u) CHR(u, r), CHW(u) CHW(u, r)

  • Used to find optimal values: u and r

22

Hybrid Cost Model: Distinguishing Read and Write

Hybrid Cost Model: CHY(u, r)

Hybrid Read 
 Cost Model: CHR(u, r) Hybrid Write 
 Cost Model: CHW(u, r)

Read OPS Write r 1-r u 1-u

See the paper 
 for derivation

slide-23
SLIDE 23

10th USENIX Conference on File and Storage Technologies (FAST’12) 23

Calculate Hybrid Cost Model

CHR(u,r) = HR(u,r)⋅CPR +(1− HR(u,r))⋅(CDR +CPW (u))

CHW (u,r) = HW (u,r)⋅CWH +(1− HW (u,r))⋅(CPR +CDW +CPW (u))

W HW R HR HY

IO r u C IO r u C r u C ⋅ + ⋅ = ) , ( ) , ( ) , (

Hybrid Cost: Hybrid Read Cost: Hybrid Write Cost:

  • 2. Calculate based on u and r

(a) Read hit ratio (b) Write hit ratio

  • 1. Observe Hit Ratio
  • 3. Draw Access Cost Graph

(c)Expected access cost Better

slide-24
SLIDE 24

10th USENIX Conference on File and Storage Technologies (FAST’12) 24

Optimal Partitioning Algorithm with Hybrid Cost Model

  • p_u
  • p_r
  • Periodically Execute


Optimal Partitioning Algorithm

4:

for u ← step; u < 1.0; u ← u+step do

5:

for r ← 0.0; r ≤ 1.0; r ← r +step do

6:

cur cost ← CHY (u, r)

7:

if cur cost < op cost then

8:

  • p cost ← cur cost

9:

  • p u ← u, op r ← r

10:

end if

11:

end for

12:

end for

13:

ADJUST CACHE SIZE(op u, op r)

14: end procedure

Read
 0.64GB

OPS
 1.44GB

Write
 1.92GB

Flash Cache: e.g., 4GB

  • p_u = 0.64
  • p_r = 0.25

0.36 0.75

  • Adjust Flash Cache partition

                       

Optimal Point
 at op_u=0.64,


  • p_r=0.25
  • Find u and r resulting in


Optimal I/O Cost

u r

slide-25
SLIDE 25

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Introduction
  • Hybrid Cost Model
  • Implementation
  • Evaluation
  • Conclusion

25

Outline

slide-26
SLIDE 26

10th USENIX Conference on File and Storage Technologies (FAST’12) 26

Optimal Partitioning Flash Cache Layer (OP-FCL)

HDD

Flash Cache

I/O request arrives Page Replacer Cache Miss Cache Hit

Read LRU Write LRU

Mapping Manager

Translation Table Logical to
 Physical

If identify, go to HDD

  • Seq. I/O Detector

If non-seq. I/O, go to Flash Cache Workload Tracker Hit Curves Partition Resizer Workload 
 Dependent 
 Optimal 
 Partitioning Periodically Execute Shrink Enlarge

slide-27
SLIDE 27

10th USENIX Conference on File and Storage Technologies (FAST’12) 27

Adapt to Workload Pattern

Read OPS Write

u Read Hit u Write Hit Flash 
 Cache Invalidate Destage u Read Hit u Write Hit Workload changes Resize Enlarge u Read Hit u Write Hit Workload changes Resize

slide-28
SLIDE 28

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Introduction
  • Hybrid Cost Model
  • Implementation
  • Evaluation
  • Conclusion

28

Outline

slide-29
SLIDE 29

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Hybrid Storage Simulator

§ CMU DiskSim 4.0 and MSR SSD extension

  • Flash Cache Layers (FCLs)

§ Fixed Partitioning (FP-FCL) - Fixed size OPS


  • Typical SSD product

§ Read Write (RW-FCL) - Fixed size OPS


  • Distinguishes read and write

§ Optimal Partitioning (OP-FCL) – Dynamically adjusted 


  • based on workload
  • Configurations

§ Config. 1: 4GB flash cache + 10K RPM HDD § Config. 2: 16GB flash cache + three 10K RPM HDDs

29

Evaluation Setup

slide-30
SLIDE 30

10th USENIX Conference on File and Storage Technologies (FAST’12)

Financial [UMass] with Config. 1

§ Random write dominant § OLTP application running at a financial institutions

Search Engine [UMass] with Config. 1

§ Random read dominant § Web search engine

Exchange [SNIA] with Config. 2

§ Random read/write mixed § Microsoft employee e-mail server Home [FIU] with Config. 1

§ Development, testing, and plotting in NFS Server

MSN [SNIA] with Config. 2

§ MSN storage back-end file store

30

Workload Traces

slide-31
SLIDE 31

10th USENIX Conference on File and Storage Technologies (FAST’12) 31

Response Time Results

0.2 0.4 0.6 0.8 1 1.2 20 40 60 80 100 Mean Resp. Time (ms) Caching Space (%) in SSD FP-FCL RW-FCL OP-FCL 2 4 6 8 10 12 14 20 40 60 80 100 Mean Resp. Time (ms) Caching Space (%) in SSD FP-FCL RW-FCL OP-FCL 2 4 6 8 10 12 14 20 40 60 80 100 Mean Resp. Time (ms) Caching Space (%) in SSD FP-FCL RW-FCL OP-FCL

(a) Financial (b) Search Engine (c) Exchange

  • OP-FCL shows near-optimal performance
  • Optimal performance depends on workload characteristics
slide-32
SLIDE 32

10th USENIX Conference on File and Storage Technologies (FAST’12) 32

Response Time Results

0.2 0.4 0.6 0.8 1 1.2 20 40 60 80 100 Mean Resp. Time (ms) Caching Space (%) in SSD FP-FCL RW-FCL OP-FCL 2 4 6 8 10 12 14 20 40 60 80 100 Mean Resp. Time (ms) Caching Space (%) in SSD FP-FCL RW-FCL OP-FCL 2 4 6 8 10 12 14 20 40 60 80 100 Mean Resp. Time (ms) Caching Space (%) in SSD FP-FCL RW-FCL OP-FCL

(a) Financial (b) Search Engine (c) Exchange

  • OP-FCL shows near-optimal performance
  • Optimal performance depends on workload characteristics

50% 95% 70%

slide-33
SLIDE 33

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • OP-FCL dynamically adjusts cache spaces according to workloads
  • Financial and Exchange

§ Considerable OPS is used to lower garbage collection cost

  • Search Engine

§ Most caching space is used to maintain read data

33

Dynamic Adjustment

1 2 3 4 Cache Size (GB) Logical Time 1 2 3 4 Cache Size (GB) Logical Time 2 4 6 8 10 12 14 16 Cache Size (GB) Logical Time

(a) Financial (b) Search Engine (c) Exchange OPS Write Read OPS Read OPS Write Read

slide-34
SLIDE 34

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • OP-FCL dynamically adjusts cache spaces according to workloads
  • Financial and Exchange

§ Considerable OPS is used to lower garbage collection cost

  • Search Engine

§ Most caching space is used to maintain read data

34

Dynamic Adjustment

1 2 3 4 Cache Size (GB) Logical Time 1 2 3 4 Cache Size (GB) Logical Time 2 4 6 8 10 12 14 16 Cache Size (GB) Logical Time

(a) Financial (b) Search Engine (c) Exchange OPS Write Read OPS Read OPS Write Read

slide-35
SLIDE 35

10th USENIX Conference on File and Storage Technologies (FAST’12) 35

Effect on Lifetime of Flash Cache

2 4 6 8 10 12 14 20 40 60 80 100 Average Erase Count Caching Space (%) in SSD FP-FCL RW-FCL OP-FCL 1 2 3 4 5 20 40 60 80 100 Average Erase Count Caching Space (%) in SSD FP-FCL RW-FCL OP-FCL 20 40 60 80 100 120 20 40 60 80 100 Average Erase Count Caching Space (%) in SSD FP-FCL RW-FCL OP-FCL

(a) Financial (b) Search Engine (c) Exchange

  • Lifetime of flash cache is an important issue
  • Optimal point of lifetime differs from that of performance
  • Our focus is to improve the performance of flash cache
  • Optimizing lifetime of flash cache left as future work

Lifetime
 Optimal Performance
 Optimal

slide-36
SLIDE 36

10th USENIX Conference on File and Storage Technologies (FAST’12)

  • Trade-off exists

§ Caching benefit vs update cost

  • We proposed OP-FCL for Hybrid Storage Systems

§ Use workload dependent cost model § Adjust read, write, and OPS sizes based on proposed cost model § Show near-optimal performance compared to others

  • Future direction

§ Develop better destaging and replacement algorithm § Make SSD lifetime aware hybrid storage system

36

Conclusion

slide-37
SLIDE 37

10th USENIX Conference on File and Storage Technologies (FAST’12) 37

Yongseok Oh Jongmoo Choi Donghee Lee Sam H. Noh

Hongik University samhnoh@hongik.ac.kr

University of Seoul

{ysoh,dhl_express}@uos.ac.kr

Dankook University

choijm@dankook.ac.kr

Caching less for better performance: Balancing cache size and

update cost of flash memory cache in hybrid storage systems