HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters


Published on

An increasing number of popular applications become data-intensive in nature. In the past decade, the World Wide Web has been adopted as an ideal platform for developing data-intensive applications, since the communication paradigm of the Web is sufficiently open and powerful. Data-intensive applications like data mining and web indexing need to access ever-expanding data sets ranging from a few gigabytes to several terabytes or even petabytes. Google leverages the MapReduce model to process approximately twenty petabytes of data per day in a parallel fashion. In this talk, we introduce the Google’s MapReduce framework for processing huge datasets on large clusters. We first outline the motivations of the MapReduce framework. Then, we describe the dataflow of MapReduce. Next, we show a couple of example applications of MapReduce. Finally, we present our research project on the Hadoop Distributed File System.

The current Hadoop implementation assumes that computing nodes in a cluster are homogeneous in nature. Data locality has not been taken into
account for launching speculative map tasks, because it is
assumed that most maps are data-local. Unfortunately, both
the homogeneity and data locality assumptions are not satisfied
in virtualized data centers. We show that ignoring the datalocality issue in heterogeneous environments can noticeably
reduce the MapReduce performance. In this paper, we address
the problem of how to place data across nodes in a way that
each node has a balanced data processing load. Given a dataintensive application running on a Hadoop MapReduce cluster,
our data placement scheme adaptively balances the amount of
data stored in each node to achieve improved data-processing
performance. Experimental results on two real data-intensive
applications show that our data placement strategy can always
improve the MapReduce performance by rebalancing data
across nodes before performing a data-intensive application
in a heterogeneous Hadoop cluster.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Cite here What is the hadoop? http://www.cloudera.com/what-is-hadoop/ Hadoop is an open-source project administered by the Apache Software Foundation . Hadoop’s contributors work for some of the world’s biggest technology companies. That diverse, motivated community has produced a genuinely innovative platform for consolidating, combining and understanding data. Technically, Hadoop consists of two key services: reliable data storage using the Hadoop Distributed File System (HDFS) and high-performance parallel data processing using a technique called MapReduce. Hadoop runs on a collection of commodity, shared-nothing servers. You can add or remove servers in a Hadoop cluster at will; the system detects and compensates for hardware or system problems on any server. Hadoop, in other words, is self-healing. It can deliver data — and can run large-scale, high-performance processing jobs — in spite of system changes or failures.
  • Slow down, add animation of speculative task helping Note: Mention that we tested this on a heterogeneous Hadoop cluster
  • Copy page 7 to here Note: Please add legend on this diagram. E.g., black bars represent ******, red bars represent ***** Show data movement (migration)
  • Real results for the aforementioned motivational example.
  • Note: Explain what is the definition of computing ratio
  • Note: Name the over-utilized node list and the under-utilized node list on the diagram. a->A, b->B
  • The heterogeneity measurement of a cluster depends on data-intensive applications. If multiple MapReduce applications must process the same input file, the data placement mechanism may need to distribute the input file’s fragments in several ways - one for each MapReduce application. In the case where multiple applications are similar in terms of data processing speed, one data placement decision may fit the needs of all the application
  • Note: improve the resolution of the figures
  • Title Application dependence Independenced of Data size Note 1: improve the quality of the figures. Large figures and large legend Note 2:
  • number
  • HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters

    1. 1. MapReduce: Simplified Data Processing on Large Clusters 02/28/11 Xiao Qin Department of Computer Science and Software Engineering Auburn University http://www.eng.auburn.edu/~xqin [email_address] Slides 2-20 are adapted from notes by Subbarao Kambhampati (ASU), Dan Weld (U. Washington), Jeff Dean, Sanjay Ghemawat, (Google, Inc.)
    2. 2. Motivation <ul><li>Large-Scale Data Processing </li></ul><ul><ul><li>Want to use 1000s of CPUs </li></ul></ul><ul><ul><ul><li>But don ’ t want hassle of managing things </li></ul></ul></ul><ul><li>MapReduce provides </li></ul><ul><ul><li>Automatic parallelization & distribution </li></ul></ul><ul><ul><li>Fault tolerance </li></ul></ul><ul><ul><li>I/O scheduling </li></ul></ul><ul><ul><li>Monitoring & status updates </li></ul></ul>
    3. 3. Map/Reduce <ul><li>Map/Reduce </li></ul><ul><ul><li>Programming model from Lisp </li></ul></ul><ul><ul><li>(and other functional languages) </li></ul></ul><ul><li>Many problems can be phrased this way </li></ul><ul><li>Easy to distribute across nodes </li></ul><ul><li>Nice retry/failure semantics </li></ul>
    4. 4. Distributed Grep Very big data Split data Split data Split data Split data grep grep grep grep matches matches matches matches cat All matches
    5. 5. Distributed Word Count Very big data Split data Split data Split data Split data count count count count count count count count merge merged count
    6. 6. Map Reduce <ul><li>Map: </li></ul><ul><ul><li>Accepts input key/value pair </li></ul></ul><ul><ul><li>Emits intermediate key/value pair </li></ul></ul><ul><li>Reduce : </li></ul><ul><ul><li>Accepts intermediate key/value* pair </li></ul></ul><ul><ul><li>Emits output key/value pair </li></ul></ul>Very big data Result M A P R E D U C E Partitioning Function
    7. 7. Map in Lisp (Scheme) <ul><li>(map f list [list 2 list 3 … ] ) </li></ul><ul><li>(map square ‘ (1 2 3 4)) </li></ul><ul><ul><li>(1 4 9 16) </li></ul></ul><ul><li>(reduce + ‘ (1 4 9 16)) </li></ul><ul><ul><li>(+ 16 (+ 9 (+ 4 1) ) ) </li></ul></ul><ul><ul><li>30 </li></ul></ul><ul><li>(reduce + (map square (map – l 1 l 2 )))) </li></ul>Unary operator Binary operator
    8. 8. Map/Reduce ala Google <ul><li>map(key, val) is run on each item in set </li></ul><ul><ul><li>emits new-key / new-val pairs </li></ul></ul><ul><li>reduce(key, vals) is run for each unique key emitted by map() </li></ul><ul><ul><li>emits final output </li></ul></ul>
    9. 9. count words in docs <ul><ul><li>Input consists of (url, contents) pairs </li></ul></ul><ul><ul><li>map(key=url, val=contents): </li></ul></ul><ul><ul><ul><li>For each word w in contents, emit (w, “ 1 ” ) </li></ul></ul></ul><ul><ul><li>reduce(key=word, values=uniq_counts): </li></ul></ul><ul><ul><ul><li>Sum all “ 1 ” s in values list </li></ul></ul></ul><ul><ul><ul><li>Emit result “ (word, sum) ” </li></ul></ul></ul>
    10. 10. Count, Illustrated <ul><ul><li>map(key=url, val=contents): </li></ul></ul><ul><ul><ul><li>For each word w in contents, emit (w, “ 1 ” ) </li></ul></ul></ul><ul><ul><li>reduce(key=word, values=uniq_counts): </li></ul></ul><ul><ul><ul><li>Sum all “ 1 ” s in values list </li></ul></ul></ul><ul><ul><ul><li>Emit result “ (word, sum) ” </li></ul></ul></ul><ul><ul><li>see bob throw </li></ul></ul><ul><ul><li>see spot run </li></ul></ul><ul><ul><li>see 1 </li></ul></ul><ul><ul><li>bob 1 </li></ul></ul><ul><ul><li>run 1 </li></ul></ul><ul><ul><li>see 1 </li></ul></ul><ul><ul><li>spot 1 </li></ul></ul><ul><ul><li>throw 1 </li></ul></ul><ul><ul><li>bob 1 </li></ul></ul><ul><ul><li>Run 1 </li></ul></ul><ul><ul><li>see 2 </li></ul></ul><ul><ul><li>spot 1 </li></ul></ul><ul><ul><li>throw 1 </li></ul></ul>
    11. 11. Grep <ul><ul><li>Input consists of (url+offset, single line) </li></ul></ul><ul><ul><li>map(key=url+offset, val=line): </li></ul></ul><ul><ul><ul><li>If contents matches regexp, emit (line, “ 1 ” ) </li></ul></ul></ul><ul><ul><li>reduce(key=line, values=uniq_counts): </li></ul></ul><ul><ul><ul><li>Don ’ t do anything; just emit line </li></ul></ul></ul>
    12. 12. Reverse Web-Link Graph <ul><li>Map </li></ul><ul><ul><li>For each URL linking to target, … </li></ul></ul><ul><ul><li>Output <target, source> pairs </li></ul></ul><ul><li>Reduce </li></ul><ul><ul><li>Concatenate list of all source URLs </li></ul></ul><ul><ul><li>Outputs: <target, list (source)> pairs </li></ul></ul>
    13. 13. Model is Widely Applicable MapReduce Programs In Google Source Tree Example uses: distributed grep   distributed sort   web link-graph reversal term-vector / host web access log stats inverted index construction document clustering machine learning statistical machine translation ... ... ...
    14. 14. Implementation Overview <ul><li>Typical cluster: </li></ul><ul><ul><ul><ul><li>100s/1000s of 2-CPU x86 machines, 2-4 GB of memory </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Limited bisection bandwidth </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Storage is on local IDE disks </li></ul></ul></ul></ul><ul><ul><ul><ul><li>GFS: distributed file system manages data (SOSP'03) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Job scheduling system: jobs made up of tasks, scheduler assigns tasks to machines </li></ul></ul></ul></ul><ul><li>Implementation is a C++ library linked into user programs </li></ul>
    15. 15. Execution <ul><li>How is this distributed? </li></ul><ul><ul><li>Partition input key/value pairs into chunks, run map() tasks in parallel </li></ul></ul><ul><ul><li>After all map()s are complete, consolidate all emitted values for each unique emitted key </li></ul></ul><ul><ul><li>Now partition space of output map keys, and run reduce() in parallel </li></ul></ul><ul><li>If map() or reduce() fails, reexecute! </li></ul>
    16. 16. Job Processing JobTracker TaskTracker 0 TaskTracker 1 TaskTracker 2 TaskTracker 3 TaskTracker 4 TaskTracker 5 <ul><li>Client submits “grep” job, indicating code and input files </li></ul><ul><li>JobTracker breaks input file into k chunks, (in this case 6). Assigns work to ttrackers. </li></ul><ul><li>After map(), tasktrackers exchange map-output to build reduce() keyspace </li></ul><ul><li>JobTracker breaks reduce() keyspace into m chunks (in this case 6). Assigns work. </li></ul><ul><li>reduce() output may go to NDFS </li></ul>“ grep”
    17. 17. Execution
    18. 18. Parallel Execution
    19. 19. Task Granularity & Pipelining <ul><li>Fine granularity tasks: map tasks >> machines </li></ul><ul><ul><li>Minimizes time for fault recovery </li></ul></ul><ul><ul><li>Can pipeline shuffling with map execution </li></ul></ul><ul><ul><li>Better dynamic load balancing </li></ul></ul><ul><li>Often use 200,000 map & 5000 reduce tasks </li></ul><ul><li>Running on 2000 machines </li></ul>
    20. 20. MapReduce outside Google <ul><li>Hadoop (Java) </li></ul><ul><ul><li>Emulates MapReduce and GFS </li></ul></ul><ul><li>The architecture of Hadoop MapReduce and DFS is master/slave </li></ul>Master Slave MapReduce jobtracker tasktracker DFS namenode datanode
    21. 21. Improving MapReduce Performance through Data Placement in Heterogeneous Hadoop Clusters Download Software at: http://www.eng.auburn.edu/~xqin/software/hdfs-hc This HDFS-HC tool was described in our paper -  Improving MapReduce Performance via Data Placement in Heterogeneous Hadoop Clusters  - by J. Xie, S. Yin, X.-J. Ruan, Z.-Y. Ding, Y. Tian, J. Majors, and X. Qin, published in Proc. 19th Int'l Heterogeneity in Computing Workshop, Atlanta, Georgia, April 2010.
    22. 22. Hadoop Overview (J. Dean and S. Ghemawat. Mapreduce: Simplified data processing on large clusters. OSDI ’04, pages 137–150, 2008)
    23. 23. One time setup <ul><li>set hadoop-site.xml and slaves </li></ul><ul><li>Initiate namenode </li></ul><ul><li>Run Hadoop MapReduce and DFS </li></ul><ul><li>Upload your data to DFS </li></ul><ul><li>Run your process… </li></ul><ul><li>Download your data from DFS </li></ul>
    24. 24. Hadoop Distributed File System (http://lucene.apache.org/hadoop)
    25. 25. Motivational Example Time (min) Node A (fast) Node B (slow) Node C (slowest) 2x slower 3x slower 1 task/min
    26. 26. The Native Strategy Node A Node B Node C 3 tasks 2 tasks 6 tasks Loading Transferring Processing Time (min)
    27. 27. Our Solution --Reducing data transfer time Node A’ Node B’ Node C’ 3 tasks 2 tasks 6 tasks Loading Transferring Processing Time (min) Node A
    28. 28. Preliminary Results Impact of data placement on performance of grep
    29. 29. Challenges   <ul><li>Does computing ratio depend on the application? </li></ul><ul><li>Initial data distribution </li></ul><ul><li>Data skew problem </li></ul><ul><ul><li>New data arrival </li></ul></ul><ul><ul><li>Data deletion   </li></ul></ul><ul><ul><li>New joining node </li></ul></ul><ul><ul><li>Data updating </li></ul></ul>
    30. 30. Measure Computing Ratios <ul><li>Computing ratio </li></ul><ul><li>Fast machines process large data sets </li></ul>Time Node A Node B Node C 2x slower 3x slower 1 task/min
    31. 31. Steps to Measure Computing Ratios 1. Run the application on each node with the same size data, individually collect the response time 2. Set the ratio of the shortest response as 1, accordingly set the ratio of other nodes 3.Caculate the least common multiple of these ratios 4. Count the portion of each node Node Response time(s) Ratio # of File Fragments Speed Node A 10 1 6 Fastest Node B 20 2 3 Average Node C 30 3 2 Slowest
    32. 32. Initial Data Distribution Namenode Datanodes File1 6 c <ul><li>Input files split into 64MB blocks </li></ul><ul><li>Round-robin data distribution algorithm </li></ul>C B A Portion 3:2:1 1 2 3 4 5 7 8 9 a b
    33. 33. Data Redistribution <ul><li>1.Get network topology, the ratio and utilization </li></ul><ul><li>2.Build and sort two lists: </li></ul><ul><li>under-utilized node list  L1 </li></ul><ul><li>over-utilized node list  L2 </li></ul><ul><li>3. Select the source and destination node from the lists. </li></ul><ul><li>4.Transfer data </li></ul><ul><li>5.Repeat step 3, 4 until the list is empty. </li></ul>1 Namenode 1 2 3 4 5 6 7 8 9 a b c C A C B A B 2 3 4 L1 L2 Portion 3:2:1
    34. 34. Sharing Files among Multiple Applications <ul><li>The computing ratio depends on data-intensive applications. </li></ul><ul><ul><li>Redistribution </li></ul></ul><ul><ul><li>Redundancy </li></ul></ul>
    35. 35. Experimental Environment Five nodes in a hadoop heterogeneous cluster Node CPU Model CPU(Hz) L1 Cache(KB) Node A Intel core 2 Duo 2*1G=2G 204 Node B Intel Celeron 2.8G 256 Node C Intel Pentium 3 1.2G 256 Node D Intel Pentium 3 1.2G 256 Node E Intel Pentium 3 1.2G 256
    36. 36. Grep and WordCount <ul><li>Grep is a tool searching for a regular expression in a text file </li></ul><ul><li>WordCount is a program used to count words in a text file </li></ul>
    37. 37. Computing ratio for two applications Computing ratio of the five nodes with respective of Grep and Wordcount applications Computing Node Ratios for Grep Ratios for Wordcount Node A 1 1 Node B 2 2 Node C 3.3 5 Node D 3.3 5 Node E 3.3 5
    38. 38. Response time of Grep and wordcount in each Node Application dependence Data size independence
    39. 39. Six Data Placement Decisions
    40. 40. Impact of data placement on performance of Grep
    41. 41. Impact of data placement on performance of WordCount
    42. 42. Conclusion <ul><li>Identify the performance degradation caused by heterogeneity. </li></ul><ul><li>Designed and implemented a data placement mechanism in HDFS. </li></ul>
    43. 43. Future Work <ul><li>Data redundancy issue </li></ul><ul><li>Dynamic data distribution mechanism </li></ul><ul><li>Prefetching </li></ul>
    44. 44. Fellowship Program Samuel Ginn College of Engineering at Auburn University <ul><li>Dean's Fellowship: $32,000 per year plus tuition fellowship </li></ul><ul><li>College Fellowship: $24,000 per year plus tuition fellowship </li></ul><ul><li>Departmental Fellowship: $20,000 per year plus tuition fellowship. </li></ul><ul><li>Tuition Fellowships: Tuition Fellowships provide a full tuition waiver for a student with a 25 percent or greater full-time-equivalent (FTE) assignment. Both graduate research assistants (GRAs) and graduate teaching assistants (GTAs) are eligible. </li></ul>
    45. 45. http://www.eng.auburn.edu/programs/grad-school/fellowship-program/
    46. 46. http://www.eng.auburn.edu
    47. 47. http://www.eng.auburn.edu
    48. 48. http://www.eng.auburn.edu
    49. 49. Download the presentation slides http://www.slideshare.net/xqin74 Google: slideshare Xiao Qin
    50. 50. Questions