16
Embedded Systems Design: Lab #2 SSD Firmware Implementation Project Lab. #2 SangPhil Lim ([email protected]) SKKU VLDB Lab. 20110331

SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embed Size (px)

Citation preview

Page 1: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

SSD Firmware Implementation Project‐ Lab. #2 ‐

Sang‐Phil Lim ([email protected])SKKU VLDB Lab.

2011‐03‐31

Page 2: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Lab. Time Schedule

Lab. Title#1 FTL Simulator Development Guide#2 FTL Simulation Guide#3 Project 1 Presentation#4 Jasmine OpenSSD platform tutorial #1#5 Jasmine OpenSSD platform tutorial #2#6 FTL Porting Guide#7 Firmware Debugging Guide#8 SSD Performance Evaluation Guide#9 Project 2 Presentation

Page 3: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Contents

• Introduction of example FTL• FTL simulation guide• FTL & Workload• Sample workload pattern observation

Page 4: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Example FTL ‐ Greedy

• Simple FTL scheme is implemented in an FTL simulator– Page mapping FTL– Garbage collection policy: Greedy

• That is “Select a victim block which contains minimum valid pages”

• To reduce average GC overhead

Page 5: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Example FTL ‐ Greedy

• Data structure– Page‐level mapping table

• For address mapping• struct pagemap (map.c)

– Bit‐map table• For victim block selection• struct bitmap (bitmap.c)

– Misc. metadata • for GC/page_alloc• struct vm (vm_ftl.c)

LPN PPN

0 100

1 20

... ...

PPN validity

0 Set

1 Unset

... ...

Page 6: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Example FTL ‐ Greedy

• Write operation (ftl_write() in ftlsimple.c)

Read‐modify‐write(if not a full page write)

Allocate free page

Invalidate old page

Update mapping table

GC start(if free block < MAX_FREE_BLKS)

Per‐page processing

Write new data

Page 7: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Example FTL ‐ Greedy

• Garbage collection (vm_gc_start() in vm_ftl.c)

while(vm.fb_num < MIN_FREE_BLKS+GC_BLKS)

MIN_FREE_BLKSVictim

GC #1

Block erase

Page 8: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

FTL Simulation Guide

1. Configure NAND flash– TOTALSIZE_GB = 32 (but, for Financial1.diskmon = 1)– EXTRABLKS = 1~32% of TOTALSIZE_GB (increasing by a factor of 2)

2. Fill up ‘user space’ with valid data before simulation– Call warm_all()

3. Aging NAND flash sufficiently– Write data at least 2 times larger than provisioning space– Ex. Total write req. of workload = 2GB, provisioning space = 2GB, then.. $ sim trace_file 3

Page 9: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

FTL Simulation Guide

• Write cliff

Start point of GC

Append only data to free space

Aging period is mandatory for observing actual performance behavior of FTL

Page 10: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

FTL & Workload

• Most of cases, write pattern of workload can significantly impact on an FTL performance– Research goal: “Toward for a Holy‐grail FTL”

EmbeddedApp.

PC/LaptopApp.

FTLScheme

?

Enterprise‐classApp.

SSDFTL

Scheme?

WorkloadC

Holy‐grailFTL

Page 11: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

FTL & Workload

• Impact factors to determine FTL performance– Spatial/Temporal locality– Alignment/Granularity– Range/Order/Interval– Read‐Write ratio– Etc.

Matias Bjørling, Philippe Bonnet, Luc Bouganim, Björn Þór Jónsson: uFLIP: Understanding the Energy Consumption of Flash Devices. IEEE Data Eng. Bull. 33(4): 48‐54 (2010)

More info...

Page 12: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Sample Workload Pattern

• Web32G_NTFS.diskmon • General32G_NTFS.diskmon

Page 13: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Sample Workload Pattern

• ss_pc3.diskmon

Page 14: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Sample Workload Pattern

• Financial1.diskmon • tpcc.diskmon

Page 15: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Notice for Lab #3

• In next Lab. – “Project #1 presentation” – Describe FTL implementation in detail

• Including some optimization ideas

– Analyze your simulation results for each given workload

• Performance implication

Page 16: SSD Firmware Project #2 - AndroBenchcsl.skku.edu/uploads/ICE3028S11/lab2.pdf · SSD Firmware Implementation Project ... #3 Project 1 Presentation ... #8 SSD Performance Evaluation

Embedded Systems Design: Lab #2

Any Questions?