lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: TermInfosReader lazy term index reading
Date Fri, 02 Feb 2007 22:01:34 GMT
On 2/2/07, robert engels <> wrote:
> For a process that is mostly CPU bound (which is the case with Lucene
> if the index is in the OS cache), having so many "active" threads
> will actually hurt performance due to the context switching and
> synchronization.

Sure... it certainly wasn't by design to have that many threads all
trying to do something.

> Better to use a request queue / thread pool. (I
> think I read somewhere that a good rule of thumb is 2x the number of
> processors).

You might hit a scenario where a couple of threads are doing long
running queries, and that could lock out other queries that might
otherwise execute quickly.  But overall, it's not a bad idea.

> If most of the searches are IO bound having so many disparate
> requests will hurt performance as well since the disk heads will be
> seeking all over the place and losing any locality of data that
> Lucene provides (postings, sequental term reads, etc.).

We're not hitting disk... plenty of RAM.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message