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 Oded Rosen <od...@legolas-media.com> on 2010/09/01 14:18:42 UTC
Job performance issue: output.collect()
Hi all,
My job (written in old 0.18 api, but that's not the issue here) is producing
large amounts of map output.
Each map() call generates about ~20 output.collects, and each output is
pretty big (~1K) => each map() produces about 20K.
All of this data is fed to a combiner that really reduces the output's size
+ amounts.
the job input is not so big: there are about 120M map input records.
This job is pretty slow. Other jobs that work on the same input are much
faster, since they do not produce so much output.
Analyzing the job performance (timing the map() function parts), I've seen
that much time is spent on the output.collect() line itself.
I know that during the output.collect() command the output is being written
to local filesystem spills (when the spill buffer reaches a 80% limit),
so I guessed that reducing the size of each output will improve performance.
This was not the case - after cutting 30% of the map output size, the job
took the same amount of time. The thing that I cannot reduce is the amount
of output lines being written out of the map.
I would like to know what happens in the output.collect line that takes lots
of time, in order to cut down this job's running time.
Please keep in mind that I have a combiner, and to my understanding
different things happen to the map output when a combiner is present.
Can anyone help me understand how can I save this precious time?
Thanks,
--
Oded
Re: api doc incomplete
Posted by Owen O'Malley <om...@apache.org>.
On Sep 1, 2010, at 8:56 AM, Gang Luo wrote:
> Hi all,
> does anybody notice the online api doc is incomplete? At
> http://hadoop.apache.org/common/docs/current/api/ there is even no
> mapred or
> mapreduce package there. I remember I use it well before. What happen?
When {common,hdfs,mapreduce}-0.21.0 was released, it became current.
Since the project split happened between 0.20 to 0.21, that means the
"current" docs are now split. If you look at http://hadoop.apache.org/mapreduce/docs/current/api
, you'll find what you are looking for. Additionally, we should make a
stable link that points to the latest of the 0.20 line.
-- Owen
api doc incomplete
Posted by Gang Luo <lg...@yahoo.com.cn>.
Hi all,
does anybody notice the online api doc is incomplete? At
http://hadoop.apache.org/common/docs/current/api/ there is even no mapred or
mapreduce package there. I remember I use it well before. What happen?
Thanks,
-Gang
Re: Job performance issue: output.collect()
Posted by Owen O'Malley <om...@apache.org>.
On Sep 1, 2010, at 5:18 AM, Oded Rosen wrote:
> I would like to know what happens in the output.collect line that
> takes lots
> of time, in order to cut down this job's running time.
> Please keep in mind that I have a combiner, and to my understanding
> different things happen to the map output when a combiner is present.
The best presentation on the map side sort is the one that Chris
Douglas (who did most of the implementation) did for the Bay Area HUG.
http://developer.yahoo.net/blogs/hadoop/2010/01/hadoop_bay_area_january_2010_u.html
There are both slides and a video of the presentation. I'd run through
that first.
You most likely are getting more spills than you deserve. The
variables to look at:
io.sort.mb - should be most of the task's ram budget
io.sort.record.percent - depends on record size
io.sort.factor - typically 25 * (# of disks / node)
-- Owen
Re: Job performance issue: output.collect()
Posted by He Chen <ai...@gmail.com>.
Hey Oded Rosen
I am not sure what is the functionality of your map() method. Intuitively,
move the map() method computation to the reduce() method if your map()
output is problematic. I mean just let the map() method act as a data input
reader and divider and let reduce() method do all you computation. In this
way, your intermediate results are less than before. Shuffle time can also
be reduced.
If the computation is still slow, I think it may not be the MapReduce
framework problem, but your programs. Hope this helps.
Chen
On Wed, Sep 1, 2010 at 7:18 AM, Oded Rosen <od...@legolas-media.com> wrote:
> Hi all,
>
> My job (written in old 0.18 api, but that's not the issue here) is
> producing
> large amounts of map output.
> Each map() call generates about ~20 output.collects, and each output is
> pretty big (~1K) => each map() produces about 20K.
> All of this data is fed to a combiner that really reduces the output's size
> + amounts.
> the job input is not so big: there are about 120M map input records.
>
> This job is pretty slow. Other jobs that work on the same input are much
> faster, since they do not produce so much output.
> Analyzing the job performance (timing the map() function parts), I've seen
> that much time is spent on the output.collect() line itself.
>
> I know that during the output.collect() command the output is being written
> to local filesystem spills (when the spill buffer reaches a 80% limit),
> so I guessed that reducing the size of each output will improve
> performance.
> This was not the case - after cutting 30% of the map output size, the job
> took the same amount of time. The thing that I cannot reduce is the amount
> of output lines being written out of the map.
>
> I would like to know what happens in the output.collect line that takes
> lots
> of time, in order to cut down this job's running time.
> Please keep in mind that I have a combiner, and to my understanding
> different things happen to the map output when a combiner is present.
>
> Can anyone help me understand how can I save this precious time?
> Thanks,
>
> --
> Oded
>