EE512 System Programming - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

EE512 System Programming

Description:

Metadata swapping. Swap out infrequent accessed segment when there is no free segment in PRAM. Swap in when segment in NAND is accessed. Virtual allocation ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 35
Provided by: core3
Category:

less

Transcript and Presenter's Notes

Title: EE512 System Programming


1
EE512 System Programming
Lecture 13 Flash Memory File Systems II
PFFSAn Efficient and Scalable Flash File System
with a Hybrid Storage of PRAM and NAND Flash
Memories Nov. 10 , 2009 Kyu Ho Park
(kpark_at_ee.kaist.ac.kr), Y. W. Park, S.H. Baek,
S.H. Lim, and C. LeeComputer Research
LaboratoryEECS, KAIST
2
Outline
  • NAND flash memory characteristics
  • NAND flash file systems
  • JFFS2, YAFFS2
  • CFFS
  • PFFS design and implementation
  • NAND vs. PRAM characteristics
  • PFFS design goal
  • PFFS implementation
  • Metadata separation
  • Virtual management of metadata
  • Evaluation
  • Conclusion

3
PFFS Design and Implementation
4
PFFS
  • Developed By CORE Lab. in 2007
  • Hybrid Architecture of PRAM and NAND flash memory
  • Design goal
  • Eliminating the scalability problems
  • No scanning Fixed time mounting
  • Never use main memory for metadata management
  • Increasing performance of flash file system
  • Minimize the metadata update performance
  • Increase the efficiency of garbage collection

5
PRAM and Flash Memory
6
HFFS for NOR-NANDCORE Lab.,2008
  • Storage architecture of sensor devices have flash
    memories.
  • MicroHash, ELF, JFFS2, YAFFS, CFFS use only NAND
    flash for data storage.
  • Application characteristics
  • Sensor and embedded devices perform frequent
    small appends.
  • Sensor devices suffer from uncertain power
    outages.

7
Hybrid Flash File System (HFFS)
  • Use a combination of NOR and NAND flash
  • Provide a single partition to applications
  • Basic Policy
  • Maintain large data and meta data in NAND flash
  • Merge small data in NOR flash.
  • Flush the merged data to NAND flash.

8
The merits of PRAM
  • Non-volatile, Byte addressable
  • Erase operation is not necessary
  • Fast read/write speed of byte level operations
  • In-place update
  • We can save and update the data in a fixed region
  • Long endurance
  • Coarse-grained wear-leveling technique is enough

9
NAND Flash file system with PRAM
Metadata, which includes Inode and directory
structure, is small size data that is frequently
updated and mostly needs byte level updates
NAND flash memory has many limitation and it is
bed to handle the metadata
PRAM is good for small size data that is
frequently updated
Use PRAM as metadata storage of NAND flash file
system!!
10
PFFS design
  • Store metadata in a fixed region of PRAM
  • No scanning overhead
  • All metadata updates are occurred in PRAM as byte
    level
  • No additional NAND page writes for metadata
    updates
  • Directory and file indexing structures are
    composed in PRAM
  • No main memory use for temporal metadata

11
Comparison Scalability
1. Accessing a file /dir/a.txt
YAFFS
CFFS
JFFS
PFFS
gt
1. Scan area comparison
gt
gt
Scan area
Non-scan area
12
Comparison Metadata updates
There is no NAND page write for metadata!!
13
PFFS layout and inode structure
File attributes
Directory entry
File data indexes
14
Directory structure of PFFS
  • Whole directory structure is saved in PRAM as
    linked lists
  • We can find the specific directory and file
    faster by hashing
  • Directory and file are sorted by this hash key

15
Indexing structure of PFFS
  • Similar with Ext2 indexing structure
  • However the direct and indirect indexing
    structures are constructed in PRAM
  • The double indirect indexing structures are
    stored in NAND flash memory
  • Direct index point out the data page of NAND
    flash memory
  • Single indirect index point out the index page
    in PRAM
  • Index page contains 512 direct index
  • Double indirect index point out the indirect
    index page of NAND flash memory
  • Indirect index page contains 512 indirect index
    which point out the index page in NAND flash
    memory

16
The file which is larger than 4MB are indexed in
NAND flash memory!!
17
Indexing structure of PFFS
  • The direct and indirect indexing structures are
    constructed in PRAM
  • Write performance of PRAM is better than MLC NAND
    for several bytes update
  • Increasing the speed of data index updates for
    frequently updated small size file (4MB)
  • The file which is larger than 4MB are indexed in
    NAND flash memory
  • Reducing the capacity overhead of PRAM
  • PFFS reduces PRAM space for data indexing by
    index pages
  • The indexing update overhead in NAND flash memory
    is low because large file is not updated
    frequently
  • It is better to use flash pages for data indexing
    of large files

18
Flash memory management
Flash memory management
  • Manage live, valid, free page information in PRAM
  • No scan for free page checking during booting
  • Manage block management information in PRAM
  • Good to decide the policy of garbage collection

19
Garbage collection
  • Finding block for GC whenever NAND page write
  • Passive GC
  • Investigating some NAND blocks (lt200) and finding
    the block which has less than 2 live pages
  • Aggressive GC
  • Investigating all NAND blocks and finding the
    block which has the least live pages
  • The metadata separation of PFFS increases the
    efficiency of GC
  • It reduce the number of page writes
  • Hot/Cold separation Moving hot metadata from
    flash memory to PRAM
  • There may occur snow rolling copying to move live
    page of large file during GC
  • However large file is not frequently updated

20
Virtual management of metadata
  • Actual PRAM size can not be enough to store
    entire metadata of PFFS
  • Virtual metadata management
  • It gives PFFS the impression that it has enough
    non-volatile memory as metadata space
  • Virtual allocation
  • Allocating metadata into NAND flash memory as
    well as PRAM
  • Metadata swapping
  • Keeping frequently accessed metadata in PRAM

21
  • Virtual allocation
  • Give PFFS the illusion of large size PRAM
  • Actual metadata is allocated in PRAM or NAND
  • Metadata swapping
  • Swap out infrequent accessed segment when there
    is no free segment in PRAM
  • Swap in when segment in NAND is accessed
  • Segment Table
  • Mapping Logical segment address
  • to Physical segment address

22
Wear-leveling of PRAM
  • PRAM has limited life time
  • PRAM guarantees 100,000 times write
  • Coarse-grained wear-leveling technique is enough
  • We have to manage the write count evenly across
    entire PRAM region
  • Segment switching GC
  • Switching the data between oldest segment and
    youngest segment
  • Word level shifting
  • Shifting several words of data during segment
    switching
  • It prevents that the specific usage patterns are
    repeated in other segments

23
Overall architecture
24
(No Transcript)
25
Evaluation
26
Environment
  • CPU Samsung S3C2413 (ARM 926EJ)
  • Mem 64MB DRAM
  • 1GB MLC NAND, 32MB PRAM
  • Benchmark PostMark
  • Comparing with JFFS2 and YAFFS2

27
Mounting time
CFFS 593ms PFFS 159ms(constant)
  • The mounting time of PFFS is faster than JFFS2
    and YAFFS2
  • O(1) complexity It is fixed even though the
    number and size of files are increased

28
Memory usage
  • The PFFS has the smallest memory footprint
  • O(1) complexity It is fixed even though the
    number and size of files are increased

29
Performance (1/2)
  • PFFS is 45 better than YAFFS2 for small file
    writes while matching YAFFS2 performance for
    large file

30
Performance (2/2)
  • Postmark test by increasing the number of
    transactions
  • PFFS performance is increased by reducing the
    number of NAND page writes during metadata update

31
Garbage collection
  • Effective performance of GC Nfree/TGC
  • Nfree The number of free pages reclaimed by GC
  • TGC Total elapsed time for GC

32
Virtual management of metadata
  • Test PFFS after reducing PRAM size (4MB 8MB)
  • Using Postmark without locality and Postmark with
    locality
  • Locality 80 accesses are concentrated in 20
    files
  • The performance of PFFS is better when there is
    locality of file access pattern

33
PRAM Wear-leveling
  • Postmark test with 40000 transactions
  • PRAM ware-leveling prevents that the write is
    concentrated on the specific region of PRAM

34
Conclusion
  • PFFS solves the scalability problems of previous
    flash file systems by using the hybrid
    architecture of PRAM and NAND flash memory
  • Performance 45 better than YAFFS2 for
    small-file writes
  • Scalability The mounting time and the memory
    usage of PFFS are O(1)
  • Virtual management of metadata PFFS can be
    implemented using a small size PRAM (lt10MB) and
    even ensures better performance
Write a Comment
User Comments (0)
About PowerShow.com