You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Doopah Shaf <do...@gmail.com> on 2009/12/21 08:14:03 UTC

how does hadoop work?

Trying to figure out how hadoop actually achieves its speed. Assuming that
data locality is central to the efficiency of hadoop, how does the magic
actually happen, given that data still gets moved all over the network to
reach the reducers?

For example, if I have 1gb of logs spread across 10 data nodes, and for the
sake of argument, assume I use the identity mapper. Then 90% of data still
needs to move across the network - how does the network not become saturated
this way?

What did I miss?...
Thanks,
D.S.

Re: how does hadoop work?

Posted by Ed Kohlwey <ek...@gmail.com>.
I wouldn't say that Hadoop is fast- its usually faster than using a single
machine, but there's other parallel computing paradigms that outperform it.
Hadoop -is- cheap.

That having been said, Hadoop's speed really comes from the fact that data
is being processed in parallel, so if you have 4 machines it should in
theory take 1/4 the time as on a single node. On the other hand, there's
many problems that Hadoop/map reduce is actually quite bad at solving, like
matrix multiplication. Some day people will probably implement other
parallel computing frameworks on top of HDFS, though, which should address
the limitations of map reduce.

On Mon, Dec 21, 2009 at 11:06 AM, Patrick Angeles
<pa...@gmail.com>wrote:

> DS,
>
> What you say is true, but there are finer points:
>
>   1. Data transfer can begin while the mapper is working through the data.
>   You would still bottleneck on the network if: (a) you have enough nodes
> and
>   spindles such that the aggregate disk transfer speed is greater than the
>   network capacity, and (b) the computation is trivial such that you
> produce
>   data faster than the network can sustain.
>   2. Compression can work wonders. You also get a better compression ratio
>   if you have a large map output key. (Imagine: {K,V1}, {K,V2}, {K,V3} gets
>   transferred as {K, {V1, V2, V3}})
>   3. In reality, most algorithms can be designed such that the map output
>   is much much smaller than the input data (e.g., count, sum, min, max,
> etc.).
>   4. If you're doing a simple transformation where 1 line of input = 1 line
>   of output (e.g., the identity mapper), then you can configure those to be
>   map only jobs, thus no shuffle.
>
> Hope this helps,
>
> - P
> On Mon, Dec 21, 2009 at 2:14 AM, Doopah Shaf <do...@gmail.com>
> wrote:
>
> > Trying to figure out how hadoop actually achieves its speed. Assuming
> that
> > data locality is central to the efficiency of hadoop, how does the magic
> > actually happen, given that data still gets moved all over the network to
> > reach the reducers?
> >
> > For example, if I have 1gb of logs spread across 10 data nodes, and for
> the
> > sake of argument, assume I use the identity mapper. Then 90% of data
> still
> > needs to move across the network - how does the network not become
> > saturated
> > this way?
> >
> > What did I miss?...
> > Thanks,
> > D.S.
> >
>

Re: how does hadoop work?

Posted by Patrick Angeles <pa...@gmail.com>.
DS,

What you say is true, but there are finer points:

   1. Data transfer can begin while the mapper is working through the data.
   You would still bottleneck on the network if: (a) you have enough nodes and
   spindles such that the aggregate disk transfer speed is greater than the
   network capacity, and (b) the computation is trivial such that you produce
   data faster than the network can sustain.
   2. Compression can work wonders. You also get a better compression ratio
   if you have a large map output key. (Imagine: {K,V1}, {K,V2}, {K,V3} gets
   transferred as {K, {V1, V2, V3}})
   3. In reality, most algorithms can be designed such that the map output
   is much much smaller than the input data (e.g., count, sum, min, max, etc.).
   4. If you're doing a simple transformation where 1 line of input = 1 line
   of output (e.g., the identity mapper), then you can configure those to be
   map only jobs, thus no shuffle.

Hope this helps,

- P
On Mon, Dec 21, 2009 at 2:14 AM, Doopah Shaf <do...@gmail.com> wrote:

> Trying to figure out how hadoop actually achieves its speed. Assuming that
> data locality is central to the efficiency of hadoop, how does the magic
> actually happen, given that data still gets moved all over the network to
> reach the reducers?
>
> For example, if I have 1gb of logs spread across 10 data nodes, and for the
> sake of argument, assume I use the identity mapper. Then 90% of data still
> needs to move across the network - how does the network not become
> saturated
> this way?
>
> What did I miss?...
> Thanks,
> D.S.
>

RE: how does hadoop work?

Posted by Ricky Ho <rh...@adobe.com>.
To my understanding, if data resides in HDFS, then the JobTracker will make use of location information to allocate data to the TaskTracker and hence can reduce the data movement between the data source and the Mapper.  Data movement between Mapper and Reducer is harder to minimize (maybe providing an application specific partitioner).

Hadoop is targeting at parallel complex processing algorithm, where the data movement overhead is relatively insignificant. It is not for everything.

Rgds,
Ricky
-----Original Message-----
From: Doopah Shaf [mailto:doopha.shaf@gmail.com] 
Sent: Sunday, December 20, 2009 11:14 PM
To: common-user@hadoop.apache.org
Subject: how does hadoop work?

Trying to figure out how hadoop actually achieves its speed. Assuming that
data locality is central to the efficiency of hadoop, how does the magic
actually happen, given that data still gets moved all over the network to
reach the reducers?

For example, if I have 1gb of logs spread across 10 data nodes, and for the
sake of argument, assume I use the identity mapper. Then 90% of data still
needs to move across the network - how does the network not become saturated
this way?

What did I miss?...
Thanks,
D.S.