ELF: An Efficient Log-Structured Flash File System For Micro Sensor Nodes Hui Dai, Michael Neufeld, Richard Han Presenter ...
Sensor Node Memory Usage
Existing File Systems Matchbox, ELF <ul><li>Work with sensor flash storage on each sensor node </li></ul><ul><li>Provide e...
Flash Memory Characteristics <ul><li>Most common storage medium for micro sensors </li></ul><ul><li>Flash is divided into ...
Sensor Data Types and Their Characteristics <ul><li>Sensor Data </li></ul><ul><ul><li>Form major part of the data stored <...
ELF Design Goals <ul><li>Allow access to flash memory with simple file operations like write-modify,write-append,reading,c...
ELF File System Architecture <ul><li>Resource Abstraction </li></ul><ul><ul><li>Run-time memory </li></ul></ul><ul><ul><li...
Data Structures in RAM, EEPROM and FLASH
Flash Data Structures <ul><li>Physical Nodes </li></ul><ul><ul><li>Meta-Data </li></ul></ul><ul><ul><ul><li>Unique 16-bit ...
In-Memory Data Structures <ul><li>File Abstraction </li></ul><ul><li>Node Abstraction </li></ul><ul><li>File Descriptor </...
In-EEPROM Data Structures <ul><li>Cache dir structure for fast file access </li></ul><ul><li>Store system snapshot to enab...
File Operations in ELF Open/Create Append Modify Read/Seek Rename Delete
ELF Flash Memory Operations <ul><li>Read </li></ul><ul><ul><li>Flash->Data </li></ul></ul><ul><ul><li>Flash->Cache->Data <...
Resource Management <ul><li>Bitmap approach to maintain free/dirty used blocks </li></ul><ul><li>Garbage Collection </li><...
Crash Recovery <ul><li>Optional </li></ul><ul><li>Checkpoint </li></ul><ul><li>Roll Forward </li></ul><ul><li>Maintains sn...
Performance Results <ul><li>Sequential Read Performance </li></ul><ul><ul><li>Elf reads data directly from flash whereas m...
Performance Results <ul><li>M corresponds to maximum write throughput or memory consumption of matchbox </li></ul><ul><li>...
Performance Results <ul><li>Random Read Performance </li></ul><ul><li>Random Write Performance </li></ul>
Performance Results <ul><li>Wear Leveling Performance </li></ul>
Conclusion <ul><li>Provides complete,efficient and reliable file system for micro sensor nodes </li></ul><ul><li>Uses atom...
Limitations and Future Work <ul><li>Cannot handle frequent occurrences of reboot, file open and creation </li></ul><ul><li...
THANK YOU
Upcoming SlideShare
Loading in …5
×

ELF: An Efficient Log-Structured Flash File System For Micro ...

590 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
590
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

ELF: An Efficient Log-Structured Flash File System For Micro ...

  1. 1. ELF: An Efficient Log-Structured Flash File System For Micro Sensor Nodes Hui Dai, Michael Neufeld, Richard Han Presenter Yamuna Krishnamurthy
  2. 2. Sensor Node Memory Usage
  3. 3. Existing File Systems Matchbox, ELF <ul><li>Work with sensor flash storage on each sensor node </li></ul><ul><li>Provide efficient, reliable complete file operations </li></ul>Micro Sensor Storage DCS, Dimension <ul><li>Distributed event storage using geographic hash table </li></ul>Distributed Data Storage eNVy,MFFS,JFFS <ul><li>Large flash memory </li></ul><ul><li>Small battery backed SRAM for write buffering </li></ul><ul><li>Large bandwidth bus between RAM and SRAM </li></ul><ul><li>Allows garbage collection </li></ul>Flash Sprite LFS, BSD-LFS <ul><li>Represented as a log of metadata </li></ul><ul><li>Data gathered in cache before writing to disk </li></ul>Log Structured Example Characteristics File System Type
  4. 4. Flash Memory Characteristics <ul><li>Most common storage medium for micro sensors </li></ul><ul><li>Flash is divided into sectors (sector = n* 264byte page) </li></ul><ul><li>On-chip cache (264 bytes) </li></ul><ul><li>Concurrent read/writes prohibited </li></ul><ul><li>Flash pages have limited life </li></ul><ul><li>Reliability mechanisms like logging can either use Flash or EEPROM as is done for ELF’s implementation on Mica2 mote </li></ul>
  5. 5. Sensor Data Types and Their Characteristics <ul><li>Sensor Data </li></ul><ul><ul><li>Form major part of the data stored </li></ul></ul><ul><ul><li>Data written sequentially without modifying earlier records </li></ul></ul><ul><ul><li>Cleared periodically </li></ul></ul><ul><li>Configuration Data </li></ul><ul><ul><li>Changes infrequently after deployment </li></ul></ul><ul><ul><li>Require high reliability for proper sensor functioning </li></ul></ul><ul><li>Binary Program Images </li></ul><ul><ul><li>Dynamic reprogramming of sensor nodes with either a complete new binary image or patches </li></ul></ul><ul><ul><li>Store the binary image in flash memory before rebooting the system </li></ul></ul><ul><ul><li>Requires high reliability </li></ul></ul>
  6. 6. ELF Design Goals <ul><li>Allow access to flash memory with simple file operations like write-modify,write-append,reading,creation and deletion </li></ul><ul><li>Extend the operational lifetime of the flash with wear leveling </li></ul><ul><li>Achieve a small memory footprint </li></ul><ul><li>Optimize common sensor file operations </li></ul><ul><li>Avoid excessive energy consumption </li></ul><ul><li>Provide optional best-effort data reliability </li></ul>
  7. 7. ELF File System Architecture <ul><li>Resource Abstraction </li></ul><ul><ul><li>Run-time memory </li></ul></ul><ul><ul><li>In-memory representation of open files </li></ul></ul><ul><ul><li>Configuration data like cleaning policy </li></ul></ul><ul><li>General File Operations </li></ul><ul><ul><li>Logical abstraction of file/dir operation </li></ul></ul><ul><li>ELF Maintenance Tasks </li></ul><ul><ul><li>System maintenance tasks like snapshot of dir structure and file meta data in EEPROM </li></ul></ul>
  8. 8. Data Structures in RAM, EEPROM and FLASH
  9. 9. Flash Data Structures <ul><li>Physical Nodes </li></ul><ul><ul><li>Meta-Data </li></ul></ul><ul><ul><ul><li>Unique 16-bit node identifier </li></ul></ul></ul><ul><ul><ul><li>16-bit version number indicating age </li></ul></ul></ul><ul><ul><ul><li>32-bit field storing length of the node and included data </li></ul></ul></ul><ul><ul><li>Types </li></ul></ul><ul><ul><ul><li>ELF_DIR – Represents a dir entry in the file system </li></ul></ul></ul><ul><ul><ul><li>ELF_FILE – Includes meta-data to operate on file </li></ul></ul></ul><ul><ul><ul><li>ELF_COMMON – Represents changes to the file </li></ul></ul></ul><ul><li>Per-Page Meta Data </li></ul>struct page_info{ uint16_t crc; uint16_t nextPage:11; uint16_t flags:5; uint16_t writeEncounter; uint16_t magicNumber; }
  10. 10. In-Memory Data Structures <ul><li>File Abstraction </li></ul><ul><li>Node Abstraction </li></ul><ul><li>File Descriptor </li></ul>
  11. 11. In-EEPROM Data Structures <ul><li>Cache dir structure for fast file access </li></ul><ul><li>Store system snapshot to enable file consistency </li></ul><ul><li>Allows fast startup or system reboot </li></ul><ul><li>Allows crash recovery </li></ul>
  12. 12. File Operations in ELF Open/Create Append Modify Read/Seek Rename Delete
  13. 13. ELF Flash Memory Operations <ul><li>Read </li></ul><ul><ul><li>Flash->Data </li></ul></ul><ul><ul><li>Flash->Cache->Data </li></ul></ul><ul><li>Write </li></ul><ul><ul><li>Data->Cache->Flash </li></ul></ul><ul><ul><li>Page contents erased before writing </li></ul></ul><ul><li>Modify </li></ul><ul><ul><li>Page ->Cache->Modify->Flash </li></ul></ul>
  14. 14. Resource Management <ul><li>Bitmap approach to maintain free/dirty used blocks </li></ul><ul><li>Garbage Collection </li></ul><ul><ul><li>Cleaner called when number of free pages drop below threshold </li></ul></ul>
  15. 15. Crash Recovery <ul><li>Optional </li></ul><ul><li>Checkpoint </li></ul><ul><li>Roll Forward </li></ul><ul><li>Maintains snapshots of current operation {inodeNum,action,curr_version,highest_version} </li></ul>
  16. 16. Performance Results <ul><li>Sequential Read Performance </li></ul><ul><ul><li>Elf reads data directly from flash whereas matchbox reads from flash to cache and then reads the data </li></ul></ul>
  17. 17. Performance Results <ul><li>M corresponds to maximum write throughput or memory consumption of matchbox </li></ul><ul><li>Experiments performed with varying RAM buffer </li></ul><ul><ul><li>E1 and E1’ correspond to 0 byte buffer, E2 and E2’ correspond to 32 byte buffer and so on </li></ul></ul><ul><li>E1 has the whole bitmap stored in RAM whereas E1’ has only first 64 bytes stored in RAM </li></ul>Sequential Write Throughput Sequential Write Memory Consumption
  18. 18. Performance Results <ul><li>Random Read Performance </li></ul><ul><li>Random Write Performance </li></ul>
  19. 19. Performance Results <ul><li>Wear Leveling Performance </li></ul>
  20. 20. Conclusion <ul><li>Provides complete,efficient and reliable file system for micro sensor nodes </li></ul><ul><li>Uses atomic write operations for operating with file metadata </li></ul><ul><li>Support for simple garbage collection </li></ul><ul><li>Optional best effort crash recovery mechanism </li></ul><ul><li>Achieves wear leveling </li></ul><ul><li>Allows random access of data </li></ul>
  21. 21. Limitations and Future Work <ul><li>Cannot handle frequent occurrences of reboot, file open and creation </li></ul><ul><li>Loss of reliability due to write buffering </li></ul><ul><li>Energy and latency cost of ensuring reliability not explored </li></ul><ul><li>Using compression mechanisms to reduce memory usage </li></ul>
  22. 22. THANK YOU

×