Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analysis of HDFS Under HBase: A Facebook Messages Case Study Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows,

Similar presentations


Presentation on theme: "Analysis of HDFS Under HBase: A Facebook Messages Case Study Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows,"— Presentation transcript:

1 Analysis of HDFS Under HBase: A Facebook Messages Case Study Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows, Tushar Chandra, Andrew Fikes, Robert E. Gruber Google, Inc. OSDI 2006 Tyler Harter, University of Wisconsin—Madison; Dhruba Borthakur, Siying Dong, Amitanand Aiyer, and Liyin Tang, Facebook Inc.; Andrea C. Arpaci-Dusseau and Remzi H. Arpaci- Dusseau, University of Wisconsin—Madison Presenter: Chang Dong

2 Outline r Introduction r Background r Methodology r Workload Behavior r Tiered Storage: Adding Flash r Layering: Pitfalls and Solutions r Conclusions

3 Outline r Introduction r Background r Methodology r Workload Behavior r Tiered Storage: Adding Flash r Layering: Pitfalls and Solutions r Conclusions

4 Introduction r HBase + HDFS Is HDFS an effective storage backend for HBase? r Facebook Messages (FM) send chat email-like messages cellphone text

5 Introduction r layered architecture pros: simplified the implementation lower development costs codes sharing between systems cons: decreased performance lowered reliability other related issues

6 Introduction r How to analyse? 1. collect detailed HDFS-level traces within a specially-configured shadow cluster. 2. perform numerous simulations of various caching, logging, and other architectural enhancements and modifications.

7 Outline r Introduction r Background r Methodology r Workload Behavior r Tiered Storage: Adding Flash r Layering: Pitfalls and Solutions r Conclusions

8 Background HBase Architecture

9 Background r HBase’s HDFS file four activities do HDFS I/O: A. logging B. flushing C. foreground reading D. compaction Baseline I/O: flushing and foreground reading HBase overhead: logging and compcation

10 Outline r Introduction r Background r Methodology r Workload Behavior r Tiered Storage: Adding Flash r Layering: Pitfalls and Solutions r Conclusions

11 Methodology r Trace Collection and Analysis HTFS(Hadoop Trace File System)

12 Outline r Introduction r Background r Methodology r Workload Behavior r Tiered Storage: Adding Flash r Layering: Pitfalls and Solutions r Conclusions

13 Workload Behavior r What are the major causes of I/O at each layer of the stack ? r How much I/O and space is required by different types of data ? r How large are files, and does file size predict file lifetime ? r Do requests exhibit patterns such as locality or sequentiality ?

14 Workload Behavior r What are the major causes of I/O at each layer of the stack ?

15 Workload Behavior r What are the major causes of I/O at each layer of the stack ? Layers amplify writes: 1% => 64%

16 Workload Behavior r What are the major causes of I/O at each layer of the stack ? Data is read or written, but rarely both

17 Workload Behavior r What are the major causes of I/O at each layer of the stack ? Conclusion: Conclusion: read-heavy hot/cold nature FM is very read-heavy, but logging, compaction, replication, and caching amplify write I/O, causing writes to dominate disk I/O. We also observe that while the HDFS dataset accessed by core I/O is relatively small, on disk the dataset is very large (120TB) and very cold (two thirds is never touched). Thus, architectures to support this workload should consider its hot/cold nature.

18 Workload Behavior r How much I/O and space is required by different types of data ?

19 Workload Behavior r How much I/O and space is required by different types of data ?

20 Workload Behavior r How much I/O and space is required by different types of data ?

21 Workload Behavior r How much I/O and space is required by different types of data ? Conclusion: Conclusion: helper data caching writes FM uses significant space to store messages and does a significant amount of I/O on these messages; however, both space and I/O are dominated by helper data (i.e., metadata, indexes, and logs). Relatively little data is both written and read during tracing; this suggests caching writes is of little value.

22 Workload Behavior r How large are files, and does file size predict file lifetime ?

23 Workload Behavior r How large are files, and does file size predict file lifetime ? Files are very small: 90% smaller than 6.3MB

24 Workload Behavior r How large are files, and does file size predict file lifetime ?

25 Workload Behavior r How large are files, and does file size predict file lifetime ? Conclusion: small and short-lived data-to-metadata Traditional HDFS workloads operate on very large files. While most FM data lives in large, long-lived files, most files are small and short-lived. This has metadata-management implications; HDFS manages all file metadata with a single NameNode because the data-to-metadata ratio is assumed to be high. For FM, this assumption does not hold; perhaps distributing HDFS metadata management should be reconsidered.

26 Workload Behavior r Do requests exhibit patterns such as locality or sequentiality ?

27 Workload Behavior r Do requests exhibit patterns such as locality or sequentiality ?

28 Workload Behavior r Do requests exhibit patterns such as locality or sequentiality ?

29 Workload Behavior r Do requests exhibit patterns such as locality or sequentiality ? Conclusion: little sequentiality little spatial locality hot At the HDFS level, FM exhibits relatively little sequentiality, suggesting high-bandwidth, high-latency storage mediums (e.g., disk) are not ideal for serving reads. The workload also shows very little spatial locality, suggesting additional prefetching would not help, possibly because FM already chooses for itself what data to prefetch. However, despite application-level and HBase-level caching, some of the HDFS data is particularly hot; thus, additional caching could help.

30 Outline r Introduction r Background r Methodology r Workload Behavior r Tiered Storage: Adding Flash r Layering: Pitfalls and Solutions r Conclusions

31 Tiered Storage: Add Flash r How much can we improve performance without flash, by spending more on RAM or disks ? r What policies utilize a tiered RAM/flash cache best ? r Is flash better used as a cache to absorb reads or as a buffer to absorb writes ? r Is the cost of a flash tier justifiable ?

32 Tiered Storage: Add Flash r How much can we improve performance without flash, by spending more on RAM or disks ?

33 Tiered Storage: Add Flash r How much can we improve performance without flash, by spending more on RAM or disks ?

34 Tiered Storage: Add Flash r How much can we improve performance without flash, by spending more on RAM or disks ?

35 Tiered Storage: Add Flash r How much can we improve performance without flash, by spending more on RAM or disks ? Conclusion: relatively little sequentiality or parallelism large cache The FM workload exhibits relatively little sequentiality or parallelism, so adding more disks or higher-bandwidth disks is of limited utility. Fortunately, the same data is often repeatedly read (§4.4), so a very large cache (i.e., a few hundred GBs in size) can service nearly 80% of the reads. The usefulness of a very large cache suggests that storing at least some of the hot data in flash may be most cost effective.

36 Tiered Storage: Add Flash r What policies utilize a tiered RAM/flash cache best ?

37 Tiered Storage: Add Flash r What policies utilize a tiered RAM/flash cache best ?

38 Tiered Storage: Add Flash r What policies utilize a tiered RAM/flash cache best ?

39 Tiered Storage: Add Flash r What policies utilize a tiered RAM/flash cache best ? Conclusion: improve the caching hit rate wearShuffling data Adding flash to RAM can greatly improve the caching hit rate; furthermore a hybrid flash/RAM cache can eliminate half of the extra disk reads that usually occur after a crash. However, using flash raises concerns about wear. Shuffling data between flash and RAM to keep the hottest data in RAM improves performance but can easily decrease SSD lifetime by a factor of 2x relative to a wear-aware policy. Fortunately, larger SSDs tend to have long life times for FM, so wear may be a small concern.

40 Tiered Storage: Add Flash r Is flash better used as a cache to absorb reads or as a buffer to absorb writes ?

41 Tiered Storage: Add Flash r Is flash better used as a cache to absorb reads or as a buffer to absorb writes ?

42 Tiered Storage: Add Flash r Is flash better used as a cache to absorb reads or as a buffer to absorb writes ? Conclusion: small gains Using flash to buffer all writes results in much worse performance than using flash only as a cache. If flash is used for both caching and buffering, and if policies are tuned to only buffer files of the right size, then performance can be slightly improved. We conclude that these small gains are probably not worth the added complexity, so flash should be for caching only.

43 Tiered Storage: Add Flash r Is the cost of a flash tier justifiable ?

44 Tiered Storage: Add Flash r Is the cost of a flash tier justifiable ?

45 Tiered Storage: Add Flash r Is the cost of a flash tier justifiable ? Conclusion: Not only does adding a flash tier to the FM stack greatly improve performance, but it is the most cost-effective way of improving performance. In some cases, adding a small SSD can triple performance while only increasing monetary costs by 5%.

46 Outline r Introduction r Background r Methodology r Workload Behavior r Tiered Storage: Adding Flash Layering: Pitfalls and Solutions r Layering: Pitfalls and Solutions r Conclusions

47 Layering: Pitfalls & Solutions r Layering Background

48 Layering: Pitfalls & Solutions r Local Compaction

49 Layering: Pitfalls & Solutions r Local Compaction

50 Layering: Pitfalls & Solutions r Local Compaction Conclusion: turns over half the network I/O into disk reads Doing local compaction by bypassing the replication layer turns over half the network I/O into disk reads. This is a good tradeoff as network I/O is generally more expensive than sequential disk I/O.

51 Layering: Pitfalls & Solutions r Combined Logging

52 Layering: Pitfalls & Solutions r Combined Logging

53 Layering: Pitfalls & Solutions r Combined Logging Conclusion: Merging multiple HBase logs Merging multiple HBase logs on a dedicated disk reduces logging latencies by a factor of 6. However, put requests do not currently block until data is flushed to disks, and the performance impact on foreground reads is negligible. Thus, the additional complexity of combined logging is likely not worthwhile given the current durability guarantees.

54 Outline r Introduction r Background r Methodology r Workload Behavior r Tiered Storage: Adding Flash r Layering: Pitfalls and Solutions Conclusions r Conclusions

55 Conclusions Message is new HDFS workload. r Message is new HDFS workload. r Layering is not free. r Flash should not replace disk.

56


Download ppt "Analysis of HDFS Under HBase: A Facebook Messages Case Study Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows,"

Similar presentations


Ads by Google