An Efficient B-Tree Layer for Flash-Memory Storage Systems

Uploaded on


  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. An Efficient B-Tree Layer for Flash-Memory Storage Systems Chin-Hsien Wu, Li-Pin Chang, and Tei-Wei Kuo The 9th International Conference on Real-Time Computing Systems and Applications (RTCSA 2003), Tainan, Taiwan 2003 발표자 : 안성용
  • 2. Introduction
    • Flash Memory
      • considered as an alternative to replace hard disk
    • B-tree
      • one of the most popular index structures because of its scalability and efficiently
    • Objective
      • We propose a module over a traditional FTL to handle intensive byte-wise operations due to B-tree access
      • BFTL (efficient B-Tree layer for flash-memory storage systems)
  • 3. Background
    • Flash Memory
      • native file-system approach
        • directly manage raw flash memory
        • JFFS/JFFS2, LFM, YAFFS
      • block-device emulation approach
        • provide a transparent block-device emulation
        • FTL/FTL-Lite
  • 4. Background
    • Flash Memory (Con’t)
      • out-place update
        • could not be over-written unless it is erase first
      • garbage collection
        • to recycle dead pages scattered over blocks
      • were-leveling
        • each block could be erased for 1 million(10 6 ) times
  • 5. Background
    • B-tree
      • tree 에 있는 각 Node 는 최대 m 개 , 최소 (m/2) 개의 종속 tree 를 가져야 한다
      • 모든 leaf Node 는 같은 level 에 있어야 한다
      • Node 의 key 값의 개수는 종속 Tree 의 개수보다 하나 적으며 최소 (m/2)-1 개 , 최대 m-1 개이다 .
    internal node: ordered list of key and linkage point leaf node: key value and record pointer
  • 6. Problem Definition
    • On hard disk
      • we usually set the size of a B-Tree node as the size which can be efficiently handled by the used block device.
      • To insert, delete, and re-balance B-Trees, B-Tree nodes are fetched from the hard disk and then written back to the original location.
      • Such operations are very efficient for hard disks.
    • On Flash Memory
      • Updating (or writing) data over flash memory is a very complicated and expensive operation.
      • Since out-place update is adopted, a whole page (512B) which contains the new version of data will be written to flash memory
  • 7. The Design and Implementation of BFTL
    • Overview
      • BFTL sits between the application layer and the block-device emulated by FTL
  • 8. The Design and Implementation of BFTL
    • reservation buffer
      • temporarily hold the newly generated records ( dirty records )
      • record deletions are handled by adding “ invalidation records ” to the reservation buffer.
      • the dirty records should be timely flushed to flash memory
    • index units
      • When dirty records are flushed, BFTL constructed “ index units ” for each dirty record
      • reflect modification of the corresponding B-Tree node
      • data_ptr, parent_node, primary_key, left_ptr, right_ptr, identifier, op_flag
      • Many index units are packed into few sectors to reduce the number of pages physically written.
      • index units of one B-Tree node could now exist in different sectors.
  • 9. The Design and Implementation of BFTL
    • index units (Con’t)
      • B-Tree node could be logically constructed by collecting and parsing all relevant index units
      • A node translation table is adopted to handle the collection of index units.
  • 10. The Design and Implementation of BFTL
    • The node Translation Table
      • maps a B-Tree node to a collection of LBA’s where the related index units reside.
      • could be re-built by scanning the flash memory when system is powered-up
  • 11. The Design and Implementation of BFTL
    • The node Translation Table
      • system parameter C
        • number of items in a list cause low performance and space overhead
        • control the maximum length of the lists of the node translation table
        • When the length of a list grows beyond C , the list will be compacted.
      • To compact a list,
        • all related index units are collected into RAM and then written back to flash memory with a smallest number of sectors.
  • 12. The Design and Implementation of BFTL
  • 13. The Design and Implementation of BFTL
    • The Commit Policy
      • how to smartly pack index units into few sectors
        • many index units should be packed together in order to further reduce the number of sectors needed
        • we also hope that index units of the same B-Tree node will not be scattered over many sectors
      • The packing problem of index units into sectors is NP-Hard.
        • The intractability of the problem could be shown by a reduction from the Bin-Packing problem
  • 14. System Analysis
    • Suppose
      • n records are to be inserted.
      • let a B-Tree node fit in a sector (provided by FTL).
      • Let H denote the current height of the B-Tree
      • N split denote the number of nodes which are split during the handling of the insertions.
      • C : maximum length of the lists
    • number of sectors read
    • number of sectors read
  • 15. Performance Evaluation
    • Experiment Setup
      • 4MB NAND flash memory
      • greedy block-recycling policy
      • fanout of B-tree: 21
      • size of a B-Tree node fits in a sector.
      • reservation buffer size: 60 records
      • maximum length of the list: 3
      • a small amount of B-Tree nodes in the top levels were cached in RAM
      • ratio rs : control the value distribution of the inserted keys
  • 16. Performance Evaluation
    • Performance of B-Tree Index Structures Creation
      • insert 24000 records
  • 17. Performance Evaluation
    • Performance of B-Tree Index Structures Creation (Con’t)
  • 18. Performance Evaluation
    • Performance of B-Tree Index Structures Maintenance
      • 24000 operation
      • we varied the ratio of the number of deletions to the number of insertions. (50/50, 40/60, 30/70, 20/80,10/90)
  • 19. Performance Evaluation
    • Size of the reservation buffer
    • Energy Consumption
  • 20. Conclusion
    • Conclusion
      • Flash-memory storage systems are very suitable for embedded systems
      • we propose a methodology and a layer design to support B-Tree index structures over flash memory.
      • BFTL reduces the number of redundant data written to flash memory.
    • Future Work
      • How to manage data records and their index structures over huge flash memory