algoseminar.ppt

297 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
297
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

algoseminar.ppt

  1. 1. Energy Efficient Sensor Data Logging with Amnesic Flash Storage <ul><li>By: </li></ul><ul><ul><li>Suman Nath </li></ul></ul><ul><li>appeared in </li></ul><ul><li>IPSN 2009 </li></ul>Presented by: Michele Albano
  2. 2. Memory on a sensor <ul><li>XBow's MicaZ: </li></ul><ul><ul><li>128K of Program Flash Memory </li></ul></ul><ul><ul><li>512K of Measurement Serial Flash Memory </li></ul></ul><ul><ul><li>4K of Configuration EEPROM </li></ul></ul><ul><ul><li>4K RAM </li></ul></ul><ul><li>ATMEL's ATmega128: </li></ul><ul><ul><li>128K of Program+Data Flash Memory </li></ul></ul><ul><ul><li>4K of EEPROM </li></ul></ul><ul><ul><li>4K Internal SRAM </li></ul></ul><ul><li>STM M25P memory for Telos motes: </li></ul><ul><ul><li>16 blocks, 256 pages, 256 bytes of Flash Memory </li></ul></ul>
  3. 3. Flash Storage <ul><li>Sensors usually store data into Flash memory: </li></ul><ul><ul><li>Memory can fill up </li></ul></ul><ul><ul><li>High I/O energy cost </li></ul></ul><ul><ul><li>Limited number of rewrites </li></ul></ul><ul><ul><li>Read data: 1 page granularity </li></ul></ul><ul><ul><li>Write data: 1 page granularity </li></ul></ul><ul><ul><li>Erase data: 1 block granularity </li></ul></ul><ul><ul><li>Updata data = read+erase+write </li></ul></ul>
  4. 4. Goals in using Flash memory <ul><li>Amnesic storage: </li></ul><ul><ul><li>Data is (lossy) compressed </li></ul></ul><ul><ul><ul><ul><li>Since compression is cheaper than I/O </li></ul></ul></ul></ul><ul><ul><li>Online storage </li></ul></ul><ul><ul><li>Aging techniques </li></ul></ul><ul><ul><ul><ul><li>Older data is kept with lower fidelity </li></ul></ul></ul></ul><ul><ul><li>Efficient storing and indexing of data </li></ul></ul><ul><ul><ul><ul><li>Efficient time-ranged queries on data </li></ul></ul></ul></ul>
  5. 5. FlashLogger <ul><li>What is it? </li></ul><ul><li>Flash-optimized abstraction for </li></ul><ul><li>compressing and aging sensor data, </li></ul><ul><li>user chooses: </li></ul><ul><li>- Amnesic Function </li></ul><ul><li>- Compressing Algorithm </li></ul><ul><li>Composed by: </li></ul><ul><ul><li>Compressing Module: suite of amnesic compressing algorithms </li></ul></ul><ul><ul><li>Amnesic Function: when do we age data? </li></ul></ul><ul><ul><li>Am-store: mantains compressed data on flash </li></ul></ul>
  6. 6. Am-Store <ul><li>What is it? </li></ul><ul><li>Novel flash-efficient abstraction for </li></ul><ul><li>archiving amnesic compressed data, </li></ul><ul><li>updating and overwriting compressed data </li></ul><ul><li>Challenges to be addressed: </li></ul><ul><ul><li>Excessive I/Os </li></ul></ul><ul><ul><ul><li>We want to be lazy </li></ul></ul></ul><ul><ul><li>Modification of Existing Data </li></ul></ul><ul><ul><ul><li>Can not change pointers for List </li></ul></ul></ul><ul><ul><li>Fragmentation of Adjacent Data </li></ul></ul><ul><ul><ul><li>Query on time range: Array or List? </li></ul></ul></ul>
  7. 7. Basic data structure? <ul><li>Arrays are afficient for time-ranged queries </li></ul><ul><ul><li>Keep logically adjacent data in physically adjacent locations </li></ul></ul><ul><ul><li>Binary search </li></ul></ul><ul><ul><li>But we need to compact the flash for each recompression </li></ul></ul><ul><li>Linked List need not to be compacted </li></ul><ul><ul><li>Need to be traversed for queries </li></ul></ul><ul><ul><li>No ”next” pointer, that we should upate </li></ul></ul><ul><li>Skip List </li></ul><ul><ul><li>Linked lists with additional ”previous” pointers </li></ul></ul><ul><ul><li>Logarithmically bounded queries </li></ul></ul>
  8. 8. Addressing the challenges <ul><ul><li>Excessive I/Os: </li></ul></ul><ul><ul><ul><li>Lazy updates, batching the recompressions </li></ul></ul></ul><ul><ul><li>Expensive pointer modifications </li></ul></ul><ul><ul><ul><li>Multiple lists (buckets), one per fidelity </li></ul></ul></ul><ul><ul><ul><li>Pointer to previous data (not to next data)‏ </li></ul></ul></ul><ul><ul><ul><li>Timestamped pointers </li></ul></ul></ul><ul><ul><li>Efficient time-ranged query </li></ul></ul><ul><ul><ul><li>Each bucket is a skip list </li></ul></ul></ul>
  9. 9. Data organization <ul><ul><li>n b_i buckets, for n f_i fidelity levels </li></ul></ul><ul><ul><li>if flash is full, truncate+dilute </li></ul></ul><ul><ul><ul><li>data in last bucket is deleted </li></ul></ul></ul><ul><ul><ul><li>data in b_i buckets is recompressed to b_{i+1} </li></ul></ul></ul>
  10. 10. Time ranged data queries <ul><ul><li>Data is organized into skip-lists </li></ul></ul><ul><ul><ul><li>LOG-time to find first data for the query </li></ul></ul></ul><ul><ul><li>No ”next” time pointer, but can scan backward </li></ul></ul><ul><ul><li>Adjacent Buckets store (time) adjacent data </li></ul></ul><ul><ul><li>If scan for time ranged data is not finished in this bucket, it restarts from next bucket </li></ul></ul><ul><ul><li>Current time windows for buckets are stored into RAM </li></ul></ul><ul><ul><ul><li>No scan uses dangling (timestamped) pointers </li></ul></ul></ul>
  11. 11. Design of Am-Store <ul><li>Bucket Manager: </li></ul><ul><ul><li>writes pages in bucket </li></ul></ul><ul><ul><li>if no page is available: </li></ul></ul><ul><ul><ul><li>asks the Storage Manager </li></ul></ul></ul><ul><li>Storage Manager: </li></ul><ul><ul><li>keeps list of available pages </li></ul></ul><ul><ul><li>truncate + dilute </li></ul></ul>
  12. 12. Implementation <ul><li>System was implemented on: </li></ul><ul><ul><li>Moteiv Tmote Sky running TinyOS 2.1 </li></ul></ul><ul><ul><ul><li>lines of nesC code: 500 </li></ul></ul></ul><ul><ul><ul><li>footprint in ROM: 14 KB </li></ul></ul></ul><ul><ul><ul><li>footprint in RAM: 1.5 KB </li></ul></ul></ul><ul><ul><li>Linux </li></ul></ul><ul><ul><ul><li>to experiment with larger Flash memories </li></ul></ul></ul>
  13. 13. Experiments <ul><li>Comparison of the system with: </li></ul><ul><ul><li>Aggressive (not lazy) error-efficent scheme </li></ul></ul><ul><ul><li>System using Arrays (like DIMENSIONS)‏ </li></ul></ul><ul><ul><ul><li>compacted upon recompression </li></ul></ul></ul><ul><ul><li>System using Linked List </li></ul></ul>
  14. 14. Results
  15. 15. Conclusions <ul><ul><li>Existing lazy techniques are not suitable </li></ul></ul><ul><ul><li>Need to address block/page structure of Flash memory </li></ul></ul><ul><ul><li>FlashLogger does not rely on update of already stored data </li></ul></ul><ul><ul><ul><li>Uses only backward pointers </li></ul></ul></ul><ul><ul><li>Timestamps to ignore dangling pointers </li></ul></ul><ul><ul><li>Skip list to keep LOG(n) complexity </li></ul></ul>
  16. 16. Questions? Thank you for your attention!

×