HotStorage'20 Embedded System Lab. A New LSM-style Garbage Collection Scheme for ZNS SSDs Gunhee Choi, Kwanghee Lee, Myunghoon Oh and Jongmoo Choi from Dankook University Jhuyeong Jhin and Yongseok Oh from SK hynix 12 th USENIX Workshop on Hot Topic in Storage and File System (HotStorage 20), 2020 2020. 07. 13 Presentation by Choi, Gunhee choi_gunhee@dankook.ac.kr
Embedded System Lab. Content 1. Zoned Namespace SSD 2. Motivation 3. LSM-ZGC Design 4. Evaluation 5. Conclusions - Appendix 2 HotStorage'20
1. Zoned Namespace SSD Embedded System Lab. • What are Next Generation SSDs? Open-Channel SSD Key-Value SSD vs. Traditional SSD Zoned Namespace SSD Optane SSD HotStorage'20 3
1. Zoned Namespace SSD Embedded System Lab. • What is ZNS SSD? Traditional SSD Zoned Namespace SSD LBA space LBA space … Zone 1 Zone 2 Zone 3 NAND NAND ü Benefits Better performance and WAF by distributing different workloads into different zones • Better isolation (IO Determinism) • Reduce DRAM usage and Over-provisioning area in SSDs • HotStorage'20 4
1. Zoned Namespace SSD Embedded System Lab. • What are the issues of ZNS SSD? ü Sequential write constraint: writes need to be conducted in a sequential manner, like the SMR drives. ü Host needs to control zones directly such as zone open, close, reset and zone garbage collection. Host Zone App 1 App 1 Block device FTL absence Writing Unable to write Write progress direction Pointer ZNS SSD Controller until zone reset Zone 1 Zone 2 … Zone N Sequential write constraint Host Needs to handle zone controls HotStorage'20 5
2. Motivation Embedded System Lab. • How much is the Zone Garbage Collection (hereafter ZGC) overhead? ü Using real ZNS SSD prototype ü Zone size: 1GB (note that the typical segment size in LFS is 2MB) SK Hynix Prototype ZNS SSD Ref : https://news.skhynix.co.kr/1915 HotStorage'20 6
2. Motivation Embedded System Lab. Basic Zone Garbage Collection (Basic_ZGC) Memory Zone Bitmap Step 1. Zone 0 Select a candidate zone (Greedy or CB) … Zone 100 … HotStorage'20 7
2. Motivation Embedded System Lab. Basic Zone Garbage Collection Memory Step 2. Zone Find out valid blocks Bitmap using a zone bitmap Step 1. Zone 0 Select a candidate zone (Greedy or CB) … Zone 100 … HotStorage'20 8
2. Motivation Embedded System Lab. Basic Zone Garbage Collection Memory Step 2. Zone Find out valid blocks Bitmap using a zone bitmap Step 1. Zone 0 Select a candidate zone (Greedy or CB) Step 3. Read valid data in 4KB (or larger) I/O size … Zone 100 … HotStorage'20 9
2. Motivation Embedded System Lab. Basic Zone Garbage Collection Memory Step 2. Zone Find out valid blocks Bitmap using a zone bitmap Step 1. Zone 0 Select a candidate zone (Greedy or CB) Step 3. Read valid data in 4KB (or larger) I/O size … Step 4. Write data in 4KB (or larger) I/O size Zone 100 … HotStorage'20 10
2. Motivation Embedded System Lab. Basic Zone Garbage Collection Memory Step 2. Zone Find out valid blocks Bitmap using a zone bitmap Step 1. Zone 0 Select a candidate zone (Greedy or CB) Step 3. Read valid data in 4KB (or larger) I/O size … Step 4. Write data in 4KB (or larger) I/O size Zone 100 Step 5. Reset the selected zone … HotStorage'20 11
2. Motivation Embedded System Lab. Observation 1: Zone garbage collection overhead • Zone : 1GB • Block : 4KB HotStorage'20 12
2. Motivation Embedded System Lab. Observation 1: Zone garbage collection overhead 18 times! • Zone : 1GB • Block : 4KB 5 times! ☞ Motivation 1: reducing utilization of a candidate zone is indispensable HotStorage'20 13
2. Motivation Embedded System Lab. Observation 2: I/O size for Read/Write • Another feature of ZNS SSD ü A zone is, in general, mapped into multiple channels/ways. • Then, how about read/write data in a larger I/O size (e.g. 128KB)? HotStorage'20 14
2. Motivation Embedded System Lab. Observation 2: I/O size for Read/Write 11 Times! ☞ Motivation 2: accessing in a larger I/O size is beneficial in ZNS SSDs HotStorage'20 15
3. LSM-ZGC Design Embedded System Lab. So, Our ideas are 1) Make the utilization of a candidate zone low 2) Access data in a larger I/O size • How to access data in a larger I/O size? ü The coexistence of valid and invalid data makes it difficult ü Read not only valid but also invalid data in a larger I/O size • How to make the utilization of a candidate zone low? ü Traditional hot/cold separation is not applicable in ZNS SSDs since zone is quite big ü Employ the segment concept for finer-grained hot/cold separation HotStorage'20 16
3. LSM-ZGC Design Embedded System Lab. • Two management units ü Zone: for garbage collection vs. Segment: for hot/cold separation ü A zone is divided into multiple segments (1GB vs. 2MB in this study) • Segment state and transition rule (refer to our paper for details) ü New data è C0 ü During ZGC, survived data from C0 Data in a high utilized segment ( > threshold cold ): cold è C1C § Others: hot (or unknown) è C1H § Reasoning: spatial locality, also observed in previous studies such as F2FS (FAST’15), § Multi-stream (FAST’19), Key-range locality (FAST’20) ü During ZGC, survived data from C1C or C1H (second survived data) è C2 HotStorage'20 17
3. LSM-ZGC Design Embedded System Lab. LSM(Log Structured Merge) Zone GC Zone … Bitmap Step 1. Zone 0 C0_zone Select a candidate zone (or zones, Greedy or CB) Zone 1 Zone 2 Zone 3 … Zone N-1 C1H_zone Zone N C1C_zone HotStorage'20 18
3. LSM-ZGC Design Embedded System Lab. LSM(Log Structured Merge) Zone GC Zone … Bitmap Step 1. Zone 0 C0_zone Select a candidate zone (or zones, Greedy or CB) Step 2. Zone 1 Read all data in 128KB I/O size … Zone 2 … … … Zone 3 2MB 2MB 2MB … Zone N-1 C1H_zone Zone N C1C_zone HotStorage'20 19
3. LSM-ZGC Design Embedded System Lab. LSM(Log Structured Merge) Zone GC Zone … Bitmap Step 3-1. Step 1. Zone 0 C0_zone Check valid data Select a candidate zone (or zones, Greedy or CB) Step 2. Step 3-2. Zone 1 Read all data in 128KB I/O size Identify Hot/Cold segment … Zone 2 … … … Zone 3 2MB 2MB 2MB … Zone N-1 C1H_zone Zone N C1C_zone HotStorage'20 20
3. LSM-ZGC Design Embedded System Lab. LSM(Log Structured Merge) Zone GC Zone … Bitmap Step 3-1. Step 1. Zone 0 C0_zone Check valid data Select a candidate zone (or zones, Greedy or CB) Step 2. Step 3-2. Zone 1 Read all data in 128KB I/O size Identify Hot/Cold segment … Zone 2 … … … Zone 3 2MB 2MB 2MB … Step 4. Merge valid data only … Hot Segment according to hot/cold Zone N-1 C1H_zone … Cold Segment Zone N C1C_zone 2MB 2MB HotStorage'20 21
3. LSM-ZGC Design Embedded System Lab. LSM(Log Structured Merge) Zone GC Zone … Bitmap Step 3-1. Step 1. Zone 0 C0_zone Check valid data Select a candidate zone (or zones, Greedy or CB) Step 2. Step 3-2. Zone 1 Read all data in 128KB I/O size Identify Hot/Cold segment … Zone 2 … … … Zone 3 2MB 2MB 2MB … Step 4. Step 5. Merge valid data only Write data in 128KB I/O size … Hot Segment according to hot/cold Zone N-1 C1H_zone … Cold Segment Zone N C1C_zone 2MB 2MB HotStorage'20 22
4. Evaluation Embedded System Lab. Garbage collection overhead: uniform update pattern Average of 1.9 times Max of 2.3 times Experimental environment Intel Core i7 (8 core) • 16GB DRAM • 1TB ZNS SSD • Size of Zone : 1GB • HotStorage'20 23
4. Evaluation Embedded System Lab. Garbage collection overhead: skewed update pattern Average of 1.4 times Max of 1.6 times LSM_ZGC Basic_ZGC 50 Garbage collection time (sec) Parameters 40 Workload: 70/30 hot/cold ratio • 30 Threahold cold : 0.8 • average utilization: x-axis • 20 10 Experimental environment Intel Core i7 (8 core) • 0 16GB DRAM • 0.5 0.6 0.7 0.8 0.9 1TB ZNS SSD • Utilization Size of Zone : 1GB • HotStorage'20 24
4. Evaluation Embedded System Lab. Parameters Workload: 70/30 hot/cold ratio • Hot/Cold Separation Threahold cold : 0.8 • Average utilization: 0.6 • ü Without hot/cold separation Garbage Collection Count : 100 Garbage Collection Count : 500 Garbage Collection Count : 900 300 140 120 120 250 100 100 200 80 80 Count Count Count 150 60 60 100 40 40 50 20 20 0 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Utilization Utilization Utilization ü With hot/cold separation Garbage Collection Count : 100 Garbage Collection Count : 900 Garbage Collection Count : 500 250 250 180 160 200 200 140 120 150 150 Count Count Count 100 80 100 100 60 40 50 50 20 0 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Utilization Utilization Utilization HotStorage'20 25
Recommend
More recommend