You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by Chris Schneider <Sc...@TransPac.com> on 2006/02/21 05:07:30 UTC

Single Map Task Requirement for Fetching

Nutch Developers,

At 9:00pm +0100 1/15/06, Andrzej Bialecki wrote:
>Also, I think the current implementation is not optimal, because it runs only a single map task for a fetcher. The reason for this is that it was the easiest way to ensure that we don't violate the politeness rules - if we ran multiple map tasks the methods blockAddr/unblockAddr in protocol-http couldn't prevent other map tasks from using the same address.
>
>The proper solution is IMHO a central lock manager. I looked at the code, it seems to me that JobTracker could manage this central lock manager (one per job? one per cluster? perhaps both?), this could be a part of a JobSubmissionProtocol - but I think there is no way now for the arbitrary code to reference it's JobClient.. bummer.

As I understand it, the current MapReduce implementation of fetching is restricted to running only one map task at a time on each TaskTracker. This is because IP blocking can't span multiple JVM instances, so there's no way to prevent two child processes on the same TaskTracker from hitting the same server simply through a Nutch-0.7-style blocking mechanism.

Assuming that the URLs have already been partitioned (and taking aside the merits of partitioning this way vs. by IP address - see my other email), wouldn't it be possible for the TaskTracker to avoid having two child processes hitting the same domain by ensuring that each was working on a separate domain?

Please forgive my vague understanding of the MapReduce implementation. I may also have misunderstood the gist of Andrzej's post (copied above).

Thanks,

- Chris

-- 
------------------------
Chris Schneider
TransPac Software, Inc.
Schmed@TransPac.com
------------------------

Re: Single Map Task Requirement for Fetching

Posted by Stefan Groschupf <sg...@media-style.com>.
Hi,
take care do not mix things:
My experience are:
numOfReduceTasks = numOfBoxes
numOfMapTasks = numOfBoxes * n // n =  1...4

Each task processed on a tasktracker run in a separated virtual  
machine. So in case you have 4 tasks running on one tasktracker you  
to start 4 virtual machines.
I'm no jvm expert but I guess that each jvm has some overhead in cpu  
and memory usage. So I _personal_ would only run one per tasktracker  
until I use a jvm that does this 'sharing stuff' ... didn't remember  
the exact name.

Stefan

Am 21.02.2006 um 17:44 schrieb Byron Miller:

> Stefan,
>
> Is this value best set by number of CPU's per
> tasktracker node?
>
> --- Stefan Groschupf <sg...@media-style.com> wrote:
>
>> Chris,
>>
>> first of all it is possible to run several map tasks
>> in one tasktracker.
>> See (Hadoop code) TaskTracker.java line 82 also
>> there is a
>> configuration value:
>> <property>
>>    <name>mapred.tasktracker.tasks.maximum</name>
>>    <value>2</value>
>>    <description>The maximum number of tasks that
>> will be run
>>    simultaneously by a task tracker.
>>    </description>
>> </property>
>>
>>
>

---------------------------------------------------------------
company:        http://www.media-style.com
forum:        http://www.text-mining.org
blog:            http://www.find23.net



Re: Single Map Task Requirement for Fetching

Posted by Byron Miller <by...@yahoo.com>.
Stefan,

Is this value best set by number of CPU's per
tasktracker node?

--- Stefan Groschupf <sg...@media-style.com> wrote:

> Chris,
> 
> first of all it is possible to run several map tasks
> in one tasktracker.
> See (Hadoop code) TaskTracker.java line 82 also
> there is a  
> configuration value:
> <property>
>    <name>mapred.tasktracker.tasks.maximum</name>
>    <value>2</value>
>    <description>The maximum number of tasks that
> will be run
>    simultaneously by a task tracker.
>    </description>
> </property>
> 
>

Re: Single Map Task Requirement for Fetching

Posted by Stefan Groschupf <sg...@media-style.com>.
Chris,

first of all it is possible to run several map tasks in one tasktracker.
See (Hadoop code) TaskTracker.java line 82 also there is a  
configuration value:
<property>
   <name>mapred.tasktracker.tasks.maximum</name>
   <value>2</value>
   <description>The maximum number of tasks that will be run
   simultaneously by a task tracker.
   </description>
</property>

But this does not effect your problem. Since each map task - also if  
they running on the same task tracker - has it's own partition with  
lexical divided urls.
Anyway this statement may does not answer the question but may one of  
the core contributor can give a more detailed statement.

Stefan



Am 21.02.2006 um 05:07 schrieb Chris Schneider:

> Nutch Developers,
>
> At 9:00pm +0100 1/15/06, Andrzej Bialecki wrote:
>> Also, I think the current implementation is not optimal, because  
>> it runs only a single map task for a fetcher. The reason for this  
>> is that it was the easiest way to ensure that we don't violate the  
>> politeness rules - if we ran multiple map tasks the methods  
>> blockAddr/unblockAddr in protocol-http couldn't prevent other map  
>> tasks from using the same address.
>>
>> The proper solution is IMHO a central lock manager. I looked at  
>> the code, it seems to me that JobTracker could manage this central  
>> lock manager (one per job? one per cluster? perhaps both?), this  
>> could be a part of a JobSubmissionProtocol - but I think there is  
>> no way now for the arbitrary code to reference it's JobClient..  
>> bummer.
>
> As I understand it, the current MapReduce implementation of  
> fetching is restricted to running only one map task at a time on  
> each TaskTracker. This is because IP blocking can't span multiple  
> JVM instances, so there's no way to prevent two child processes on  
> the same TaskTracker from hitting the same server simply through a  
> Nutch-0.7-style blocking mechanism.
>
> Assuming that the URLs have already been partitioned (and taking  
> aside the merits of partitioning this way vs. by IP address - see  
> my other email), wouldn't it be possible for the TaskTracker to  
> avoid having two child processes hitting the same domain by  
> ensuring that each was working on a separate domain?
>
> Please forgive my vague understanding of the MapReduce  
> implementation. I may also have misunderstood the gist of Andrzej's  
> post (copied above).
>
> Thanks,
>
> - Chris
>
> -- 
> ------------------------
> Chris Schneider
> TransPac Software, Inc.
> Schmed@TransPac.com
> ------------------------
>

---------------------------------------------------------------
company:        http://www.media-style.com
forum:        http://www.text-mining.org
blog:            http://www.find23.net