efficient mrc construc0on with shards
play

Efficient MRC Construc0on with SHARDS Carl Waldspurger - PowerPoint PPT Presentation

Efficient MRC Construc0on with SHARDS Carl Waldspurger Nohhyun Park Alexander Garthwaite Irfan Ahmad CloudPhysics, Inc . USENIX Conference


  1. Efficient ¡MRC ¡Construc0on ¡ with ¡SHARDS ¡ Carl ¡Waldspurger ¡ ¡ ¡ ¡ ¡Nohhyun ¡Park ¡ Alexander ¡Garthwaite ¡ ¡ ¡ ¡ ¡Irfan ¡Ahmad ¡ CloudPhysics, ¡Inc . ¡ USENIX ¡Conference ¡on ¡File ¡and ¡Storage ¡Technologies ¡ February ¡17, ¡2015 ¡

  2. Mo0va0on ¡ • Cache ¡performance ¡highly ¡non-­‑linear ¡ • Benefit ¡varies ¡widely ¡by ¡workload ¡ • Opportunity: ¡dynamic ¡cache ¡management ¡ – Efficient ¡sizing, ¡allocaSon, ¡and ¡scheduling ¡ – Improve ¡performance, ¡isolaSon, ¡QoS ¡ • Problem: ¡online ¡modeling ¡expensive ¡ – Too ¡resource-­‑intensive ¡to ¡be ¡broadly ¡pracScal ¡ – Exacerbated ¡by ¡increasing ¡cache ¡sizes ¡ CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 2 ¡

  3. Modeling ¡Cache ¡Performance ¡ • Miss ¡RaSo ¡Curve ¡(MRC) ¡ ��� – Performance ¡as ¡ f (size) ¡ ��� – Working ¡set ¡knees ¡ – Inform ¡allocaSon ¡policy ¡ ���������� ��� • Reuse ¡distance ¡ – Unique ¡intervening ¡blocks ¡ ��� between ¡use ¡and ¡reuse ¡ – LRU, ¡stack ¡algorithms ¡ ��� �� �� ��� ��� ��� ��������������� CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 3 ¡

  4. MRC ¡Algorithm ¡Research ¡ SHARDS separate simulation spatial hashing per cache size O(1), O(N) UMON-DSS Kessler, Hill & Wood hw set sampling Mattson Stack Algorithm PARDA set, time sampling single pass parallelism O(M), O(NM) 1965 ¡ 1970 ¡ 1975 ¡ 1980 ¡ 1985 ¡ 1990 ¡ 1995 ¡ 2000 ¡ 2005 ¡ 2010 ¡ 2015 ¡ Bryan & Conte Counter Stacks Bennett & Kruskal cluster sampling probabilistic counters Olken balanced tree O(log M), O(N log M) tree of unique refs RapidMRC O(N), O(N log N) O(M), O(N log M) on-off periods Space, Time Complexity N = total refs, M = unique refs CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 4 ¡

  5. Key ¡Idea ¡ • Track ¡only ¡a ¡ small ¡ subset ¡of ¡blocks ¡ – Filter ¡input ¡to ¡exisSng ¡algorithm ¡ – Run ¡ full ¡algorithm, ¡using ¡only ¡sampled ¡blocks ¡ – Cheap/accurate ¡enough ¡for ¡pracScal ¡online ¡MRCs? ¡ • SHARDS ¡approximaSon ¡algorithm ¡ – Randomized ¡spaSal ¡sampling ¡ – Uses ¡hashing ¡to ¡capture ¡all ¡reuses ¡of ¡same ¡block ¡ – High ¡performance ¡in ¡Sny ¡constant ¡footprint ¡ – Surprisingly ¡accurate ¡MRCs ¡ CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 5 ¡

  6. Spa0ally ¡Hashed ¡Sampling ¡ randomize ¡ sample? ¡ yes ¡ process ¡ < ¡T ¡ L i ¡ T i ¡ no ¡ hash(L i ) ¡mod ¡P ¡ skip ¡ sampled ¡ unsampled ¡ sampling ¡rate ¡R ¡= ¡T ¡/ ¡P ¡ subset ¡inclusion ¡property ¡ 0 ¡ P ¡ ¡ ¡ ¡maintained ¡as ¡R ¡is ¡lowered ¡ T ¡ adjustable ¡threshold ¡ CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 6 ¡

  7. Basic ¡SHARDS ¡ randomize ¡ sample? ¡ compute ¡distance ¡ scale ¡up ¡ Standard ¡ yes ¡ L i ¡ T i ¡ < ¡T ¡ ¡÷ ¡R ¡ Reuse ¡Distance ¡ Algorithm ¡ no ¡ hash(L i ) ¡mod ¡P ¡ skip ¡ Each ¡sample ¡staSsScally ¡represents ¡1/R ¡blocks ¡ Scale ¡up ¡reuse ¡distances ¡by ¡same ¡factor ¡ ¡ CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 7 ¡

  8. SHARDS ¡in ¡Constant ¡Space ¡ randomize ¡ sample? ¡ compute ¡distance ¡ scale ¡up ¡ Standard ¡ yes ¡ L i ¡ T i ¡ < ¡T ¡ ¡÷ ¡R ¡ Reuse ¡Distance ¡ Algorithm ¡ hash(L i ) ¡mod ¡P ¡ sample ¡set ¡ evict ¡samples ¡to ¡bound ¡set ¡size ¡ T max ¡ lower ¡threshold ¡T ¡= ¡T max ¡ reduces ¡rate ¡R ¡= ¡T ¡/ ¡P ¡ 0 ¡ P ¡ T ¡ CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 8 ¡

  9. Example ¡SHARDS ¡MRCs ¡ • Block ¡I/O ¡trace ¡ t04 ¡ Sample Size (s max ) 1.0 Exact MRC – ProducSon ¡VM ¡disk ¡ 0.9 32K 8K 0.8 – 69.5M ¡refs, ¡5.2M ¡unique ¡ 2K 0.7 512 • Sample ¡size ¡ s max ¡ 128 0.6 Miss Ratio 0.5 – Vary ¡from ¡128 ¡to ¡32K ¡ 0.4 – s max ¡≥ ¡2K ¡very ¡accurate ¡ 0.3 0.2 • Small ¡constant ¡footprint ¡ 0.1 • SHARDS adj ¡adjustment ¡ 0.0 0 20 40 60 80 Cache Size (GB) CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 9 ¡

  10. Dynamic ¡Rate ¡Adapta0on ¡ • Adjust ¡sampling ¡rate ¡ ���� ��� ��� ��� – Start ¡with ¡ R ¡= ¡0.1 ¡ ��� – Lower ¡ R ¡as ¡ M ¡increases ¡ ����� ����������������� – Shape ¡depends ¡on ¡trace ¡ • Rescale ¡histogram ¡counts ¡ – Discount ¡evicted ¡samples ¡ ������ – Correct ¡relaSve ¡weighSng ¡ – Scale ¡by ¡ R new ¡/ ¡ R old ¡ ������� ¡ �� ��� ��� ��� ��� ��� ��������������������� CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 10 ¡

  11. Experimental ¡Evalua0on ¡ • Data ¡collecSon ¡ – SaaS ¡caching ¡analyScs ¡ – Remotely ¡stream ¡ VMware ¡vscsiStats ¡ • 124 ¡trace ¡files ¡ – 106 ¡week-­‑long ¡traces ¡ ¡ CloudPhysics ¡customers ¡ – 12 ¡MSR ¡and ¡6 ¡FIU ¡traces ¡ SNIA ¡IOTTA ¡ • LRU, ¡16 ¡KB ¡block ¡size ¡ CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 11 ¡

  12. Exact ¡MRCs ¡vs. ¡SHARDS ¡ msr_mds (1.10%) msr_proj (0.06%) msr_src1 (0.06%) t01 (0.05%) 1.0 0.5 0.0 0 40 80 0 500 1000 0 200 0 200 400 t06 (0.33%) t08 (0.04%) t14 (0.38%) t15 (0.10%) 1.0 Miss Ratio 0.5 0.0 0 50 100 0 300 600 0 100 200 300 0 200 400 t18 (0.08%) t19 (0.06%) t30 (0.06%) t32 (0.98%) 1.0 0.5 0.0 0 100 200 0 200 400 0 100 200 300 0 9 18 Cache Size (GB) s max = 8K exact MRC CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 12 ¡

  13. Error ¡Analysis ¡ • Mean ¡Absolute ¡Error ¡(MAE) ¡ 0.10 ● – | ¡exact ¡– ¡approx ¡| ¡ ¡ 0.09 ● 0.08 – Average ¡over ¡all ¡cache ¡sizes ¡ Mean Absolute Error (MAE) 0.07 • Full ¡set ¡of ¡124 ¡traces ¡ ● ● 0.06 ● ● ● 0.05 • Error ¡ ∝ 1 ¡/ ¡ √ s max ¡ ● ● ● ● ● ● ● ● ● ● ● 0.04 ● ● ● ● ● ● • MAE ¡for ¡s max ¡= ¡8K ¡ ● ● 0.03 ● ● ● ● ● ● ● ● ● ● ● 0.02 ● – 0.0027 ¡median ¡ ● ● ● ● ● ● ● 0.01 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● – 0.0171 ¡worst-­‑case ¡ ● ● ● 0.00 256 512 1K 2K 4K 8K 16K 32K Sample Size (s max ) CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 13 ¡

  14. Memory ¡Footprint ¡ • Full ¡set ¡of ¡124 ¡traces ¡ 100000 Baseline (unsampled) • SequenSal ¡PARDA ¡ SHARDS R = 0.010 SHARDS R = 0.001 10000 SHARDS S max = 8K • Basic ¡SHARDS ¡ Memory Usage (MB) 1000 – Modified ¡PARDA ¡ – Memory ¡≈ ¡R ¡× ¡baseline ¡ 100 for ¡larger ¡traces ¡ 10 • Fixed-­‑size ¡SHARDS ¡ 1 – New ¡space-­‑efficient ¡code ¡ 0.1 – Constant ¡1 ¡MB ¡footprint ¡ 0 20 40 60 80 100 120 Trace Number CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 14 ¡

  15. Processing ¡Time ¡ • Full ¡set ¡of ¡124 ¡traces ¡ 100000 Baseline (unsampled) • SequenSal ¡PARDA ¡ SHARDS R = 0.010 SHARDS R = 0.001 10000 SHARDS S max = 8K • Basic ¡SHARDS ¡ 1000 CPU Usage (sec) – Modified ¡PARDA ¡ 100 – R=0.001 ¡speedup ¡41–1029× ¡ ¡ 10 • Fixed-­‑size ¡SHARDS ¡ 1 – New ¡space-­‑efficient ¡code ¡ 0.1 – Overhead ¡for ¡evicSons ¡ 0.01 – S max = ¡8K ¡speedup ¡6–204× ¡ ¡ 0 20 40 60 80 100 120 Trace Number CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 15 ¡

  16. Counter ¡Stacks ¡Comparison ¡ Algorithm ¡ Memory ¡ ¡ Throughput ¡ Error ¡ (MB) ¡ ¡(Mrefs/sec) ¡ (MAE) ¡ Counter ¡Stacks ¡ 80.0 ¡ 2.3 ¡ 0.0025 ¡ SHARDS ¡S max =32K ¡ 2.0 ¡ 16.9 ¡ 0.0026 ¡ SHARDS ¡S max =8K ¡ 1.3 ¡ 17.6 ¡ 0.0061 ¡ • QuanStaSve ¡ – Same ¡merged ¡MSR ¡“master” ¡trace ¡ – Counter ¡Stacks ¡roughly ¡7× ¡slower, ¡40–62× ¡bigger ¡ • QualitaSve ¡ – Counter ¡Stacks ¡checkpoints ¡support ¡splicing/merging ¡ – SHARDS ¡maintains ¡block ¡ids, ¡generalizes ¡to ¡non-­‑LRU ¡ CloudPhysics, ¡Inc. ¡ USENIX ¡FAST ¡'15 ¡ 16 ¡

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