Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
ELF: An Efficient Log-Structured Flash File System For Micro Sensor Nodes Hui Dai Michael Neufeld Richard Han University o...
Outline <ul><li>Introduction </li></ul><ul><li>Related Work </li></ul><ul><li>Design Issue s  (Including  ELF File System ...
Introduction <ul><li>WSN (Wireless Sensor Network) </li></ul><ul><ul><li>Sporadic transfer of data </li></ul></ul><ul><ul>...
<ul><li>Flash as persistent storage on micro sensor nodes </li></ul><ul><ul><li>Lager storage </li></ul></ul><ul><ul><li>R...
<ul><li>Goals </li></ul><ul><ul><li>Allow access to flash with simple file operations </li></ul></ul><ul><ul><li>Extend th...
Related Work Matchbox, ELF <ul><li>Work with sensor flash storage on each sensor node </li></ul><ul><li>Provide efficient,...
Design Issues <ul><li>File Access Behavior on Sensor Nodes </li></ul><ul><ul><li>Sensor Data </li></ul></ul><ul><ul><ul><l...
<ul><li>Log-Structured File System Techniques in   ELF </li></ul><ul><ul><li>Traditional log-structured file system </li><...
Design Issues <ul><li>Persistent Storage Capabilities on Sensor Nodes </li></ul>Flash Memory Attributes in Mote EEPROM att...
<ul><li>EEPROM in ELF file system </li></ul><ul><ul><li>Used as persistent storage </li></ul></ul><ul><ul><li>Cache  direc...
ELF Architecture Overview <ul><li>Resource Abstraction </li></ul><ul><ul><li>In  Run-time memory </li></ul></ul><ul><ul><l...
Distribution of ELF Data Structures
On-Flash Data Structure <ul><li>Physical Nodes </li></ul><ul><ul><li>Metadata </li></ul></ul><ul><ul><ul><li>16-bit node i...
In-Memory Data Structures <ul><li>File Abstraction </li></ul><ul><li>Node Abstraction </li></ul><ul><li>File Descriptor </...
File Operations in ELF ELF-Open ELF-Append
File Operations in ELF ELF-Modify ELF-Read
Garbage Collection <ul><li>Procedure </li></ul><ul><ul><li>T he “cleaner” task  - t he number of free pages drops below a ...
Performance Evaluation <ul><li>Sequential Read Performance </li></ul><ul><ul><li>First filled the entire memory 500K log f...
<ul><li>Sequential Write Performance </li></ul>Performance Evaluation <ul><li>M : maximum write throughput  /memory consum...
Performance Evaluation <ul><li>Random Read Performance </li></ul><ul><ul><li>MatchBox  not  support random reads </li></ul...
<ul><li>Random Write Performance </li></ul><ul><ul><li>Write-modify operation </li></ul></ul>Performance Evaluation
<ul><li>Wear Leveling Performance </li></ul><ul><ul><li>The experiment continues running until the total number of  erasur...
Conclusion <ul><li>ELF is a reliable and efficient file system designed and implemented for micro sensor nodes. </li></ul>...
References <ul><li>[1]  Mendel Rosenblum, John K. Ousterhout, “The Design and Implementation of a Log-Structured File Syst...
Upcoming SlideShare
Loading in …5
×

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

725 views

Published on

  • Be the first to comment

  • Be the first to like this

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 University of Colorado at Boulder Computer Science Department ACM SenSys 2004 Speaker: Jinyoung Choi
  2. 2. Outline <ul><li>Introduction </li></ul><ul><li>Related Work </li></ul><ul><li>Design Issue s (Including ELF File System Architecture ) </li></ul><ul><li>Implementation Issue s </li></ul><ul><li>(Based on TinyOS and MICA2 sensor motes ) </li></ul><ul><li>Performance Evaluation </li></ul><ul><li>Conclusion </li></ul>
  3. 3. Introduction <ul><li>WSN (Wireless Sensor Network) </li></ul><ul><ul><li>Sporadic transfer of data </li></ul></ul><ul><ul><li>Hardware failure or environmental condition </li></ul></ul><ul><ul><li>With a very low duty cycle for radio transmission </li></ul></ul><ul><li>Need to flexibly and efficiently exploit local storage on the sensor nodes </li></ul>
  4. 4. <ul><li>Flash as persistent storage on micro sensor nodes </li></ul><ul><ul><li>Lager storage </li></ul></ul><ul><ul><li>Robustness ↑ </li></ul></ul><ul><li>Two challenges of the design & implementation of FS for sensor nodes </li></ul><ul><ul><li>Quite resource-constrained </li></ul></ul><ul><ul><ul><li>RAM usage </li></ul></ul></ul><ul><ul><ul><li>Power consumption </li></ul></ul></ul><ul><ul><li>The characteristics of flash memory </li></ul></ul>Introduction
  5. 5. <ul><li>Goals </li></ul><ul><ul><li>Allow access to flash with simple file operations </li></ul></ul><ul><ul><li>Extend the operational lifetime of the flash with wear leveling techniques </li></ul></ul><ul><ul><li>Achieve a small memory footprint </li></ul></ul><ul><ul><li>Optimize common sensor file operations </li></ul></ul><ul><ul><li>Avoid excessive energy consumption </li></ul></ul><ul><ul><li>Provide Optional best-effort data reliability </li></ul></ul>Introduction
  6. 6. Related Work Matchbox, ELF <ul><li>Work with sensor flash storage on each sensor node </li></ul><ul><li>Provide efficient, reliable complete file operation </li></ul>Micro Sensor 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
  7. 7. Design Issues <ul><li>File Access Behavior on Sensor Nodes </li></ul><ul><ul><li>Sensor Data </li></ul></ul><ul><ul><ul><li>M ajor part of the stored data </li></ul></ul></ul><ul><ul><ul><li>Data written sequentially without modifying prio r records </li></ul></ul></ul><ul><ul><ul><li>Eras ed periodically </li></ul></ul></ul><ul><ul><li>Configuration Data </li></ul></ul><ul><ul><ul><li>Changes infrequently </li></ul></ul></ul><ul><ul><ul><li>Requires high reliability </li></ul></ul></ul><ul><ul><li>Binary Program Images </li></ul></ul><ul><ul><ul><li>Dynamic reprogramming </li></ul></ul></ul><ul><ul><ul><li>Store the binary image in flash memory before rebooting the system </li></ul></ul></ul><ul><ul><ul><li>Requires high est reliability </li></ul></ul></ul>
  8. 8. <ul><li>Log-Structured File System Techniques in ELF </li></ul><ul><ul><li>Traditional log-structured file system </li></ul></ul><ul><ul><ul><li>Create a new log entry for each write operation </li></ul></ul></ul><ul><ul><ul><li>Delaying update for maximizing the disk’s bandwidth </li></ul></ul></ul><ul><ul><li>ELF </li></ul></ul><ul><ul><ul><li>Write operation = Write-Append + Write-Modify </li></ul></ul></ul><ul><ul><ul><li>Create a new log entry only for write-modify operation </li></ul></ul></ul><ul><ul><ul><li>( ∵ memory consumption ↓ ) </li></ul></ul></ul><ul><ul><ul><li>Delaying update for reducing the number of write on flash </li></ul></ul></ul><ul><ul><ul><li>Page lifespan ↔ File consistency (Tradeoff) </li></ul></ul></ul><ul><ul><ul><li>Keep each log entry on a separate flash page </li></ul></ul></ul>Design Issues
  9. 9. Design Issues <ul><li>Persistent Storage Capabilities on Sensor Nodes </li></ul>Flash Memory Attributes in Mote EEPROM attributes in atmega128 4mA Read Current 2uA Standby 2048 256+8=264 Byte 14 ms 20 ms 8ms 10,000 times Less than 250us Power Consumption Typical Number of Pages Typical Page Size Writing a page Erasing and writing a page Page Erase Write Limit Read a page into cache 2-8mA when Programming Power Consumption 100,000times Write Limit About 4ms EEPROM ERASE 1cycle(from CPU) CPU halted 4 cycles after read EEPROM Read 8848 cycles(8.5ms at 1MHz) EEPROM Write
  10. 10. <ul><li>EEPROM in ELF file system </li></ul><ul><ul><li>Used as persistent storage </li></ul></ul><ul><ul><li>Cache directory structure for fast file access </li></ul></ul><ul><ul><li>Allows fast startup or system reboot </li></ul></ul><ul><ul><li>Store system snapshot to enable file consistency </li></ul></ul><ul><ul><li>Allows crash recovery </li></ul></ul>Design Issues
  11. 11. ELF Architecture Overview <ul><li>Resource Abstraction </li></ul><ul><ul><li>In Run-time memory </li></ul></ul><ul><ul><li>In-memory representation of open files </li></ul></ul><ul><ul><li>ELF Configuration data </li></ul></ul><ul><li>General File Operations </li></ul><ul><ul><li>Logical abstraction of file/dir ectory operation </li></ul></ul><ul><li>ELF Maintenance Tasks </li></ul><ul><ul><li>Abstraction of System maintenance tasks </li></ul></ul><ul><ul><li>(e.g.) Maintaining snapshot of dir ectory structure and file metadata in EEPROM </li></ul></ul>
  12. 12. Distribution of ELF Data Structures
  13. 13. On-Flash Data Structure <ul><li>Physical Nodes </li></ul><ul><ul><li>Metadata </li></ul></ul><ul><ul><ul><li>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 </li></ul></ul></ul><ul><ul><ul><li>- a directory entry in the FS </li></ul></ul></ul><ul><ul><ul><li>ELF_FILE </li></ul></ul></ul><ul><ul><ul><li>- metadata to operate on file </li></ul></ul></ul><ul><ul><ul><li>ELF_COMMON </li></ul></ul></ul><ul><ul><ul><li>- 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 writeCounter; uint16_t magicNumber; }
  14. 14. In-Memory Data Structures <ul><li>File Abstraction </li></ul><ul><li>Node Abstraction </li></ul><ul><li>File Descriptor </li></ul><ul><ul><li>File abstraction </li></ul></ul><ul><ul><li>Current offset in that file </li></ul></ul><ul><ul><li>Open mode </li></ul></ul>
  15. 15. File Operations in ELF ELF-Open ELF-Append
  16. 16. File Operations in ELF ELF-Modify ELF-Read
  17. 17. Garbage Collection <ul><li>Procedure </li></ul><ul><ul><li>T he “cleaner” task - t he number of free pages drops below a preset threshold </li></ul></ul><ul><ul><li>Cleaner traces the link inside the file pages </li></ul></ul><ul><ul><li>Sets the corresponding bits in bitmap </li></ul></ul><ul><ul><li>If still not enough, the files de-fragmented </li></ul></ul><ul><li>Any page with more than 9000 writes </li></ul><ul><ul><li>marked as “ unusable ” </li></ul></ul><ul><li>RAM consumption for ELF cleaner – fairly low </li></ul>
  18. 18. Performance Evaluation <ul><li>Sequential Read Performance </li></ul><ul><ul><li>First filled the entire memory 500K log file in Flash </li></ul></ul><ul><ul><li>Each run repeated 50 times </li></ul></ul><ul><ul><li>MatchBox Read: </li></ul></ul><ul><ul><ul><li>Flash  Cache  RAM </li></ul></ul></ul><ul><ul><li>ELF Read : </li></ul></ul><ul><ul><ul><li>Flash  RAM </li></ul></ul></ul>
  19. 19. <ul><li>Sequential Write Performance </li></ul>Performance Evaluation <ul><li>M : maximum write throughput /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 bitmap stored in RAM </li></ul>
  20. 20. Performance Evaluation <ul><li>Random Read Performance </li></ul><ul><ul><li>MatchBox not support random reads </li></ul></ul>
  21. 21. <ul><li>Random Write Performance </li></ul><ul><ul><li>Write-modify operation </li></ul></ul>Performance Evaluation
  22. 22. <ul><li>Wear Leveling Performance </li></ul><ul><ul><li>The experiment continues running until the total number of erasures exceeds 10240,000 </li></ul></ul><ul><ul><li>Each of 2000 256 bytes in the 512Kbytes flash are expected to be written exactly 5000 times if absolutely uniform wear leveling is achieved </li></ul></ul>Performance Evaluation
  23. 23. Conclusion <ul><li>ELF is a reliable and efficient file system designed and implemented for micro sensor nodes. </li></ul><ul><li>ELF is the first log-structured file system for sensor networks that provides garbage collection and a best effort recovery mechanism </li></ul>
  24. 24. References <ul><li>[1] Mendel Rosenblum, John K. Ousterhout, “The Design and Implementation of a Log-Structured File System,” ACM Transactions on Computer Systems,1992 </li></ul><ul><li>[2] Adam Dunkels, Niclas Finne, Joakim Eriksson, and Thiemo Voigt, “ Run-Time Dynamic Linking for Reprogramming Wireless Sensor Networks ,” In Proceedings of the Fourth ACM Conference on Embedded Networked Sensor Systems,2006 </li></ul><ul><li>[3] Silberschatz, Galvin, Gagne, Operating System Concepts, Wiley </li></ul>

×