You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Larsson85 <kr...@hotmail.com> on 2009/05/26 16:24:29 UTC
threads get stuck in spinwaiting
When I try to do my crawl it seems like the threads get stuck in som
spinwaiting mode. At first the crawl goes as planned, and I couldnt be
happier. But after som time, it starts reporting more of these spinwaiting
messages.
I print a log here to show you what it looks like. As you can see it gets
stuck, and the queue decrease by 1 all the time. I've tried doing a smaller
crawl, and what happends is that it counts down untill the
"fetchQueues.totalSize" reaches 0, and then the crawl is done.
But the problem is that this countdown is very slow,there's no effective
crawling going on, not using eather bandwith or cpu power. Basicly, this
costs way to much time, I cant let it go on like this for hours to be done.
How can I fix this?
after about an hour of crawling this is what the log looks like
-activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
-activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
- fetching http://home.swipnet.se/~w-147200/
-activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
-activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
- fetching http://biphome.spray.se/alarsson/
-activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
-activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
-activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
- fetching http://home.swipnet.se/~w-31853/html/
-activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
....
--
View this message in context: http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
Sent from the Nutch - User mailing list archive at Nabble.com.
Re: threads get stuck in spinwaiting
Posted by Otis Gospodnetic <og...@yahoo.com>.
Ah, I see. Sorry, I mixed up two different people whose names start with "R".
I was referring to generate.max.per.host = 1 from https://issues.apache.org/jira/browse/NUTCH-721
So what I described in my previous emails (Queues A, B, C) is how things work when you have multiple URLs per host and hosts have different numbers of URLs or differ in speed enough to create a scenario like the one I described. In my Nutch experience, this scenario *always* happens. You'll find my messages about this on this list via markmail.org from about 12-13 months ago.
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
----- Original Message ----
> From: Raymond Balmès <ra...@gmail.com>
> To: nutch-user@lucene.apache.org
> Sent: Wednesday, May 27, 2009 9:40:34 AM
> Subject: Re: threads get stuck in spinwaiting
>
> @otis
> or did you mean nutch/host. I have only one server for my tests.
>
> @larsson
> my spinwaiting phase is usually less than 30minutes.
>
> Something I noticed as well is the speed in the beginning is so fast that I
> can't read the screen. Not sure when the standard.out occurs at start_fetch
> or fetch_complete.
>
> -Raymond-
> 2009/5/27 Raymond Balmès
>
> > I have many URLs per host of course. Need to get all the pages of the
> > sites, don't understand the question.
> >
> > -Raymond
> >
> > 2009/5/26 Otis Gospodnetic
> >
> >
> >> But how, Ray, if you have only 1 URL per host?
> >>
> >> Otis
> >> --
> >> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
> >>
> >>
> >>
> >> ----- Original Message ----
> >> > From: Raymond Balmès
> >> > To: nutch-user@lucene.apache.org
> >> > Sent: Tuesday, May 26, 2009 4:11:27 PM
> >> > Subject: Re: threads get stuck in spinwaiting
> >> >
> >> > Observing what my crawls do, I believe Ken must be right.
> >> > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
> >> counts
> >> > down) in some cases I'm only fetching on two sites roughly , so indeed
> >> the
> >> > politeness starts to play a role there at least it should.
> >> >
> >> > -Ray-
> >> >
> >> > 2009/5/26 Raymond Balmès
> >> >
> >> > > Please read this too :
> >> > >
> >> > >
> >> >
> >>
> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
> >> > >
> >> > > Interesting build from ken.
> >> > >
> >> > > 2009/5/26 Raymond Balmès
> >> > >
> >> > > yes already reported in multiple-threads.
> >> > >> I noted that if one does a "recrawl" you don't get this behavior...
> >> no
> >> > >> idea why.
> >> > >>
> >> > >> -Raymond-
> >> > >>
> >> > >> 2009/5/26 Larsson85
> >> > >>
> >> > >>
> >> > >>> When I try to do my crawl it seems like the threads get stuck in
> >> som
> >> > >>> spinwaiting mode. At first the crawl goes as planned, and I couldnt
> >> be
> >> > >>> happier. But after som time, it starts reporting more of these
> >> > >>> spinwaiting
> >> > >>> messages.
> >> > >>>
> >> > >>> I print a log here to show you what it looks like. As you can see it
> >> gets
> >> > >>> stuck, and the queue decrease by 1 all the time. I've tried doing a
> >> > >>> smaller
> >> > >>> crawl, and what happends is that it counts down untill the
> >> > >>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
> >> > >>>
> >> > >>> But the problem is that this countdown is very slow,there's no
> >> effective
> >> > >>> crawling going on, not using eather bandwith or cpu power. Basicly,
> >> this
> >> > >>> costs way to much time, I cant let it go on like this for hours to
> >> be
> >> > >>> done.
> >> > >>> How can I fix this?
> >> > >>>
> >> > >>>
> >> > >>> after about an hour of crawling this is what the log looks like
> >> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> >> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> >> > >>> - fetching http://home.swipnet.se/~w-147200/
> >> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> >> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> >> > >>> - fetching http://biphome.spray.se/alarsson/
> >> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> >> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> >> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> >> > >>> - fetching http://home.swipnet.se/~w-31853/html/
> >> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
> >> > >>>
> >> > >>> ....
> >> > >>>
> >> > >>> --
> >> > >>> View this message in context:
> >> > >>>
> >> >
> >>
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
> >> > >>> Sent from the Nutch - User mailing list archive at Nabble.com.
> >> > >>>
> >> > >>>
> >> > >>
> >> > >
> >>
> >>
> >
Re: threads get stuck in spinwaiting
Posted by Raymond Balmès <ra...@gmail.com>.
@otis
or did you mean nutch/host. I have only one server for my tests.
@larsson
my spinwaiting phase is usually less than 30minutes.
Something I noticed as well is the speed in the beginning is so fast that I
can't read the screen. Not sure when the standard.out occurs at start_fetch
or fetch_complete.
-Raymond-
2009/5/27 Raymond Balmès <ra...@gmail.com>
> I have many URLs per host of course. Need to get all the pages of the
> sites, don't understand the question.
>
> -Raymond
>
> 2009/5/26 Otis Gospodnetic <og...@yahoo.com>
>
>
>> But how, Ray, if you have only 1 URL per host?
>>
>> Otis
>> --
>> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>>
>>
>>
>> ----- Original Message ----
>> > From: Raymond Balmès <ra...@gmail.com>
>> > To: nutch-user@lucene.apache.org
>> > Sent: Tuesday, May 26, 2009 4:11:27 PM
>> > Subject: Re: threads get stuck in spinwaiting
>> >
>> > Observing what my crawls do, I believe Ken must be right.
>> > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
>> counts
>> > down) in some cases I'm only fetching on two sites roughly , so indeed
>> the
>> > politeness starts to play a role there at least it should.
>> >
>> > -Ray-
>> >
>> > 2009/5/26 Raymond Balmès
>> >
>> > > Please read this too :
>> > >
>> > >
>> >
>> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
>> > >
>> > > Interesting build from ken.
>> > >
>> > > 2009/5/26 Raymond Balmès
>> > >
>> > > yes already reported in multiple-threads.
>> > >> I noted that if one does a "recrawl" you don't get this behavior...
>> no
>> > >> idea why.
>> > >>
>> > >> -Raymond-
>> > >>
>> > >> 2009/5/26 Larsson85
>> > >>
>> > >>
>> > >>> When I try to do my crawl it seems like the threads get stuck in
>> som
>> > >>> spinwaiting mode. At first the crawl goes as planned, and I couldnt
>> be
>> > >>> happier. But after som time, it starts reporting more of these
>> > >>> spinwaiting
>> > >>> messages.
>> > >>>
>> > >>> I print a log here to show you what it looks like. As you can see it
>> gets
>> > >>> stuck, and the queue decrease by 1 all the time. I've tried doing a
>> > >>> smaller
>> > >>> crawl, and what happends is that it counts down untill the
>> > >>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
>> > >>>
>> > >>> But the problem is that this countdown is very slow,there's no
>> effective
>> > >>> crawling going on, not using eather bandwith or cpu power. Basicly,
>> this
>> > >>> costs way to much time, I cant let it go on like this for hours to
>> be
>> > >>> done.
>> > >>> How can I fix this?
>> > >>>
>> > >>>
>> > >>> after about an hour of crawling this is what the log looks like
>> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>> > >>> - fetching http://home.swipnet.se/~w-147200/
>> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>> > >>> - fetching http://biphome.spray.se/alarsson/
>> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>> > >>> - fetching http://home.swipnet.se/~w-31853/html/
>> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
>> > >>>
>> > >>> ....
>> > >>>
>> > >>> --
>> > >>> View this message in context:
>> > >>>
>> >
>> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
>> > >>> Sent from the Nutch - User mailing list archive at Nabble.com.
>> > >>>
>> > >>>
>> > >>
>> > >
>>
>>
>
Re: threads get stuck in spinwaiting
Posted by Raymond Balmès <ra...@gmail.com>.
I have many URLs per host of course. Need to get all the pages of the sites,
don't understand the question.
-Raymond
2009/5/26 Otis Gospodnetic <og...@yahoo.com>
>
> But how, Ray, if you have only 1 URL per host?
>
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
>
> ----- Original Message ----
> > From: Raymond Balmès <ra...@gmail.com>
> > To: nutch-user@lucene.apache.org
> > Sent: Tuesday, May 26, 2009 4:11:27 PM
> > Subject: Re: threads get stuck in spinwaiting
> >
> > Observing what my crawls do, I believe Ken must be right.
> > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
> counts
> > down) in some cases I'm only fetching on two sites roughly , so indeed
> the
> > politeness starts to play a role there at least it should.
> >
> > -Ray-
> >
> > 2009/5/26 Raymond Balmès
> >
> > > Please read this too :
> > >
> > >
> >
> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
> > >
> > > Interesting build from ken.
> > >
> > > 2009/5/26 Raymond Balmès
> > >
> > > yes already reported in multiple-threads.
> > >> I noted that if one does a "recrawl" you don't get this behavior... no
> > >> idea why.
> > >>
> > >> -Raymond-
> > >>
> > >> 2009/5/26 Larsson85
> > >>
> > >>
> > >>> When I try to do my crawl it seems like the threads get stuck in
> som
> > >>> spinwaiting mode. At first the crawl goes as planned, and I couldnt
> be
> > >>> happier. But after som time, it starts reporting more of these
> > >>> spinwaiting
> > >>> messages.
> > >>>
> > >>> I print a log here to show you what it looks like. As you can see it
> gets
> > >>> stuck, and the queue decrease by 1 all the time. I've tried doing a
> > >>> smaller
> > >>> crawl, and what happends is that it counts down untill the
> > >>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
> > >>>
> > >>> But the problem is that this countdown is very slow,there's no
> effective
> > >>> crawling going on, not using eather bandwith or cpu power. Basicly,
> this
> > >>> costs way to much time, I cant let it go on like this for hours to be
> > >>> done.
> > >>> How can I fix this?
> > >>>
> > >>>
> > >>> after about an hour of crawling this is what the log looks like
> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> > >>> - fetching http://home.swipnet.se/~w-147200/
> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> > >>> - fetching http://biphome.spray.se/alarsson/
> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > >>> - fetching http://home.swipnet.se/~w-31853/html/
> > >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
> > >>>
> > >>> ....
> > >>>
> > >>> --
> > >>> View this message in context:
> > >>>
> >
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
> > >>> Sent from the Nutch - User mailing list archive at Nabble.com.
> > >>>
> > >>>
> > >>
> > >
>
>
Re: threads get stuck in spinwaiting
Posted by Otis Gospodnetic <og...@yahoo.com>.
But how, Ray, if you have only 1 URL per host?
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
----- Original Message ----
> From: Raymond Balmès <ra...@gmail.com>
> To: nutch-user@lucene.apache.org
> Sent: Tuesday, May 26, 2009 4:11:27 PM
> Subject: Re: threads get stuck in spinwaiting
>
> Observing what my crawls do, I believe Ken must be right.
> Towards the end of the crawl (when the fetchqueues.totalSize="xxxx" counts
> down) in some cases I'm only fetching on two sites roughly , so indeed the
> politeness starts to play a role there at least it should.
>
> -Ray-
>
> 2009/5/26 Raymond Balmès
>
> > Please read this too :
> >
> >
> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
> >
> > Interesting build from ken.
> >
> > 2009/5/26 Raymond Balmès
> >
> > yes already reported in multiple-threads.
> >> I noted that if one does a "recrawl" you don't get this behavior... no
> >> idea why.
> >>
> >> -Raymond-
> >>
> >> 2009/5/26 Larsson85
> >>
> >>
> >>> When I try to do my crawl it seems like the threads get stuck in som
> >>> spinwaiting mode. At first the crawl goes as planned, and I couldnt be
> >>> happier. But after som time, it starts reporting more of these
> >>> spinwaiting
> >>> messages.
> >>>
> >>> I print a log here to show you what it looks like. As you can see it gets
> >>> stuck, and the queue decrease by 1 all the time. I've tried doing a
> >>> smaller
> >>> crawl, and what happends is that it counts down untill the
> >>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
> >>>
> >>> But the problem is that this countdown is very slow,there's no effective
> >>> crawling going on, not using eather bandwith or cpu power. Basicly, this
> >>> costs way to much time, I cant let it go on like this for hours to be
> >>> done.
> >>> How can I fix this?
> >>>
> >>>
> >>> after about an hour of crawling this is what the log looks like
> >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> >>> - fetching http://home.swipnet.se/~w-147200/
> >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> >>> - fetching http://biphome.spray.se/alarsson/
> >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> >>> - fetching http://home.swipnet.se/~w-31853/html/
> >>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
> >>>
> >>> ....
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
> >>> Sent from the Nutch - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >
Re: threads get stuck in spinwaiting
Posted by Otis Gospodnetic <og...@yahoo.com>.
Ah, look, look!
https://issues.apache.org/jira/browse/NUTCH-629
I guess I did upload a patch aimed at this problem a while back. As you can see, it's not perfect, but it did help me some.
The real fix will have to implement a combination of things, like I mentioned in the email below.
Plus, ideally, Nutch would have a "Host DB" to keep track of hosts, as described in https://issues.apache.org/jira/browse/NUTCH-628 . Armed with that, the fetchlist generation could be smarter and try to generate "more even" fetchlist.
By "more even" I mean that it would use what it knows about hosts (e.g. how fast they are, how many URLs they have in Crawl DB...) to generate a fetchlist that doesn't have a mix of very fast and very slow servers, and doesn't produce a fetchlist where some hosts have a large number of URLs and some have very few URLs.
In other words, if we can get Nutch to produce a fetchlist with a roughly the same number of URLs for each host, and produce a fetchlist that includes only hosts with similar fetch speed in very recent history, then we would avoid the situation where fetching takes a long time and fetch speed drops.
Can anyone produce a patch based on this?
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
----- Original Message ----
> From: Otis Gospodnetic <og...@yahoo.com>
> To: nutch-user@lucene.apache.org
> Sent: Wednesday, May 27, 2009 11:38:48 PM
> Subject: Re: threads get stuck in spinwaiting
>
>
> Ray,
>
> I don't think fetchlist generation sticks URLs from the same domain or host
> together. But URLs for the same host do end up in the same queue. This is by
> design and it is a good thing -- this is how Nutch can ensure not to hit the
> same host with more simultaneous threads than it should (typically 1 - Larsson85
> - you really want to change that back to 1 as Ken described).
>
> It is normal and to be expected that at the end of the crawl you will end up
> with a number of URLs from a smaller nuber of hosts -- typically hosts that had
> more URLs in the fetchlist than other hosts, or hosts that are slower, so
> fetching from them take a long time.
>
> Here is a visual example.
> We have 3 queues.
> Each queue holds URLs for a single host.
> Queue B is a queue for a host with the most URLs.
> Say that Queue A is a queue for a host that's fast (fetching from it is fast),
> and say that Queue B is a queue for a slow host.
>
> Queue A: A A A A A A A A A A A A A A
> Queue B: B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B
> Queue C: C C C C C C C C C
>
> So let's see what happens. Say that fetcher has 3 threads (tA, tB, tC), each
> thread in charge of one queue.
> Since Queue A is for a fast host, and it's not the biggest, tA will be done with
> Queue A first. When that happens, when tA is all done with Queue A, tB will
> still be working on URLs from Queue B, because that queue was much bigger. And
> tC might still be working on URLs from Queue C because that host was slow (for
> example, it could be that fetching a single URL from C takes 30 seconds, while
> URLs from A are fetched at 1 per second).
>
> So what happens with the download speed? It goes down because of the slow C.
> And it goes down because the Fetcher is not fetching at all times - it has to
> obey the delay between fetches in order to remain polite.
> And what happens to the whole fetch run? It takes foreeeeeeeeeever because of
> the above.
>
> So what I believe Ken did in his fetcher is that he simply specifies how much
> time he wants the whole fetch run to last. So if C is uper slow, it doesn't
> matter. At some point the fetch run will end, and whatever URLs from C did not
> get fetched will have to wait until the next fetch run. And the same with B.
> Plus, I think he also said he can make the fetcher sleep less between requests,
> which can help the fetcher go through more of those B URLs.
>
> And I think this is really the whole story.
>
> So I think some possible solutions are:
> 1. introduce a notion of a timed fetch run as described above
> 2. keep reducing the sleep time between requests at some point, again as
> described above
> 3. consider measuring fetch speed per host and cutting off slow hosts (I think I
> had that once in my local Nutch copy, but it looks like I no longer have it)
>
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
>
> ----- Original Message ----
> > From: Raymond Balmès
> > To: nutch-user@lucene.apache.org
> > Sent: Wednesday, May 27, 2009 9:43:02 AM
> > Subject: Re: threads get stuck in spinwaiting
> >
> > maybe the problem is not in the fetcher but rather in the generate fetch
> > list phase where it should take care in not sticking all URLs to the same
> > domain together.
> >
> > -Ray-
> >
> > 2009/5/27 Larsson85
> >
> > >
> > > You're probably right that it has something to do with the politeness. I
> > > didn't notice it before, but now when you mention it I can see that all the
> > > pages it's fetching at the end of the crawl is from the same domain. Is
> > > there any way to turn of the politeness, or perhaps make it less polite to
> > > speed things up? I've been doing a test run today, and the result is that
> > > it
> > > has been stuck in this spinwaiting state for about 3 hours, which is not
> > > acceptable.
> > >
> > > Perhaps it is that I'm using a to small url-list to start with. I'm using
> > > the dmoz list from the nutch tutorial, and I have a filter on .se and .nu
> > > domains which probably disqualifies a lot of the urls in the list. Any tip
> > > on where to get a bigger list? And most important, any tip on how I can
> > > turn
> > > off the politeness, or atleast make it less polite.
> > > Thanks for all the help.
> > >
> > >
> > > Raymond Balmès wrote:
> > > >
> > > > Observing what my crawls do, I believe Ken must be right.
> > > > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
> > > counts
> > > > down) in some cases I'm only fetching on two sites roughly , so indeed
> > > the
> > > > politeness starts to play a role there at least it should.
> > > >
> > > > -Ray-
> > > >
> > > > 2009/5/26 Raymond Balmès
> > > >
> > > >> Please read this too :
> > > >>
> > > >>
> > >
> >
> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
> > > >>
> > > >> Interesting build from ken.
> > > >>
> > > >> 2009/5/26 Raymond Balmès
> > > >>
> > > >> yes already reported in multiple-threads.
> > > >>> I noted that if one does a "recrawl" you don't get this behavior... no
> > > >>> idea why.
> > > >>>
> > > >>> -Raymond-
> > > >>>
> > > >>> 2009/5/26 Larsson85
> > > >>>
> > > >>>
> > > >>>> When I try to do my crawl it seems like the threads get stuck in som
> > > >>>> spinwaiting mode. At first the crawl goes as planned, and I couldnt be
> > > >>>> happier. But after som time, it starts reporting more of these
> > > >>>> spinwaiting
> > > >>>> messages.
> > > >>>>
> > > >>>> I print a log here to show you what it looks like. As you can see it
> > > >>>> gets
> > > >>>> stuck, and the queue decrease by 1 all the time. I've tried doing a
> > > >>>> smaller
> > > >>>> crawl, and what happends is that it counts down untill the
> > > >>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
> > > >>>>
> > > >>>> But the problem is that this countdown is very slow,there's no
> > > >>>> effective
> > > >>>> crawling going on, not using eather bandwith or cpu power. Basicly,
> > > >>>> this
> > > >>>> costs way to much time, I cant let it go on like this for hours to be
> > > >>>> done.
> > > >>>> How can I fix this?
> > > >>>>
> > > >>>>
> > > >>>> after about an hour of crawling this is what the log looks like
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> > > >>>> - fetching http://home.swipnet.se/~w-147200/
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> > > >>>> - fetching http://biphome.spray.se/alarsson/
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > > >>>> - fetching http://home.swipnet.se/~w-31853/html/
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
> > > >>>>
> > > >>>> ....
> > > >>>>
> > > >>>> --
> > > >>>> View this message in context:
> > > >>>>
> > >
> >
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
> > > >>>> Sent from the Nutch - User mailing list archive at Nabble.com.
> > > >>>>
> > > >>>>
> > > >>>
> > > >>
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23742537.html
> > > Sent from the Nutch - User mailing list archive at Nabble.com.
> > >
> > >
Re: threads get stuck in spinwaiting
Posted by Raymond Balmès <ra...@gmail.com>.
OK, I get it now.
I have a preference for solution 1. "timed fetch", because it is pretty
scary to launch hours/days of processing not having the faintest idea when
it may stop.
-Raymond-
2009/5/28 Otis Gospodnetic <og...@yahoo.com>
>
> Ray,
>
> I don't think fetchlist generation sticks URLs from the same domain or host
> together. But URLs for the same host do end up in the same queue. This is
> by design and it is a good thing -- this is how Nutch can ensure not to hit
> the same host with more simultaneous threads than it should (typically 1 -
> Larsson85 - you really want to change that back to 1 as Ken described).
>
> It is normal and to be expected that at the end of the crawl you will end
> up with a number of URLs from a smaller nuber of hosts -- typically hosts
> that had more URLs in the fetchlist than other hosts, or hosts that are
> slower, so fetching from them take a long time.
>
> Here is a visual example.
> We have 3 queues.
> Each queue holds URLs for a single host.
> Queue B is a queue for a host with the most URLs.
> Say that Queue A is a queue for a host that's fast (fetching from it is
> fast), and say that Queue B is a queue for a slow host.
>
> Queue A: A A A A A A A A A A A A A A
> Queue B: B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B
> B B B
> Queue C: C C C C C C C C C
>
> So let's see what happens. Say that fetcher has 3 threads (tA, tB, tC),
> each thread in charge of one queue.
> Since Queue A is for a fast host, and it's not the biggest, tA will be done
> with Queue A first. When that happens, when tA is all done with Queue A, tB
> will still be working on URLs from Queue B, because that queue was much
> bigger. And tC might still be working on URLs from Queue C because that
> host was slow (for example, it could be that fetching a single URL from C
> takes 30 seconds, while URLs from A are fetched at 1 per second).
>
> So what happens with the download speed? It goes down because of the slow
> C. And it goes down because the Fetcher is not fetching at all times - it
> has to obey the delay between fetches in order to remain polite.
> And what happens to the whole fetch run? It takes foreeeeeeeeeever because
> of the above.
>
> So what I believe Ken did in his fetcher is that he simply specifies how
> much time he wants the whole fetch run to last. So if C is uper slow, it
> doesn't matter. At some point the fetch run will end, and whatever URLs
> from C did not get fetched will have to wait until the next fetch run. And
> the same with B.
> Plus, I think he also said he can make the fetcher sleep less between
> requests, which can help the fetcher go through more of those B URLs.
>
> And I think this is really the whole story.
>
> So I think some possible solutions are:
> 1. introduce a notion of a timed fetch run as described above
> 2. keep reducing the sleep time between requests at some point, again as
> described above
> 3. consider measuring fetch speed per host and cutting off slow hosts (I
> think I had that once in my local Nutch copy, but it looks like I no longer
> have it)
>
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
>
> ----- Original Message ----
> > From: Raymond Balmès <ra...@gmail.com>
> > To: nutch-user@lucene.apache.org
> > Sent: Wednesday, May 27, 2009 9:43:02 AM
> > Subject: Re: threads get stuck in spinwaiting
> >
> > maybe the problem is not in the fetcher but rather in the generate fetch
> > list phase where it should take care in not sticking all URLs to the same
> > domain together.
> >
> > -Ray-
> >
> > 2009/5/27 Larsson85
> >
> > >
> > > You're probably right that it has something to do with the politeness.
> I
> > > didn't notice it before, but now when you mention it I can see that all
> the
> > > pages it's fetching at the end of the crawl is from the same domain. Is
> > > there any way to turn of the politeness, or perhaps make it less polite
> to
> > > speed things up? I've been doing a test run today, and the result is
> that
> > > it
> > > has been stuck in this spinwaiting state for about 3 hours, which is
> not
> > > acceptable.
> > >
> > > Perhaps it is that I'm using a to small url-list to start with. I'm
> using
> > > the dmoz list from the nutch tutorial, and I have a filter on .se and
> .nu
> > > domains which probably disqualifies a lot of the urls in the list. Any
> tip
> > > on where to get a bigger list? And most important, any tip on how I can
> > > turn
> > > off the politeness, or atleast make it less polite.
> > > Thanks for all the help.
> > >
> > >
> > > Raymond Balmès wrote:
> > > >
> > > > Observing what my crawls do, I believe Ken must be right.
> > > > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
> > > counts
> > > > down) in some cases I'm only fetching on two sites roughly , so
> indeed
> > > the
> > > > politeness starts to play a role there at least it should.
> > > >
> > > > -Ray-
> > > >
> > > > 2009/5/26 Raymond Balmès
> > > >
> > > >> Please read this too :
> > > >>
> > > >>
> > >
> >
> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
> > > >>
> > > >> Interesting build from ken.
> > > >>
> > > >> 2009/5/26 Raymond Balmès
> > > >>
> > > >> yes already reported in multiple-threads.
> > > >>> I noted that if one does a "recrawl" you don't get this behavior...
> no
> > > >>> idea why.
> > > >>>
> > > >>> -Raymond-
> > > >>>
> > > >>> 2009/5/26 Larsson85
> > > >>>
> > > >>>
> > > >>>> When I try to do my crawl it seems like the threads get stuck in
> som
> > > >>>> spinwaiting mode. At first the crawl goes as planned, and I
> couldnt be
> > > >>>> happier. But after som time, it starts reporting more of these
> > > >>>> spinwaiting
> > > >>>> messages.
> > > >>>>
> > > >>>> I print a log here to show you what it looks like. As you can see
> it
> > > >>>> gets
> > > >>>> stuck, and the queue decrease by 1 all the time. I've tried doing
> a
> > > >>>> smaller
> > > >>>> crawl, and what happends is that it counts down untill the
> > > >>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
> > > >>>>
> > > >>>> But the problem is that this countdown is very slow,there's no
> > > >>>> effective
> > > >>>> crawling going on, not using eather bandwith or cpu power.
> Basicly,
> > > >>>> this
> > > >>>> costs way to much time, I cant let it go on like this for hours to
> be
> > > >>>> done.
> > > >>>> How can I fix this?
> > > >>>>
> > > >>>>
> > > >>>> after about an hour of crawling this is what the log looks like
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> > > >>>> - fetching http://home.swipnet.se/~w-147200/
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> > > >>>> - fetching http://biphome.spray.se/alarsson/
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > > >>>> - fetching http://home.swipnet.se/~w-31853/html/
> > > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
> > > >>>>
> > > >>>> ....
> > > >>>>
> > > >>>> --
> > > >>>> View this message in context:
> > > >>>>
> > >
> >
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
> > > >>>> Sent from the Nutch - User mailing list archive at Nabble.com.
> > > >>>>
> > > >>>>
> > > >>>
> > > >>
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23742537.html
> > > Sent from the Nutch - User mailing list archive at Nabble.com.
> > >
> > >
>
>
Re: threads get stuck in spinwaiting
Posted by Otis Gospodnetic <og...@yahoo.com>.
Ray,
I don't think fetchlist generation sticks URLs from the same domain or host together. But URLs for the same host do end up in the same queue. This is by design and it is a good thing -- this is how Nutch can ensure not to hit the same host with more simultaneous threads than it should (typically 1 - Larsson85 - you really want to change that back to 1 as Ken described).
It is normal and to be expected that at the end of the crawl you will end up with a number of URLs from a smaller nuber of hosts -- typically hosts that had more URLs in the fetchlist than other hosts, or hosts that are slower, so fetching from them take a long time.
Here is a visual example.
We have 3 queues.
Each queue holds URLs for a single host.
Queue B is a queue for a host with the most URLs.
Say that Queue A is a queue for a host that's fast (fetching from it is fast), and say that Queue B is a queue for a slow host.
Queue A: A A A A A A A A A A A A A A
Queue B: B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B
Queue C: C C C C C C C C C
So let's see what happens. Say that fetcher has 3 threads (tA, tB, tC), each thread in charge of one queue.
Since Queue A is for a fast host, and it's not the biggest, tA will be done with Queue A first. When that happens, when tA is all done with Queue A, tB will still be working on URLs from Queue B, because that queue was much bigger. And tC might still be working on URLs from Queue C because that host was slow (for example, it could be that fetching a single URL from C takes 30 seconds, while URLs from A are fetched at 1 per second).
So what happens with the download speed? It goes down because of the slow C. And it goes down because the Fetcher is not fetching at all times - it has to obey the delay between fetches in order to remain polite.
And what happens to the whole fetch run? It takes foreeeeeeeeeever because of the above.
So what I believe Ken did in his fetcher is that he simply specifies how much time he wants the whole fetch run to last. So if C is uper slow, it doesn't matter. At some point the fetch run will end, and whatever URLs from C did not get fetched will have to wait until the next fetch run. And the same with B.
Plus, I think he also said he can make the fetcher sleep less between requests, which can help the fetcher go through more of those B URLs.
And I think this is really the whole story.
So I think some possible solutions are:
1. introduce a notion of a timed fetch run as described above
2. keep reducing the sleep time between requests at some point, again as described above
3. consider measuring fetch speed per host and cutting off slow hosts (I think I had that once in my local Nutch copy, but it looks like I no longer have it)
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
----- Original Message ----
> From: Raymond Balmès <ra...@gmail.com>
> To: nutch-user@lucene.apache.org
> Sent: Wednesday, May 27, 2009 9:43:02 AM
> Subject: Re: threads get stuck in spinwaiting
>
> maybe the problem is not in the fetcher but rather in the generate fetch
> list phase where it should take care in not sticking all URLs to the same
> domain together.
>
> -Ray-
>
> 2009/5/27 Larsson85
>
> >
> > You're probably right that it has something to do with the politeness. I
> > didn't notice it before, but now when you mention it I can see that all the
> > pages it's fetching at the end of the crawl is from the same domain. Is
> > there any way to turn of the politeness, or perhaps make it less polite to
> > speed things up? I've been doing a test run today, and the result is that
> > it
> > has been stuck in this spinwaiting state for about 3 hours, which is not
> > acceptable.
> >
> > Perhaps it is that I'm using a to small url-list to start with. I'm using
> > the dmoz list from the nutch tutorial, and I have a filter on .se and .nu
> > domains which probably disqualifies a lot of the urls in the list. Any tip
> > on where to get a bigger list? And most important, any tip on how I can
> > turn
> > off the politeness, or atleast make it less polite.
> > Thanks for all the help.
> >
> >
> > Raymond Balmès wrote:
> > >
> > > Observing what my crawls do, I believe Ken must be right.
> > > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
> > counts
> > > down) in some cases I'm only fetching on two sites roughly , so indeed
> > the
> > > politeness starts to play a role there at least it should.
> > >
> > > -Ray-
> > >
> > > 2009/5/26 Raymond Balmès
> > >
> > >> Please read this too :
> > >>
> > >>
> >
> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
> > >>
> > >> Interesting build from ken.
> > >>
> > >> 2009/5/26 Raymond Balmès
> > >>
> > >> yes already reported in multiple-threads.
> > >>> I noted that if one does a "recrawl" you don't get this behavior... no
> > >>> idea why.
> > >>>
> > >>> -Raymond-
> > >>>
> > >>> 2009/5/26 Larsson85
> > >>>
> > >>>
> > >>>> When I try to do my crawl it seems like the threads get stuck in som
> > >>>> spinwaiting mode. At first the crawl goes as planned, and I couldnt be
> > >>>> happier. But after som time, it starts reporting more of these
> > >>>> spinwaiting
> > >>>> messages.
> > >>>>
> > >>>> I print a log here to show you what it looks like. As you can see it
> > >>>> gets
> > >>>> stuck, and the queue decrease by 1 all the time. I've tried doing a
> > >>>> smaller
> > >>>> crawl, and what happends is that it counts down untill the
> > >>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
> > >>>>
> > >>>> But the problem is that this countdown is very slow,there's no
> > >>>> effective
> > >>>> crawling going on, not using eather bandwith or cpu power. Basicly,
> > >>>> this
> > >>>> costs way to much time, I cant let it go on like this for hours to be
> > >>>> done.
> > >>>> How can I fix this?
> > >>>>
> > >>>>
> > >>>> after about an hour of crawling this is what the log looks like
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> > >>>> - fetching http://home.swipnet.se/~w-147200/
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> > >>>> - fetching http://biphome.spray.se/alarsson/
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > >>>> - fetching http://home.swipnet.se/~w-31853/html/
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
> > >>>>
> > >>>> ....
> > >>>>
> > >>>> --
> > >>>> View this message in context:
> > >>>>
> >
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
> > >>>> Sent from the Nutch - User mailing list archive at Nabble.com.
> > >>>>
> > >>>>
> > >>>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23742537.html
> > Sent from the Nutch - User mailing list archive at Nabble.com.
> >
> >
Re: threads get stuck in spinwaiting
Posted by Otis Gospodnetic <og...@yahoo.com>.
See https://issues.apache.org/jira/browse/NUTCH-570 for something relevant.
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
----- Original Message ----
> From: Raymond Balmès <ra...@gmail.com>
> To: nutch-user@lucene.apache.org
> Sent: Wednesday, May 27, 2009 9:43:02 AM
> Subject: Re: threads get stuck in spinwaiting
>
> maybe the problem is not in the fetcher but rather in the generate fetch
> list phase where it should take care in not sticking all URLs to the same
> domain together.
>
> -Ray-
>
> 2009/5/27 Larsson85
>
> >
> > You're probably right that it has something to do with the politeness. I
> > didn't notice it before, but now when you mention it I can see that all the
> > pages it's fetching at the end of the crawl is from the same domain. Is
> > there any way to turn of the politeness, or perhaps make it less polite to
> > speed things up? I've been doing a test run today, and the result is that
> > it
> > has been stuck in this spinwaiting state for about 3 hours, which is not
> > acceptable.
> >
> > Perhaps it is that I'm using a to small url-list to start with. I'm using
> > the dmoz list from the nutch tutorial, and I have a filter on .se and .nu
> > domains which probably disqualifies a lot of the urls in the list. Any tip
> > on where to get a bigger list? And most important, any tip on how I can
> > turn
> > off the politeness, or atleast make it less polite.
> > Thanks for all the help.
> >
> >
> > Raymond Balmès wrote:
> > >
> > > Observing what my crawls do, I believe Ken must be right.
> > > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
> > counts
> > > down) in some cases I'm only fetching on two sites roughly , so indeed
> > the
> > > politeness starts to play a role there at least it should.
> > >
> > > -Ray-
> > >
> > > 2009/5/26 Raymond Balmès
> > >
> > >> Please read this too :
> > >>
> > >>
> >
> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
> > >>
> > >> Interesting build from ken.
> > >>
> > >> 2009/5/26 Raymond Balmès
> > >>
> > >> yes already reported in multiple-threads.
> > >>> I noted that if one does a "recrawl" you don't get this behavior... no
> > >>> idea why.
> > >>>
> > >>> -Raymond-
> > >>>
> > >>> 2009/5/26 Larsson85
> > >>>
> > >>>
> > >>>> When I try to do my crawl it seems like the threads get stuck in som
> > >>>> spinwaiting mode. At first the crawl goes as planned, and I couldnt be
> > >>>> happier. But after som time, it starts reporting more of these
> > >>>> spinwaiting
> > >>>> messages.
> > >>>>
> > >>>> I print a log here to show you what it looks like. As you can see it
> > >>>> gets
> > >>>> stuck, and the queue decrease by 1 all the time. I've tried doing a
> > >>>> smaller
> > >>>> crawl, and what happends is that it counts down untill the
> > >>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
> > >>>>
> > >>>> But the problem is that this countdown is very slow,there's no
> > >>>> effective
> > >>>> crawling going on, not using eather bandwith or cpu power. Basicly,
> > >>>> this
> > >>>> costs way to much time, I cant let it go on like this for hours to be
> > >>>> done.
> > >>>> How can I fix this?
> > >>>>
> > >>>>
> > >>>> after about an hour of crawling this is what the log looks like
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> > >>>> - fetching http://home.swipnet.se/~w-147200/
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> > >>>> - fetching http://biphome.spray.se/alarsson/
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> > >>>> - fetching http://home.swipnet.se/~w-31853/html/
> > >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
> > >>>>
> > >>>> ....
> > >>>>
> > >>>> --
> > >>>> View this message in context:
> > >>>>
> >
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
> > >>>> Sent from the Nutch - User mailing list archive at Nabble.com.
> > >>>>
> > >>>>
> > >>>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23742537.html
> > Sent from the Nutch - User mailing list archive at Nabble.com.
> >
> >
Re: threads get stuck in spinwaiting
Posted by Ken Krugler <kk...@transpac.com>.
>How can I set the max URLs/host to be fetched per run?
Add this to your nutch-site.xml file:
<property>
<name>generate.max.per.host</name>
<value>-1</value>
<description>The maximum number of urls per host in a single
fetchlist. -1 if unlimited.</description>
</property>
and set it to something reasonable for your
target crawl duration, assuming 30 seconds/page.
-- Ken
>I use the following shell-script for my crawling. As you can see I try to
>set the topN value very low, here I have 5. But it doesn't seem to care
>about the topN value. The first segment it crawled with this script was
>about 140mb. Are you talking about the topN value when you say I should set
>the max URLs/hosts, or is there another setting I haven't found yet?
>
>http://pastebin.com/m33bb6e6b
>
>
>Ken Krugler wrote:
>>
>>>That could be true, but is that something I, as a nutch user can
>configure?
>>>It's interesting that your spin-waiting only takes about 30 minutes, and
>>>mine takes a whole lot longer. At least a couple of hours if the queue
>size
>>>is about 2-3000.
>>>
>>>I've tried adding the following lines to my nutch-default.xml , perhaps
>that
>>>can help. Gonna do a test run soon.
>>>(for some reason it doesn't seem like things I put in nutch-site.xml gets
>>>loaded, thats why I put it in nutch-default)
>>>
>>> <property>
>>> <name>fetcher.threads.per.host</name>
>>> <value>10</value>
>>> <description>This number is the maximum number of threads that
>>> should be allowed to access a host at one time.</description>
>>> </property>
>>
>> If you are going to be hitting servers that you'd
>> don't control or have special arrangements with
>> (e.g. domains that end in .se and .nu), and
>> you're using a very impolite setting like 10
>> threads/host, then please, please make sure your
>> user agent string clearly specifies how the
>> enraged IT people can directly get in touch with
>> you.
>>
>> Though including your home phone number might not be a good idea :)
>>
>> And by all means do not leave it set to the
>> default Nutch user agent string - in fact, it
>> would be best if you didn't mention Nutch at all,
>> as a number of sites block any crawler that has
>> "nutch" in the user agent string due to people
>> running crawls with settings such as what you've
>> referenced above.
>>
>> When crawling a limited number of domains, the
>> best approach is to assume that you aren't going
>> to get all of the pages from every domain in your
>> first pass. Set the max URLs/host to something
>> reasonable, and then do multiple fetch cycles.
>>
>> -- Ken
>>
>> PS - In Bixo I just added support for adaptive
>> crawl delay. For the special case of crawling
>> pages from partners, this will dynamically reduce
>> the crawl delay down to a specified minimum, to
>> try to fetch all of the pages from a domain
>> within the target crawl duration. Something
>> similar might be useful for Nutch.
>>
>>
>>>Raymond Balmès wrote:
>>>>
>>>> maybe the problem is not in the fetcher but rather in the generate
>>>> fetch
>>>> list phase where it should take care in not sticking all URLs to the
>>>> same
>>>> domain together.
>>>>
>>>> -Ray-
>>>>
>>>> 2009/5/27 Larsson85 <kr...@hotmail.com>
>>>>
>>>>>
>>>>> You're probably right that it has something to do with the politeness.
>>>>> I
>>>>> didn't notice it before, but now when you mention it I can see that
>>>>> all
>>>>> the
>>>>> pages it's fetching at the end of the crawl is from the same domain.
>>>>> Is
>>>>> there any way to turn of the politeness, or perhaps make it less
>>>>> polite
>>>>> to
>>>>> speed things up? I've been doing a test run today, and the result is
>>>>> that
>>>>> it
>>>>> has been stuck in this spinwaiting state for about 3 hours, which is
>>>>> not
>>>>> acceptable.
>>>>>
>>> >> Perhaps it is that I'm using a to small url-list to start with. I'm
>>> using
>>>>> the dmoz list from the nutch tutorial, and I have a filter on .se and
>>>>> .nu
>>>>> domains which probably disqualifies a lot of the urls in the list. Any
> >>>> tip
>>> >> on where to get a bigger list? And most important, any tip on how I
>>> can
>>>>> turn
>>>>> off the politeness, or atleast make it less polite.
>>>>> Thanks for all the help.
>>>>>
>>>>>
>>>>> Raymond Balmès wrote:
>>>>> >
>>>>> > Observing what my crawls do, I believe Ken must be right.
>>>>> > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
>>>>> counts
>>>>> > down) in some cases I'm only fetching on two sites roughly , so
>>>>> indeed
>>>>> the
>>>>> > politeness starts to play a role there at least it should.
>>>>> >
>>>>> > -Ray-
>>>>> >
>>>>> > 2009/5/26 Raymond Balmès <ra...@gmail.com>
>>>>> >
>>>>> >> Please read this too :
>>>>> >>
>>>>> >>
>>>>>
>>>>>http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
>>>>> >>
>>>>> >> Interesting build from ken.
>>>>> >>
>>>>> >> 2009/5/26 Raymond Balmès <ra...@gmail.com>
>>>>> >>
>>>>> >> yes already reported in multiple-threads.
>>>>> >>> I noted that if one does a "recrawl" you don't get this
>>>>> behavior...
>>>>> no
>>>>> >>> idea why.
>>>>> >>>
>>>>> >>> -Raymond-
>>> >> >>>
>>>>> >>> 2009/5/26 Larsson85 <kr...@hotmail.com>
>>>>> >>>
>>>>> >>>
>>>>> >>>> When I try to do my crawl it seems like the threads get stuck in
>>>>> som
>>>>> >>>> spinwaiting mode. At first the crawl goes as planned, and I
>>>>> couldnt
>>>>> be
>>>>> >>>> happier. But after som time, it starts reporting more of these
>>> >> >>>> spinwaiting
>>>>> >>>> messages.
>>>>> >>>>
>>> >> >>>> I print a log here to show you what it looks like. As you can
>>> see it
>>>>> >>>> gets
>>>>> >>>> stuck, and the queue decrease by 1 all the time. I've tried doing
>>>>> a
>>>>> >>>> smaller
>>>>> >>>> crawl, and what happends is that it counts down untill the
>>>>> >>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
>>>>> >>>>
>>>>> >>>> But the problem is that this countdown is very slow,there's no
>>>>> >>>> effective
>>> >> >>>> crawling going on, not using eather bandwith or cpu power.
>>> Basicly,
>>> >> >>>> this
>>>>> >>>> costs way to much time, I cant let it go on like this for hours
>>>>> to
>>>>> be
>>>>> >>>> done.
>>>>> >>>> How can I fix this?
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> after about an hour of crawling this is what the log looks like
>>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>>> fetchQueues.totalSize=2526
>>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>>> fetchQueues.totalSize=2526
>>>>> >>>> - fetching http://home.swipnet.se/~w-147200/
>>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>>> fetchQueues.totalSize=2525
>>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>>> fetchQueues.totalSize=2525
>>>>> >>>> - fetching http://biphome.spray.se/alarsson/
>>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>>> fetchQueues.totalSize=2524
>>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>>> fetchQueues.totalSize=2524
>>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>>> fetchQueues.totalSize=2524
>>>>> >>>> - fetching http://home.swipnet.se/~w-31853/html/
>>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>>> fetchQueues.totalSize=2523
>>>>> >>>>
>>>>> >>>> ....
>>>>> >>>>
>>>>> >>>> --
>>>>> >>>> View this message in context:
>>>>> >>>>
>>>>>
>>>>>http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
>>>>> >>>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>>>> >>>>
>>>>> >>>>
>>>>> >>>
>>>>> >>
>>>>> >
>>>>> >
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>>http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23742537.html
>>>>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>--
>>>View this message in context:
>>>http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23743682.html
>>>Sent from the Nutch - User mailing list archive at Nabble.com.
>>
>>
>> --
>> Ken Krugler
>> +1 530-210-6378
>>
>>
>
>--
>View this message in context:
>http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23750619.html
>Sent from the Nutch - User mailing list archive at Nabble.com.
--
Ken Krugler
+1 530-210-6378
Re: threads get stuck in spinwaiting
Posted by Larsson85 <kr...@hotmail.com>.
How can I set the max URLs/host to be fetched per run?
I use the following shell-script for my crawling. As you can see I try to
set the topN value very low, here I have 5. But it doesn't seem to care
about the topN value. The first segment it crawled with this script was
about 140mb. Are you talking about the topN value when you say I should set
the max URLs/hosts, or is there another setting I haven't found yet?
http://pastebin.com/m33bb6e6b
Ken Krugler wrote:
>
>>That could be true, but is that something I, as a nutch user can
configure?
>>It's interesting that your spin-waiting only takes about 30 minutes, and
>>mine takes a whole lot longer. At least a couple of hours if the queue
size
>>is about 2-3000.
>>
>>I've tried adding the following lines to my nutch-default.xml , perhaps
that
>>can help. Gonna do a test run soon.
>>(for some reason it doesn't seem like things I put in nutch-site.xml gets
>>loaded, thats why I put it in nutch-default)
>>
>> <property>
>> <name>fetcher.threads.per.host</name>
>> <value>10</value>
>> <description>This number is the maximum number of threads that
>> should be allowed to access a host at one time.</description>
>> </property>
>
> If you are going to be hitting servers that you'd
> don't control or have special arrangements with
> (e.g. domains that end in .se and .nu), and
> you're using a very impolite setting like 10
> threads/host, then please, please make sure your
> user agent string clearly specifies how the
> enraged IT people can directly get in touch with
> you.
>
> Though including your home phone number might not be a good idea :)
>
> And by all means do not leave it set to the
> default Nutch user agent string - in fact, it
> would be best if you didn't mention Nutch at all,
> as a number of sites block any crawler that has
> "nutch" in the user agent string due to people
> running crawls with settings such as what you've
> referenced above.
>
> When crawling a limited number of domains, the
> best approach is to assume that you aren't going
> to get all of the pages from every domain in your
> first pass. Set the max URLs/host to something
> reasonable, and then do multiple fetch cycles.
>
> -- Ken
>
> PS - In Bixo I just added support for adaptive
> crawl delay. For the special case of crawling
> pages from partners, this will dynamically reduce
> the crawl delay down to a specified minimum, to
> try to fetch all of the pages from a domain
> within the target crawl duration. Something
> similar might be useful for Nutch.
>
>
>>Raymond Balmès wrote:
>>>
>>> maybe the problem is not in the fetcher but rather in the generate
>>> fetch
>>> list phase where it should take care in not sticking all URLs to the
>>> same
>>> domain together.
>>>
>>> -Ray-
>>>
>>> 2009/5/27 Larsson85 <kr...@hotmail.com>
>>>
>>>>
>>>> You're probably right that it has something to do with the politeness.
>>>> I
>>>> didn't notice it before, but now when you mention it I can see that
>>>> all
>>>> the
>>>> pages it's fetching at the end of the crawl is from the same domain.
>>>> Is
>>>> there any way to turn of the politeness, or perhaps make it less
>>>> polite
>>>> to
>>>> speed things up? I've been doing a test run today, and the result is
>>>> that
>>>> it
>>>> has been stuck in this spinwaiting state for about 3 hours, which is
>>>> not
>>>> acceptable.
>>>>
>> >> Perhaps it is that I'm using a to small url-list to start with. I'm
>> using
>>>> the dmoz list from the nutch tutorial, and I have a filter on .se and
>>>> .nu
>>>> domains which probably disqualifies a lot of the urls in the list. Any
>>>> tip
>> >> on where to get a bigger list? And most important, any tip on how I
>> can
>>>> turn
>>>> off the politeness, or atleast make it less polite.
>>>> Thanks for all the help.
>>>>
>>>>
>>>> Raymond Balmès wrote:
>>>> >
>>>> > Observing what my crawls do, I believe Ken must be right.
>>>> > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
>>>> counts
>>>> > down) in some cases I'm only fetching on two sites roughly , so
>>>> indeed
>>>> the
>>>> > politeness starts to play a role there at least it should.
>>>> >
>>>> > -Ray-
>>>> >
>>>> > 2009/5/26 Raymond Balmès <ra...@gmail.com>
>>>> >
>>>> >> Please read this too :
>>>> >>
>>>> >>
>>>>
>>>>http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
>>>> >>
>>>> >> Interesting build from ken.
>>>> >>
>>>> >> 2009/5/26 Raymond Balmès <ra...@gmail.com>
>>>> >>
>>>> >> yes already reported in multiple-threads.
>>>> >>> I noted that if one does a "recrawl" you don't get this
>>>> behavior...
>>>> no
>>>> >>> idea why.
>>>> >>>
>>>> >>> -Raymond-
>> >> >>>
>>>> >>> 2009/5/26 Larsson85 <kr...@hotmail.com>
>>>> >>>
>>>> >>>
>>>> >>>> When I try to do my crawl it seems like the threads get stuck in
>>>> som
>>>> >>>> spinwaiting mode. At first the crawl goes as planned, and I
>>>> couldnt
>>>> be
>>>> >>>> happier. But after som time, it starts reporting more of these
>> >> >>>> spinwaiting
>>>> >>>> messages.
>>>> >>>>
>> >> >>>> I print a log here to show you what it looks like. As you can
>> see it
>>>> >>>> gets
>>>> >>>> stuck, and the queue decrease by 1 all the time. I've tried doing
>>>> a
>>>> >>>> smaller
>>>> >>>> crawl, and what happends is that it counts down untill the
>>>> >>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
>>>> >>>>
>>>> >>>> But the problem is that this countdown is very slow,there's no
>>>> >>>> effective
>> >> >>>> crawling going on, not using eather bandwith or cpu power.
>> Basicly,
>> >> >>>> this
>>>> >>>> costs way to much time, I cant let it go on like this for hours
>>>> to
>>>> be
>>>> >>>> done.
>>>> >>>> How can I fix this?
>>>> >>>>
>>>> >>>>
>>>> >>>> after about an hour of crawling this is what the log looks like
>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>> fetchQueues.totalSize=2526
>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>> fetchQueues.totalSize=2526
>>>> >>>> - fetching http://home.swipnet.se/~w-147200/
>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>> fetchQueues.totalSize=2525
>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>> fetchQueues.totalSize=2525
>>>> >>>> - fetching http://biphome.spray.se/alarsson/
>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>> fetchQueues.totalSize=2524
>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>> fetchQueues.totalSize=2524
>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>> fetchQueues.totalSize=2524
>>>> >>>> - fetching http://home.swipnet.se/~w-31853/html/
>>>> >>>> -activeThreads=1000, spinWaiting=1000,
>>>> fetchQueues.totalSize=2523
>>>> >>>>
>>>> >>>> ....
>>>> >>>>
>>>> >>>> --
>>>> >>>> View this message in context:
>>>> >>>>
>>>>
>>>>http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
>>>> >>>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>>> >>>>
>>>> >>>>
>>>> >>>
>>>> >>
>>>> >
>>>> >
>>>>
>>>> --
>>>> View this message in context:
>>>>
>>>>http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23742537.html
>>>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>>--
>>View this message in context:
>>http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23743682.html
>>Sent from the Nutch - User mailing list archive at Nabble.com.
>
>
> --
> Ken Krugler
> +1 530-210-6378
>
>
--
View this message in context: http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23750619.html
Sent from the Nutch - User mailing list archive at Nabble.com.
Re: threads get stuck in spinwaiting
Posted by Ken Krugler <kk...@transpac.com>.
>That could be true, but is that something I, as a nutch user can configure?
>It's interesting that your spin-waiting only takes about 30 minutes, and
>mine takes a whole lot longer. At least a couple of hours if the queue size
>is about 2-3000.
>
>I've tried adding the following lines to my nutch-default.xml , perhaps that
>can help. Gonna do a test run soon.
>(for some reason it doesn't seem like things I put in nutch-site.xml gets
>loaded, thats why I put it in nutch-default)
>
> <property>
> <name>fetcher.threads.per.host</name>
> <value>10</value>
> <description>This number is the maximum number of threads that
> should be allowed to access a host at one time.</description>
> </property>
If you are going to be hitting servers that you'd
don't control or have special arrangements with
(e.g. domains that end in .se and .nu), and
you're using a very impolite setting like 10
threads/host, then please, please make sure your
user agent string clearly specifies how the
enraged IT people can directly get in touch with
you.
Though including your home phone number might not be a good idea :)
And by all means do not leave it set to the
default Nutch user agent string - in fact, it
would be best if you didn't mention Nutch at all,
as a number of sites block any crawler that has
"nutch" in the user agent string due to people
running crawls with settings such as what you've
referenced above.
When crawling a limited number of domains, the
best approach is to assume that you aren't going
to get all of the pages from every domain in your
first pass. Set the max URLs/host to something
reasonable, and then do multiple fetch cycles.
-- Ken
PS - In Bixo I just added support for adaptive
crawl delay. For the special case of crawling
pages from partners, this will dynamically reduce
the crawl delay down to a specified minimum, to
try to fetch all of the pages from a domain
within the target crawl duration. Something
similar might be useful for Nutch.
>Raymond Balmès wrote:
>>
>> maybe the problem is not in the fetcher but rather in the generate fetch
>> list phase where it should take care in not sticking all URLs to the same
>> domain together.
>>
>> -Ray-
>>
>> 2009/5/27 Larsson85 <kr...@hotmail.com>
>>
>>>
>>> You're probably right that it has something to do with the politeness. I
>>> didn't notice it before, but now when you mention it I can see that all
>>> the
>>> pages it's fetching at the end of the crawl is from the same domain. Is
>>> there any way to turn of the politeness, or perhaps make it less polite
>>> to
>>> speed things up? I've been doing a test run today, and the result is that
>>> it
>>> has been stuck in this spinwaiting state for about 3 hours, which is not
>>> acceptable.
>>>
> >> Perhaps it is that I'm using a to small url-list to start with. I'm using
>>> the dmoz list from the nutch tutorial, and I have a filter on .se and .nu
>>> domains which probably disqualifies a lot of the urls in the list. Any
>>> tip
> >> on where to get a bigger list? And most important, any tip on how I can
>>> turn
>>> off the politeness, or atleast make it less polite.
>>> Thanks for all the help.
>>>
>>>
>>> Raymond Balmès wrote:
>>> >
>>> > Observing what my crawls do, I believe Ken must be right.
>>> > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
>>> counts
>>> > down) in some cases I'm only fetching on two sites roughly , so indeed
>>> the
>>> > politeness starts to play a role there at least it should.
>>> >
>>> > -Ray-
>>> >
>>> > 2009/5/26 Raymond Balmès <ra...@gmail.com>
>>> >
>>> >> Please read this too :
>>> >>
>>> >>
>>>
>>>http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
>>> >>
>>> >> Interesting build from ken.
>>> >>
>>> >> 2009/5/26 Raymond Balmès <ra...@gmail.com>
>>> >>
>>> >> yes already reported in multiple-threads.
>>> >>> I noted that if one does a "recrawl" you don't get this behavior...
>>> no
>>> >>> idea why.
>>> >>>
>>> >>> -Raymond-
> >> >>>
>>> >>> 2009/5/26 Larsson85 <kr...@hotmail.com>
>>> >>>
>>> >>>
>>> >>>> When I try to do my crawl it seems like the threads get stuck in som
>>> >>>> spinwaiting mode. At first the crawl goes as planned, and I couldnt
>>> be
>>> >>>> happier. But after som time, it starts reporting more of these
> >> >>>> spinwaiting
>>> >>>> messages.
>>> >>>>
> >> >>>> I print a log here to show you what it looks like. As you can see it
>>> >>>> gets
>>> >>>> stuck, and the queue decrease by 1 all the time. I've tried doing a
>>> >>>> smaller
>>> >>>> crawl, and what happends is that it counts down untill the
>>> >>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
>>> >>>>
>>> >>>> But the problem is that this countdown is very slow,there's no
>>> >>>> effective
> >> >>>> crawling going on, not using eather bandwith or cpu power. Basicly,
> >> >>>> this
>>> >>>> costs way to much time, I cant let it go on like this for hours to
>>> be
>>> >>>> done.
>>> >>>> How can I fix this?
>>> >>>>
>>> >>>>
>>> >>>> after about an hour of crawling this is what the log looks like
>>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>>> >>>> - fetching http://home.swipnet.se/~w-147200/
>>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>>> >>>> - fetching http://biphome.spray.se/alarsson/
>>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>>> >>>> - fetching http://home.swipnet.se/~w-31853/html/
>>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
>>> >>>>
>>> >>>> ....
>>> >>>>
>>> >>>> --
>>> >>>> View this message in context:
>>> >>>>
>>>
>>>http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
>>> >>>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>> >>>>
>>> >>>>
>>> >>>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>>
>>>http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23742537.html
>>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
>--
>View this message in context:
>http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23743682.html
>Sent from the Nutch - User mailing list archive at Nabble.com.
--
Ken Krugler
+1 530-210-6378
Re: threads get stuck in spinwaiting
Posted by Larsson85 <kr...@hotmail.com>.
That could be true, but is that something I, as a nutch user can configure?
It's interesting that your spin-waiting only takes about 30 minutes, and
mine takes a whole lot longer. At least a couple of hours if the queue size
is about 2-3000.
I've tried adding the following lines to my nutch-default.xml , perhaps that
can help. Gonna do a test run soon.
(for some reason it doesn't seem like things I put in nutch-site.xml gets
loaded, thats why I put it in nutch-default)
<property>
<name>fetcher.threads.per.host</name>
<value>10</value>
<description>This number is the maximum number of threads that
should be allowed to access a host at one time.</description>
</property>
Raymond Balmès wrote:
>
> maybe the problem is not in the fetcher but rather in the generate fetch
> list phase where it should take care in not sticking all URLs to the same
> domain together.
>
> -Ray-
>
> 2009/5/27 Larsson85 <kr...@hotmail.com>
>
>>
>> You're probably right that it has something to do with the politeness. I
>> didn't notice it before, but now when you mention it I can see that all
>> the
>> pages it's fetching at the end of the crawl is from the same domain. Is
>> there any way to turn of the politeness, or perhaps make it less polite
>> to
>> speed things up? I've been doing a test run today, and the result is that
>> it
>> has been stuck in this spinwaiting state for about 3 hours, which is not
>> acceptable.
>>
>> Perhaps it is that I'm using a to small url-list to start with. I'm using
>> the dmoz list from the nutch tutorial, and I have a filter on .se and .nu
>> domains which probably disqualifies a lot of the urls in the list. Any
>> tip
>> on where to get a bigger list? And most important, any tip on how I can
>> turn
>> off the politeness, or atleast make it less polite.
>> Thanks for all the help.
>>
>>
>> Raymond Balmès wrote:
>> >
>> > Observing what my crawls do, I believe Ken must be right.
>> > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
>> counts
>> > down) in some cases I'm only fetching on two sites roughly , so indeed
>> the
>> > politeness starts to play a role there at least it should.
>> >
>> > -Ray-
>> >
>> > 2009/5/26 Raymond Balmès <ra...@gmail.com>
>> >
>> >> Please read this too :
>> >>
>> >>
>> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
>> >>
>> >> Interesting build from ken.
>> >>
>> >> 2009/5/26 Raymond Balmès <ra...@gmail.com>
>> >>
>> >> yes already reported in multiple-threads.
>> >>> I noted that if one does a "recrawl" you don't get this behavior...
>> no
>> >>> idea why.
>> >>>
>> >>> -Raymond-
>> >>>
>> >>> 2009/5/26 Larsson85 <kr...@hotmail.com>
>> >>>
>> >>>
>> >>>> When I try to do my crawl it seems like the threads get stuck in som
>> >>>> spinwaiting mode. At first the crawl goes as planned, and I couldnt
>> be
>> >>>> happier. But after som time, it starts reporting more of these
>> >>>> spinwaiting
>> >>>> messages.
>> >>>>
>> >>>> I print a log here to show you what it looks like. As you can see it
>> >>>> gets
>> >>>> stuck, and the queue decrease by 1 all the time. I've tried doing a
>> >>>> smaller
>> >>>> crawl, and what happends is that it counts down untill the
>> >>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
>> >>>>
>> >>>> But the problem is that this countdown is very slow,there's no
>> >>>> effective
>> >>>> crawling going on, not using eather bandwith or cpu power. Basicly,
>> >>>> this
>> >>>> costs way to much time, I cant let it go on like this for hours to
>> be
>> >>>> done.
>> >>>> How can I fix this?
>> >>>>
>> >>>>
>> >>>> after about an hour of crawling this is what the log looks like
>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>> >>>> - fetching http://home.swipnet.se/~w-147200/
>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>> >>>> - fetching http://biphome.spray.se/alarsson/
>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>> >>>> - fetching http://home.swipnet.se/~w-31853/html/
>> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
>> >>>>
>> >>>> ....
>> >>>>
>> >>>> --
>> >>>> View this message in context:
>> >>>>
>> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
>> >>>> Sent from the Nutch - User mailing list archive at Nabble.com.
>> >>>>
>> >>>>
>> >>>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23742537.html
>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23743682.html
Sent from the Nutch - User mailing list archive at Nabble.com.
Re: threads get stuck in spinwaiting
Posted by Raymond Balmès <ra...@gmail.com>.
maybe the problem is not in the fetcher but rather in the generate fetch
list phase where it should take care in not sticking all URLs to the same
domain together.
-Ray-
2009/5/27 Larsson85 <kr...@hotmail.com>
>
> You're probably right that it has something to do with the politeness. I
> didn't notice it before, but now when you mention it I can see that all the
> pages it's fetching at the end of the crawl is from the same domain. Is
> there any way to turn of the politeness, or perhaps make it less polite to
> speed things up? I've been doing a test run today, and the result is that
> it
> has been stuck in this spinwaiting state for about 3 hours, which is not
> acceptable.
>
> Perhaps it is that I'm using a to small url-list to start with. I'm using
> the dmoz list from the nutch tutorial, and I have a filter on .se and .nu
> domains which probably disqualifies a lot of the urls in the list. Any tip
> on where to get a bigger list? And most important, any tip on how I can
> turn
> off the politeness, or atleast make it less polite.
> Thanks for all the help.
>
>
> Raymond Balmès wrote:
> >
> > Observing what my crawls do, I believe Ken must be right.
> > Towards the end of the crawl (when the fetchqueues.totalSize="xxxx"
> counts
> > down) in some cases I'm only fetching on two sites roughly , so indeed
> the
> > politeness starts to play a role there at least it should.
> >
> > -Ray-
> >
> > 2009/5/26 Raymond Balmès <ra...@gmail.com>
> >
> >> Please read this too :
> >>
> >>
> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
> >>
> >> Interesting build from ken.
> >>
> >> 2009/5/26 Raymond Balmès <ra...@gmail.com>
> >>
> >> yes already reported in multiple-threads.
> >>> I noted that if one does a "recrawl" you don't get this behavior... no
> >>> idea why.
> >>>
> >>> -Raymond-
> >>>
> >>> 2009/5/26 Larsson85 <kr...@hotmail.com>
> >>>
> >>>
> >>>> When I try to do my crawl it seems like the threads get stuck in som
> >>>> spinwaiting mode. At first the crawl goes as planned, and I couldnt be
> >>>> happier. But after som time, it starts reporting more of these
> >>>> spinwaiting
> >>>> messages.
> >>>>
> >>>> I print a log here to show you what it looks like. As you can see it
> >>>> gets
> >>>> stuck, and the queue decrease by 1 all the time. I've tried doing a
> >>>> smaller
> >>>> crawl, and what happends is that it counts down untill the
> >>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
> >>>>
> >>>> But the problem is that this countdown is very slow,there's no
> >>>> effective
> >>>> crawling going on, not using eather bandwith or cpu power. Basicly,
> >>>> this
> >>>> costs way to much time, I cant let it go on like this for hours to be
> >>>> done.
> >>>> How can I fix this?
> >>>>
> >>>>
> >>>> after about an hour of crawling this is what the log looks like
> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> >>>> - fetching http://home.swipnet.se/~w-147200/
> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> >>>> - fetching http://biphome.spray.se/alarsson/
> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> >>>> - fetching http://home.swipnet.se/~w-31853/html/
> >>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
> >>>>
> >>>> ....
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>>
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
> >>>> Sent from the Nutch - User mailing list archive at Nabble.com.
> >>>>
> >>>>
> >>>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23742537.html
> Sent from the Nutch - User mailing list archive at Nabble.com.
>
>
Re: threads get stuck in spinwaiting
Posted by Larsson85 <kr...@hotmail.com>.
You're probably right that it has something to do with the politeness. I
didn't notice it before, but now when you mention it I can see that all the
pages it's fetching at the end of the crawl is from the same domain. Is
there any way to turn of the politeness, or perhaps make it less polite to
speed things up? I've been doing a test run today, and the result is that it
has been stuck in this spinwaiting state for about 3 hours, which is not
acceptable.
Perhaps it is that I'm using a to small url-list to start with. I'm using
the dmoz list from the nutch tutorial, and I have a filter on .se and .nu
domains which probably disqualifies a lot of the urls in the list. Any tip
on where to get a bigger list? And most important, any tip on how I can turn
off the politeness, or atleast make it less polite.
Thanks for all the help.
Raymond Balmès wrote:
>
> Observing what my crawls do, I believe Ken must be right.
> Towards the end of the crawl (when the fetchqueues.totalSize="xxxx" counts
> down) in some cases I'm only fetching on two sites roughly , so indeed the
> politeness starts to play a role there at least it should.
>
> -Ray-
>
> 2009/5/26 Raymond Balmès <ra...@gmail.com>
>
>> Please read this too :
>>
>> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
>>
>> Interesting build from ken.
>>
>> 2009/5/26 Raymond Balmès <ra...@gmail.com>
>>
>> yes already reported in multiple-threads.
>>> I noted that if one does a "recrawl" you don't get this behavior... no
>>> idea why.
>>>
>>> -Raymond-
>>>
>>> 2009/5/26 Larsson85 <kr...@hotmail.com>
>>>
>>>
>>>> When I try to do my crawl it seems like the threads get stuck in som
>>>> spinwaiting mode. At first the crawl goes as planned, and I couldnt be
>>>> happier. But after som time, it starts reporting more of these
>>>> spinwaiting
>>>> messages.
>>>>
>>>> I print a log here to show you what it looks like. As you can see it
>>>> gets
>>>> stuck, and the queue decrease by 1 all the time. I've tried doing a
>>>> smaller
>>>> crawl, and what happends is that it counts down untill the
>>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
>>>>
>>>> But the problem is that this countdown is very slow,there's no
>>>> effective
>>>> crawling going on, not using eather bandwith or cpu power. Basicly,
>>>> this
>>>> costs way to much time, I cant let it go on like this for hours to be
>>>> done.
>>>> How can I fix this?
>>>>
>>>>
>>>> after about an hour of crawling this is what the log looks like
>>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>>>> - fetching http://home.swipnet.se/~w-147200/
>>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>>>> - fetching http://biphome.spray.se/alarsson/
>>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>>>> - fetching http://home.swipnet.se/~w-31853/html/
>>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
>>>>
>>>> ....
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
>>>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>
>
>
--
View this message in context: http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23742537.html
Sent from the Nutch - User mailing list archive at Nabble.com.
Re: threads get stuck in spinwaiting
Posted by Raymond Balmès <ra...@gmail.com>.
Observing what my crawls do, I believe Ken must be right.
Towards the end of the crawl (when the fetchqueues.totalSize="xxxx" counts
down) in some cases I'm only fetching on two sites roughly , so indeed the
politeness starts to play a role there at least it should.
-Ray-
2009/5/26 Raymond Balmès <ra...@gmail.com>
> Please read this too :
>
> http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
>
> Interesting build from ken.
>
> 2009/5/26 Raymond Balmès <ra...@gmail.com>
>
> yes already reported in multiple-threads.
>> I noted that if one does a "recrawl" you don't get this behavior... no
>> idea why.
>>
>> -Raymond-
>>
>> 2009/5/26 Larsson85 <kr...@hotmail.com>
>>
>>
>>> When I try to do my crawl it seems like the threads get stuck in som
>>> spinwaiting mode. At first the crawl goes as planned, and I couldnt be
>>> happier. But after som time, it starts reporting more of these
>>> spinwaiting
>>> messages.
>>>
>>> I print a log here to show you what it looks like. As you can see it gets
>>> stuck, and the queue decrease by 1 all the time. I've tried doing a
>>> smaller
>>> crawl, and what happends is that it counts down untill the
>>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
>>>
>>> But the problem is that this countdown is very slow,there's no effective
>>> crawling going on, not using eather bandwith or cpu power. Basicly, this
>>> costs way to much time, I cant let it go on like this for hours to be
>>> done.
>>> How can I fix this?
>>>
>>>
>>> after about an hour of crawling this is what the log looks like
>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>>> - fetching http://home.swipnet.se/~w-147200/
>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>>> - fetching http://biphome.spray.se/alarsson/
>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>>> - fetching http://home.swipnet.se/~w-31853/html/
>>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
>>>
>>> ....
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
>>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>>
>>>
>>
>
Re: threads get stuck in spinwaiting
Posted by Raymond Balmès <ra...@gmail.com>.
Please read this too :
http://ken-blog.krugler.org/2009/05/19/performance-problems-with-verticalfocused-web-crawling/
Interesting build from ken.
2009/5/26 Raymond Balmès <ra...@gmail.com>
> yes already reported in multiple-threads.
> I noted that if one does a "recrawl" you don't get this behavior... no idea
> why.
>
> -Raymond-
>
> 2009/5/26 Larsson85 <kr...@hotmail.com>
>
>
>> When I try to do my crawl it seems like the threads get stuck in som
>> spinwaiting mode. At first the crawl goes as planned, and I couldnt be
>> happier. But after som time, it starts reporting more of these spinwaiting
>> messages.
>>
>> I print a log here to show you what it looks like. As you can see it gets
>> stuck, and the queue decrease by 1 all the time. I've tried doing a
>> smaller
>> crawl, and what happends is that it counts down untill the
>> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
>>
>> But the problem is that this countdown is very slow,there's no effective
>> crawling going on, not using eather bandwith or cpu power. Basicly, this
>> costs way to much time, I cant let it go on like this for hours to be
>> done.
>> How can I fix this?
>>
>>
>> after about an hour of crawling this is what the log looks like
>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
>> - fetching http://home.swipnet.se/~w-147200/
>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
>> - fetching http://biphome.spray.se/alarsson/
>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
>> - fetching http://home.swipnet.se/~w-31853/html/
>> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
>>
>> ....
>>
>> --
>> View this message in context:
>> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>
>>
>
Re: threads get stuck in spinwaiting
Posted by Raymond Balmès <ra...@gmail.com>.
yes already reported in multiple-threads.
I noted that if one does a "recrawl" you don't get this behavior... no idea
why.
-Raymond-
2009/5/26 Larsson85 <kr...@hotmail.com>
>
> When I try to do my crawl it seems like the threads get stuck in som
> spinwaiting mode. At first the crawl goes as planned, and I couldnt be
> happier. But after som time, it starts reporting more of these spinwaiting
> messages.
>
> I print a log here to show you what it looks like. As you can see it gets
> stuck, and the queue decrease by 1 all the time. I've tried doing a smaller
> crawl, and what happends is that it counts down untill the
> "fetchQueues.totalSize" reaches 0, and then the crawl is done.
>
> But the problem is that this countdown is very slow,there's no effective
> crawling going on, not using eather bandwith or cpu power. Basicly, this
> costs way to much time, I cant let it go on like this for hours to be done.
> How can I fix this?
>
>
> after about an hour of crawling this is what the log looks like
> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2526
> - fetching http://home.swipnet.se/~w-147200/
> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2525
> - fetching http://biphome.spray.se/alarsson/
> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2524
> - fetching http://home.swipnet.se/~w-31853/html/
> -activeThreads=1000, spinWaiting=1000, fetchQueues.totalSize=2523
>
> ....
>
> --
> View this message in context:
> http://www.nabble.com/threads-get-stuck-in-spinwaiting-tp23723825p23723825.html
> Sent from the Nutch - User mailing list archive at Nabble.com.
>
>