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 � Hongik University � {ysoh,dhl_express}@uos.ac.kr choijm@dankook.ac.kr samhnoh@hongik.ac.kr 1
Hybrid Storage Systems • 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 � Hybrid Storage System � SSD HDD + High performance � Large Capacity � Low power consumption Low cost � � 2 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Important Characteristics of Flash based SSDs • 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 � Fixed Size OPS � Caching OPS � Space � Flash based SSD � 3 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Our Goal: Find Optimal OPS Size Overall cost � ( e.g., response time of hybrid storage ) � Performance � Point of Optimal Performance � Cache (Our Goal) � miss rate � GC cost � Over-Provisioned More Less � Space Caching Caching OPS � OPS � Space � Space � 4 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Workload Dependent Optimal Partitioning Idea � Perf. � Hit � Workload Dependent Cachi OPS � ng Optimal Partitioning � Space � Flash Cache Caching Space Size � Optimal OPS size changes � Caching Space � OPS � Flash Cache Perf. � Hit � Caching HDD � OPS � Space � Proposed Hybrid Storage � Flash Cache Caching Space Size � • 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 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Outline • Introduction � • Hybrid Cost Model � • Implementation � • Evaluation � • Conclusion � 6 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
OS 101: Access Cost Model (ACM) C ACM = Hit Rate x Cache Cost + (1-Hit Rate) x Miss Penalty � Expected I/O cost � Request � Hit � Miss � Buffer Cache Capacity � Performance � HDD � Storage Hierarchy � 7 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Hybrid Storage: Access Cost Model C ACM (u)= Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u) � Request � Hit � Miss � u � 1-u � Flash Caching Space OPS Cache � HDD � • C ACM (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 � 8 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Overview of Hybrid Cost Model • 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 � Hybrid Cost Model � Hybrid Read Hybrid Write Cost Model � Cost Model � Flash Read OPS Write � Cache � HDD � 9 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Overview of Hybrid Cost Model • 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 � Hybrid Cost Model � Hybrid Cost Model � Hybrid Read Hybrid Read Cost Model � Cost Model � Flash Read Read OPS OPS Write � Cache � HDD � HDD � 10 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
OPS Aware Hybrid Read Cost Model C HR (u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u) � Read Hit Rate � Flash Read � HDD Read + Flash Write � Hit � Miss � u � 1-u � Flash Read Cache OPS Maintain read data from HDD � Cache � HDD � • Requirements for derivation � § Read Hit Rate Function � § HDD Cost Model � § Flash Cache Cost Model � 11 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Hybrid Read Cost Model C HR (u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u) � Read Hit Rate � Flash Cache Read � HDD Read + Flash Cache Write � • Read Hit Rate Function � • HDD Cost Model � • Flash Cache Cost Model � • Finding Optimal Point � 12 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Read Hit Rate Function • Read Hit rate function: H R (u), miss rate: 1-H R (u) � § Related to workload pattern � § Depends on u � Hit � Miss � Hit Rate � Flash Low � OPS Read Cache Cache � H R (0.1) u � u=0.1 � Hit � Miss � Hit Rate High � Flash Read Cache OPS H R (0.9) Cache � u u=0.9 � 13 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Hybrid Read Cost Model C HR (u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u) � H R (u) � Flash Cache Read � HDD Read + Flash Cache Write � • Read Hit Rate Function � • HDD Cost Model � • Flash Cache Cost Model � • Finding Optimal Point � 14 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
HDD Cost Model • HDD I/O requires positioning cost + bus transfer cost [Hylog] � § HDD Read: C DR = C D_RPOS + P/B � Notation Description Read positioning Cost C D_RPOS § HDD Write: C DW = C D_WPOS + P/B � Write positioning Cost C D_WPOS • Independent from u � P Page size (in bytes) B Bandwidth Hit � Miss � u � 1-u � Read Cache OPS Read HDD � 15 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Hybrid Read Cost Model C HR (u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u) � H R (u) � Flash Cache Read � C DR + Flash Cache Write � • Read Hit Rate Function � • HDD Cost Model � • Flash Cache Cost Model � § Read Cost Model � § Write Cost Model � • Finding Optimal Point � 16 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Flash Cache Read Cost Model • Hit request requires flash page read: C PR � § Near constant cost (e.g., 25us) � § Regardless of garbage collection cost � § Independent from u � Hit � Miss � Flash Read � u � 1-u � Read Cache OPS HDD � 17 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Hybrid Read Cost Model C HR (u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u) � H R (u) � C PR � C DR + Flash Cache Write � • Read Hit Rate Function � • HDD Cost Model � • Flash Cache Cost Model � § Read Cost Model � § Write Cost Model � • Finding Optimal Point � 18 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Flash Cache Write Cost Model • Miss request requires flash page write: C PW (u) � § Write cost + GC cost(u) � § GC cost(u) varies depending on u [LFS, Janus-FTL] � § As u increases, GC cost(u) increases C PW (u) increases � Detailed Derivation � Hit � Miss � C GC ( u ) = u ⋅ N NP ⋅ C CP + C E Flash Write � C GC ( u ) u � 1-u � C PW ( u ) = + C PROG Read Cache OPS (1 − u ) ⋅ N P See the paper for derivation � HDD � 19 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Hybrid Read Cost Model C HR (u) = Hit Rate(u) x Flash Cache Cost(u) + (1-Hit Rate(u)) x Miss Penalty(u) � Derive � C HR (u) = H R (u) * C PR + (1-H R (u)) * (C DR +C PW (u)) � • Read Hit Rate Function � • HDD Cost Model � • Flash Cache Cost Model � • Finding Optimal Point � 20 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Finding Optimal Point 1. Observe Hit Ratio � 3. Find Optimal Point � Optimal Point � u=0.92 � (a) Read hit ratio (b) Read access cost 4. Adjust � Flash Cache: e.g., 4GB 2. Calculate for all values of u � Partition based on optimal u = 0.92 � C HR (u) = H R (u) * C PR + (1-H R (u)) * (C DR +C PW (u)) � OPS Caching Space 3.68GB 0.32GB 21 10 th USENIX Conference on File and Storage Technologies (FAST’12) �
Recommend
More recommend