coerced cache evic on and discreet mode journaling
play

Coerced Cache Evic-on and Discreet-Mode Journaling: Dealing - PowerPoint PPT Presentation

Coerced Cache Evic-on and Discreet-Mode Journaling: Dealing with Misbehaving Disks Abhishek Rajimwale * , Vijay Chidambaram, Deepak Ramamurthi Andrea


  1. Coerced ¡Cache ¡Evic-on ¡and ¡Discreet-­‑Mode ¡Journaling: ¡ Dealing ¡with ¡Misbehaving ¡Disks ¡ Abhishek ¡Rajimwale * , ¡Vijay ¡Chidambaram, ¡Deepak ¡Ramamurthi ¡ ¡ ¡ ¡Andrea ¡Arpaci-­‑Dusseau, ¡Remzi ¡Arpaci-­‑Dusseau ¡ * Data ¡Domain ¡Inc ¡ University ¡of ¡Wisconsin ¡Madison ¡

  2. Disks ¡are ¡not ¡perfect ¡ • Expanding ¡disk ¡fault ¡model ¡ • Latent ¡Sector ¡Errors ¡ [Bairavasundaram ¡SIGMETRICS ¡07] ¡ – RAID-­‑6 ¡ • Block ¡Corrup-on ¡ [Bairavasundaram FAST 08] ¡ – Checksums ¡ Disk ¡Cache ¡ ¡ • The ¡disk ¡cache ¡ Disk ¡ Surface ¡ – Always ¡trusted ¡so ¡far ¡ 3/13/12 DSN 11 2

  3. Disk ¡Caches ¡ • Disk ¡cache ¡improves ¡performance ¡ – But ¡at ¡the ¡risk ¡of ¡data ¡loss ¡ Write ¡to ¡disk ¡ • Order ¡of ¡writes ¡issued ¡by ¡file ¡system: ¡ – A, ¡B ¡,C ¡ • Disks ¡reorder ¡writes ¡during ¡destaging: ¡ – B, ¡A, ¡C ¡ Disk ¡Cache ¡ • File ¡systems ¡flush ¡the ¡disk ¡cache ¡to ¡ ¡ ensure ¡correct ¡ordering ¡of ¡writes ¡ Disk ¡ Surface ¡ – A, ¡flush, ¡B, ¡flush, ¡C ¡ 3/13/12 DSN 11 3

  4. Problem: ¡Flushing ¡doesn’t ¡work ¡ • Disks ¡can ¡fail ¡to ¡flush ¡data ¡upon ¡request ¡ • One ¡reason: ¡Bugs ¡ – Errors ¡in ¡the ¡storage ¡stack ¡ [Bairavasundaram ¡FAST ¡08] ¡ – Improper ¡propaga-on ¡of ¡error ¡codes ¡ [Bairavasundaram ¡FAST ¡08] ¡ – Inadequate ¡failure ¡policies ¡ [Prabhakaran ¡SOSP ¡05] ¡ – Bugs ¡in ¡the ¡firmware ¡ [Ghemawat ¡SOSP ¡03] ¡ 3/13/12 DSN 11 4

  5. Disks ¡can ¡lie! ¡ Misbehaving ¡disks ¡ignore ¡or ¡delay ¡flush ¡requests ¡ • Increases ¡risk ¡for ¡data ¡loss ¡ • - File ¡systems ¡usually ¡blamed ¡for ¡such ¡loss ¡ ¡ Sequen6al ¡writes ¡ 50 ¡ ¡ 45 ¡ Avg ¡6me ¡(msec) ¡ 40 ¡ w/ ¡cache ¡ 35 ¡ w/o ¡cache ¡ 30 ¡ 25 ¡ 20 ¡ 15 ¡ 10 ¡ 5 ¡ 0 ¡ 4k ¡ 16k ¡ 64k ¡ 128k ¡ 512k ¡ 1m ¡ Write ¡size ¡ 3/13/12 DSN 11 5

  6. Disks ¡can ¡lie! ¡ • Evidence ¡from ¡industry ¡experts ¡ – Microsoc ¡ – Seagate ¡ From ¡the ¡ fcntl ¡man ¡page ¡in ¡Mac ¡OSX: ¡ • Does the same thing as fsync(2) then asks the drive to flush all buffered data to F_FULLFSYNC ¡ the permanent storage device (arg is ignored). This is currently implemented on HFS, MS-DOS (FAT), and Universal Disk Format (UDF) file systems. The operation may take quite a while to complete. Certain FireWire drives have also been known to ignore the request to flush their buffered data. 3/13/12 DSN 11 6

  7. Ordering ¡points ¡are ¡essen-al ¡ • All ¡modern ¡file ¡systems ¡depend ¡on ¡ordering ¡points ¡ – Journaling ¡file ¡systems ¡(ext3, ¡ext4) ¡ • Data ¡before ¡the ¡commit ¡block ¡ – Copy ¡on ¡write ¡file ¡systems ¡(ZFS) ¡ • Data ¡before ¡the ¡uber-­‑block ¡ • If ¡ordering ¡points ¡are ¡not ¡enforced: ¡ – Data ¡corrup-on ¡ – Inconsistent ¡file ¡system ¡ 3/13/12 DSN 11 7

  8. Summary ¡ • We ¡present ¡Coerced ¡Cache ¡Evic-on ¡(CCE) ¡ – Write ¡extra ¡data ¡into ¡the ¡cache ¡to ¡evict ¡target ¡blocks ¡ • We ¡show ¡how ¡to ¡characterize ¡9 ¡SATA ¡disk ¡drive ¡cache ¡ – Examine ¡the ¡wide ¡range ¡of ¡caching ¡policies ¡ ¡ • We ¡implement ¡CCE ¡in ¡ext3 ¡ – Well ¡known ¡journaling ¡file ¡system ¡ • CCE ¡provides ¡stronger ¡enforcement ¡for ¡ordering ¡points ¡ – At ¡acceptable ¡overheads ¡ 3/13/12 DSN 11 8

  9. Outline ¡ • Mo-va-on ¡ • Background ¡ • Coerced ¡Cache ¡Evic-on ¡ • Cache ¡Fingerprin-ng ¡ • Discreet ¡Mode ¡Journaling ¡ • Evalua-on ¡ • Conclusion ¡ 3/13/12 DSN 11 9

  10. File ¡System ¡Background ¡ • Consider ¡dele-ng ¡a ¡file ¡ – Removing ¡its ¡directory ¡entry ¡ – Freeing ¡the ¡space ¡occupied ¡by ¡the ¡file ¡and ¡its ¡metadata ¡ • Journaling ¡file ¡system ¡ – Makes ¡sure ¡all ¡changes ¡get ¡to ¡disk ¡or ¡none ¡do ¡ – Groups ¡writes ¡into ¡transac-ons ¡ – Writes ¡everything ¡to ¡a ¡log ¡first ¡ – Checkpoints ¡to ¡disk ¡later ¡ 3/13/12 DSN 11 10

  11. File ¡System ¡Background ¡ • Ext3 ¡file ¡system ¡ – Semi-­‑modern ¡journaling ¡file ¡system ¡ – Well ¡known, ¡well ¡understood ¡ • Variants ¡of ¡journaling ¡ – Data ¡journaling ¡mode ¡ • Everything ¡(data, ¡metadata) ¡goes ¡to ¡the ¡log ¡first ¡ – Ordered ¡journaling ¡mode ¡ • Only ¡metadata ¡is ¡logged ¡ 3/13/12 DSN 11 11

  12. Data ¡Journaling ¡ M Memory M B D D D C Disk Surface Journal Fixed locations 3/13/12 DSN 11 12

  13. Data ¡Journaling ¡ Memory D D D C M M B Disk Cache Disk Surface Journal Fixed locations 3/13/12 DSN 11 13

  14. Outline ¡ • Mo-va-on ¡ • Background ¡ • Coerced ¡Cache ¡Evic-on ¡ • Cache ¡Fingerprin-ng ¡ • Discreet ¡Mode ¡Journaling ¡ • Evalua-on ¡ • Conclusion ¡ 3/13/12 DSN 11 14

  15. Coerced ¡Cache ¡Evic-on ¡ • Ensures ¡that ¡cache ¡has ¡been ¡truly ¡flushed ¡ ¡ • Key ¡idea: ¡ – Extra ¡writes ¡to ¡flush ¡the ¡disk ¡cache ¡ – Desired ¡Order ¡of ¡writes: ¡A, ¡B, ¡C ¡ – With ¡CCE: ¡ • Write ¡A ¡ • Write ¡to ¡flush ¡zone ¡ • Write ¡B ¡ • Write ¡to ¡flush ¡zone ¡ • Write ¡C ¡ 3/13/12 DSN 11 15

  16. Coerced ¡Cache ¡Evic-on ¡ Memory M D M C D D B F F F F F F F F F Disk Cache Disk Surface Journal Flush Zone Fixed locations 3/13/12 DSN 11 16

  17. Coerced ¡Cache ¡Evic-on ¡ • Desired ¡proper-es: ¡ – High ¡probability ¡of ¡flushing ¡target ¡blocks ¡ – Low ¡performance ¡overhead ¡ • Need ¡to ¡understand ¡the ¡disk ¡cache ¡to ¡design ¡ ¡ ¡ ¡ ¡ ¡the ¡flush ¡workload ¡ 3/13/12 DSN 11 17

  18. Outline ¡ • Mo-va-on ¡ • Background ¡ • Coerced ¡Cache ¡Evic-on ¡ • Cache ¡Fingerprin-ng ¡ • Discreet ¡Mode ¡Journaling ¡ • Evalua-on ¡ • Conclusion ¡ 3/13/12 DSN 11 18

  19. Cache ¡Fingerprin-ng ¡ • Manufacturers ¡don’t ¡expose ¡details ¡about ¡disk ¡caches ¡ • Disk ¡caches ¡can ¡vary ¡in: ¡ – Read/Write ¡par--on ¡size ¡ – Number ¡of ¡segments ¡ – Replacement ¡policy ¡ Disk ¡Cache ¡ • Poorly ¡characterized ¡in ¡literature ¡ 3/13/12 DSN 11 19

  20. Cache ¡Fingerprin-ng ¡ • Flush ¡micro-­‑benchmark: ¡ – Write ¡target ¡block ¡ – Write ¡varied ¡flush ¡workload ¡– ¡ measure ¡cost ¡ – fsync() ¡ – Read ¡target ¡– ¡ infer ¡evic>on ¡ • Micro-­‑benchmark ¡is ¡repeated ¡ ¡ – Probability ¡of ¡evic-on ¡is ¡calculated ¡ • Vary ¡in ¡each ¡workload: ¡ – Number ¡of ¡writes ¡ – Amount ¡of ¡data ¡in ¡each ¡write ¡ – Sequen-al/Random ¡writes ¡ 3/13/12 DSN 11 20

  21. Cache ¡Fingerprin-ng ¡ • Evic-on ¡fingerprint ¡ – Probability ¡of ¡evic-on ¡is ¡visually ¡shown ¡ – Darker ¡region ¡indicates ¡higher ¡probability ¡ Eviction Probability ¡90 ¡– ¡100% ¡ ¡70 ¡-­‑ ¡90 ¡ ¡ ¡50 ¡– ¡70 ¡ ¡30 ¡– ¡50 ¡ ¡10 ¡– ¡30 ¡ ¡0 ¡– ¡10 ¡ 3/13/12 DSN 11 21

  22. Cache ¡Fingerprin-ng ¡ • Performance ¡fingerprint ¡ – Time ¡taken ¡to ¡write ¡flush ¡workload ¡ – Darker ¡region ¡indicates ¡more ¡-me ¡ Flush Latency ¡500+ ¡ms ¡ ¡100 ¡– ¡500 ¡ ¡50 ¡– ¡100 ¡ ¡10 ¡-­‑ ¡50 ¡ ¡0 ¡-­‑ ¡10 ¡ 3/13/12 DSN 11 22

  23. Cache ¡Fingerprin-ng ¡ • Selec-ng ¡a ¡flush ¡workload: ¡ – Combine ¡informa-on ¡from ¡both ¡fingerprints ¡ – High ¡probability ¡of ¡evic-on ¡ ¡ • Dark ¡region ¡in ¡evic-on ¡fingerprint ¡ – Low ¡performance ¡cost ¡ • Light ¡region ¡in ¡performance ¡fingerprint ¡ 3/13/12 DSN 11 23

  24. Cache ¡Fingerprin-ng ¡ Manufacturer ¡ Cache ¡(MB) ¡ Capacity ¡ (GB) ¡ Hitachi ¡ 8 ¡ 80 ¡ Hitachi ¡ 32 ¡ 1024 ¡ Samsung ¡ 8 ¡ 250 ¡ Samsung ¡ 16 ¡ 250 ¡ Western ¡Digital ¡ 16 ¡ 320 ¡ Western ¡Digital ¡ 64 ¡ 800 ¡ Seagate ¡ 8 ¡ 250 ¡ Seagate ¡ 16 ¡ 320 ¡ Seagate ¡ 32 ¡ 750 ¡ 3/13/12 DSN 11 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend