Presentation is loading. Please wait.

Presentation is loading. Please wait.

Speaker: 吳晋賢 (Chin-Hsien Wu) Embedded Computing and Applications Lab Department of Electronic Engineering National Taiwan University of Science and Technology,

Similar presentations


Presentation on theme: "Speaker: 吳晋賢 (Chin-Hsien Wu) Embedded Computing and Applications Lab Department of Electronic Engineering National Taiwan University of Science and Technology,"— Presentation transcript:

1 Speaker: 吳晋賢 (Chin-Hsien Wu) Embedded Computing and Applications Lab Department of Electronic Engineering National Taiwan University of Science and Technology, Taipei, Taiwan Slide 1 B-Tree Structures over Flash Memory

2 Outline Slide 2 Introduction Flash Memory Characteristics Efficient B-Tree Index Structures over Flash Memory Conclusion

3 Introduction Slide 3 Storage Systems Embedded Systems or General Operating Systems File Systems An interface for information retrieval and access. Physical Devices A persistent (non-volatile) storage. Benefits of Flash Memory as Storage Systems Shock Resistant No mechanical gadgets. Non-Volatile Persistent across power-failures. Power Economic Relatively to hard-disks. Flash Memory is a good storage device for storage systems!

4 Introduction Slide 4 Small updates could deteriorate flash-memory storage systems. B-Tree index structures over flash memory. We aim at resolving these issues over flash memory storage systems!

5 Outline Slide 5 Introduction Flash Memory Characteristics Efficient B-Tree Index Structures over Flash Memory Conclusion

6 Organization of a Typical NAND Flash Memory Erase a block time (2ms) > Write a page time (200us) > Read a page time (50us) Slide 6 … Block 0 Block 1 Block 2 Block 3 Erase one block 1 Page = 512B + 16B 1 Block = 32 pages … Read/Write one page Flash Memory Characteristics 512B 16B User Area Spare Area

7 Example 1: Out-place Update Slide 7 Live pages Free pages ABCD Suppose that we want to update data A and B… Flash Memory Characteristics

8 Slide 8 Dead pages ABCDAB Example 1: Out-place Update

9 Example 2: Garbage Collection Slide 9 A live page A dead page A free page This block is to be recycled. (3 live pages and 5 dead pages) LDDLDDLD LLDLLLFD LFLLLLDF FLLFLLFD Flash Memory Characteristics

10 Example 2: Garbage Collection Slide 10 LLDLLLD LFLLLLD LLFLLFD L L DDDD A live page A dead page A free page Live data are copied to somewhere else. L DDDD Flash Memory Characteristics

11 Example 2: Garbage Collection Slide 11 A live page A dead page A free page The block is then erased. Overheads: live data copyinglive data copying block eraseing.block eraseing. LLDLLLD LFLLLLD LLFLLFD L L FFFFFFFF L Flash Memory Characteristics

12 Example 3: Wear-Leveling: Each block has an individual limit on the erase cycle count. The limit ≦ 1,000,000 under the current technology Slide 12 LDDLDDLD LLDLLLFD LFLLLLDF FLLFLLFD 100 10 20 15 Erase cycle counts Wear-leveling might interfere with the decisions of the block-recycling policy. A live page A dead page A free page A B C D Flash Memory Characteristics

13 Slide 13

14 Flash Memory Characteristics Slide 14 Flash Translation Layer (FTL)

15 Outline Slide 15 Introduction Flash Memory Characteristics Efficient B-Tree Index Structures over Flash Memory Conclusion

16 Why Research On Index Structures Over Flash Memory ? Slide 16 Now, a 16G bit NAND flash-memory chip (SAMSUNG K9WAG08U1M flash memory chips) is available in the market. Flash memory could be considered as an alternative to hard disks in many applications. The implementation of index structures, which are very popular in the organization of data on disks, must be considered regarding flash memory.

17 Efficient B-Tree Index Structures over Flash Memory Slide 17 B-Tree B-Tree is one of the most popular data structures adopted by database applications or databases systems (such as IBM DB2, Informix, Microsoft SQL Server, Oracle 8, and Sybase ASE), or even many well-known journaling file systems (such as XFS, JFS, and ReiserFS *) The implementation of B-Tree index structures, which provide efficient data access on disks, must be considered regarding flash memory.

18 Efficient B-Tree Index Structures over Flash Memory Motivation Slide 18 A B-Tree Example

19 Efficient B-Tree Index Structures over Flash Memory Slide 19 Motivation For disk storage systems: A B-Tree node occupies a fixed number of sectors. Large chunks are fetched from/committed to disks. It is very efficient for disk storage systems to do this. For flash-memory storage systems: Intensively byte-wise operations are needed for B-Tree. A page must be written even if few bytes are modified. Free space is consumed very quickly due to the adoption of out-place updates. Garbage collection will be triggered frequently, and the lifetime of flash memory is reduced severely.

20 Efficient B-Tree Index Structures over Flash Memory Slide 20 Flash Translation Layer (FTL) 202585 I1I2I3 Index Unit 180185250 I4I6I5 Sector 1 Sector 2

21 Efficient B-Tree Index Structures over Flash Memory Index Units vs. B-Tree Nodes Slide 21 Flash Translation Layer (FTL) 202585 I1I1 I2I2 I3I3 Inde x Unit 180185250 I4I4 I6I6 I5I5 Sector 1 Sector 2

22 Efficient B-Tree Index Structures over Flash Memory Slide 22 The Commit Policy Flash Translation Layer (FTL) 202585 I1I1 I2I2 I3I3 Ind ex Unit 180185250 I4I4 I6I6 I5I5 Sector 1 Sector 2 Suppose that a sector can store up to 3 index units The technical issue is to minimize the number of sectors written to store the committed index units. The problem of packing index units into sectors that is reduced from the Bin-Packing problem is NP-Hard. A FIRST-FIT approximation algorithm was adopted in our experiments. 202585 I1I2I3 Index Unit: 180185250 I4I6I5 Sector 1 Sector 2 DFHIJ Node: Sector:

23 Efficient B-Tree Index Structures over Flash Memory Slide 23 The Node Translation Table To construct node C, BFTL reads and parses sectors whose addresses’ are 23 and 100 To prevent the lists from being too long, the lists should be compacted when needed. To prevent the lists from being too long, the lists should be compacted when needed.

24 Efficient B-Tree Index Structures over Flash Memory Slide 24 Performance Evaluation Experimental Setup Flash-memory environments A 4MB NAND flash memory. The greedy block-recycling policy in garbage collection. B-Tree environments The fan-out of was 21. The size of a B-Tree node fitted in a sector (512 bytes). Other parameters The reservation buffer was configured to hold up to 60 records. The bound of the lengths of lists in the node translation table was set as 4.

25 Efficient B-Tree Index Structures over Flash Memory Slide 25 Experimental Results Performance Metrics Average response time. Number of pages read and written. Number of blocks erased. Number of executions of the compact function

26 Efficient B-Tree Index Structures over Flash Memory Slide 26 Average Response Time of Insertions after Inserting 30,000 Records Rs: To control the distribution of the values of the inserted keys. Rs 1 Sequential 0 Random

27 Efficient B-Tree Index Structures over Flash Memory Slide 27 Number of Pages Written after Inserting 30,000 Records

28 Efficient B-Tree Index Structures over Flash Memory Slide 28 Number of Pages Read after Inserting 30,000 Records

29 Efficient B-Tree Index Structures over Flash Memory Slide 29 Number of Blocks Erased after Inserting 30,000 Records

30 Efficient B-Tree Index Structures over Flash Memory Slide 30 Number of Executions of Compact Function after Inserting 30,000 Records

31 Efficient B-Tree Index Structures over Flash Memory Slide 31 Average Response Time under different Ratios of Deletions to Insertions

32 Efficient B-Tree Index Structures over Flash Memory Slide 32 Number of Blocks Erased under different Ratios of Deletions to Insertions

33 Conclusion Slide 33 Index structures usually cause intensively find- grained updates which could damage the performance and the reliability of flash memory. An Efficient B-Tree implementation is proposed to resolve the confliction between page-based operations and intensive byte-wise updates. Performance and reliability of flash memory could be greatly improved.

34 Q & A Slide 34 Thank You Q & A


Download ppt "Speaker: 吳晋賢 (Chin-Hsien Wu) Embedded Computing and Applications Lab Department of Electronic Engineering National Taiwan University of Science and Technology,"

Similar presentations


Ads by Google