IndexSearcher on multi-core CPU machine

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

IndexSearcher on multi-core CPU machine

dmitri
We have search (no update) web app on 2 dual core CPU machine (2x Dual Core AMD Opteron(tm) Processor 280) with 8G of RAM. Lucene 2.0 is used.
My index is optimized and non compound, 9G holding 6.5 M documents.
Search includes term queries, range filters and sorts.

When I use single IndexSearcher and search with multiple threads CPU are partially idle.

To have 100% CPU utilization I have to create several IndexSearchers.

With org.apache.lucene.store.MMapDirectory throughput is better but I still have to create multiple IndexSearcher instances to have 100% CPU utilization.

With multiple IndexSearchers search times are better under multithreaded load.
Following is average search times (in ms) for different number of parallel threads and IndexSearchers:
concurrent  1 searcher  5 searchers 10 searchers
threads
1                  180                   177              167
2                   201                  184              174
4                   241                  197              188
5                  339                    236              220
10                663                    454              420
20              1172                    917              880
50               2599                 2143            1912
100             4887                 4056              3775
Maximum search times for smaller number of searchers differ in 2-3 times.

Search is CPU bound (no IO wait is observed).
Is there any way to better utilize the server other than create several IndexSearchers?
I need to squeeze as much performance as possible out of the machine as we have strict performance requirements.
Reply | Threaded
Open this post in threaded view
|

Re: IndexSearcher on multi-core CPU machine

psmith-3
are you using Locale-sensitive sorting at all?


Just wondering if you're seeing the same problem we are having.

cheers,

Paul Smith

On 19/02/2007, at 8:52 AM, dmitri wrote:


We have search (no update) web app on 2 dual core CPU machine (2x Dual Core
AMD Opteron(tm) Processor 280) with 8G of RAM. Lucene 2.0 is used.
My index is optimized and non compound, 9G holding 6.5 M documents. 
Search includes term queries, range filters and sorts.

When I use single IndexSearcher and search with multiple threads CPU are
partially idle.

To have 100% CPU utilization I have to create several IndexSearchers.

With org.apache.lucene.store.MMapDirectory throughput is better but I still
have to create multiple IndexSearcher instances to have 100% CPU
utilization.

With multiple IndexSearchers search times are better under multithreaded
load.
Following is average search times (in ms) for different number of parallel
threads and IndexSearchers:
concurrent  1 searcher  5 searchers 10 searchers
threads
1                  180                   177              167
2                   201                  184              174
4                   241                  197              188
5                  339                    236              220
10                663                    454              420
20              1172                    917              880
50               2599                 2143            1912
100             4887                 4056              3775
Maximum search times for smaller number of searchers differ in 2-3 times.

Search is CPU bound (no IO wait is observed). 
Is there any way to better utilize the server other than create several
IndexSearchers?
I need to squeeze as much performance as possible out of the machine as we
have strict performance requirements.
-- 
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]





smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: IndexSearcher on multi-core CPU machine

Karl Wettin
In reply to this post by dmitri

18 feb 2007 kl. 22.52 skrev dmitri:

> With org.apache.lucene.store.MMapDirectory throughput is better but  
> I still
> have to create multiple IndexSearcher instances to have 100% CPU
> utilization.
>
> With multiple IndexSearchers search times are better under  
> multithreaded
> load.
>
> concurrent      1 searcher           5 searchers       10 searchers
> threads
> 1               180                  177               167
> 100             4887                 4056              3775

Are you using a single or multiple IndexReaders?

--
karl

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: IndexSearcher on multi-core CPU machine

dmitri
I use
-------------
searcher = new IndexSearcher(indexLocation);
-------------

So readers are created under the hood.

----
dmitri

karl wettin-3 wrote
18 feb 2007 kl. 22.52 skrev dmitri:

> With org.apache.lucene.store.MMapDirectory throughput is better but  
> I still
> have to create multiple IndexSearcher instances to have 100% CPU
> utilization.
>
> With multiple IndexSearchers search times are better under  
> multithreaded
> load.
>
> concurrent      1 searcher           5 searchers       10 searchers
> threads
> 1               180                  177               167
> 100             4887                 4056              3775

Are you using a single or multiple IndexReaders?

--
karl

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Reply | Threaded
Open this post in threaded view
|

Re: IndexSearcher on multi-core CPU machine

Karl Wettin

What are the effects if you supply the same reader to IndexSearcher:s?

19 feb 2007 kl. 16.03 skrev dmitri:

>
> I use
> -------------
> searcher = new IndexSearcher(indexLocation);
> -------------
>
> So readers are created under the hood.
>
> ----
> dmitri
>
>
> karl wettin-3 wrote:
>>
>>
>> 18 feb 2007 kl. 22.52 skrev dmitri:
>>
>>> With org.apache.lucene.store.MMapDirectory throughput is better but
>>> I still
>>> have to create multiple IndexSearcher instances to have 100% CPU
>>> utilization.
>>>
>>> With multiple IndexSearchers search times are better under
>>> multithreaded
>>> load.
>>>
>>> concurrent      1 searcher           5 searchers       10 searchers
>>> threads
>>> 1               180                  177               167
>>> 100             4887                 4056              3775
>>
>> Are you using a single or multiple IndexReaders?
>>
>> --  
>> karl
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>>
>
> --  
> View this message in context: http://www.nabble.com/IndexSearcher- 
> on-multi-core-CPU-machine-tf3249889.html#a9043584
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: IndexSearcher on multi-core CPU machine

dmitri
In reply to this post by psmith-3
I don't think so as sorting in on integer fields
---------
dmitri


Paul Smith-2 wrote
are you using Locale-sensitive sorting at all?

https://issues.apache.org/jira/browse/LUCENE-806

Just wondering if you're seeing the same problem we are having.

cheers,

Paul Smith

On 19/02/2007, at 8:52 AM, dmitri wrote:

>
> We have search (no update) web app on 2 dual core CPU machine (2x  
> Dual Core
> AMD Opteron(tm) Processor 280) with 8G of RAM. Lucene 2.0 is used.
> My index is optimized and non compound, 9G holding 6.5 M documents.
> Search includes term queries, range filters and sorts.
>
> When I use single IndexSearcher and search with multiple threads  
> CPU are
> partially idle.
>
> To have 100% CPU utilization I have to create several IndexSearchers.
>
> With org.apache.lucene.store.MMapDirectory throughput is better but  
> I still
> have to create multiple IndexSearcher instances to have 100% CPU
> utilization.
>
> With multiple IndexSearchers search times are better under  
> multithreaded
> load.
> Following is average search times (in ms) for different number of  
> parallel
> threads and IndexSearchers:
> concurrent  1 searcher  5 searchers 10 searchers
> threads
> 1                  180                   177              167
> 2                   201                  184              174
> 4                   241                  197              188
> 5                  339                    236              220
> 10                663                    454              420
> 20              1172                    917              880
> 50               2599                 2143            1912
> 100             4887                 4056              3775
> Maximum search times for smaller number of searchers differ in 2-3  
> times.
>
> Search is CPU bound (no IO wait is observed).
> Is there any way to better utilize the server other than create  
> several
> IndexSearchers?
> I need to squeeze as much performance as possible out of the  
> machine as we
> have strict performance requirements.
> --
> View this message in context: http://www.nabble.com/IndexSearcher- 
> on-multi-core-CPU-machine-tf3249889.html#a9034207
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>




 
Reply | Threaded
Open this post in threaded view
|

Re: IndexSearcher on multi-core CPU machine

dmitri
In reply to this post by Karl Wettin
I haven't tried using several IndexSearchers over a single IndexReader.
Do you think it can help?
-------------------
dmitri

karl wettin-3 wrote
What are the effects if you supply the same reader to IndexSearcher:s?

19 feb 2007 kl. 16.03 skrev dmitri:

>
> I use
> -------------
> searcher = new IndexSearcher(indexLocation);
> -------------
>
> So readers are created under the hood.
>
> ----
> dmitri
>
>
> karl wettin-3 wrote:
>>
>>
>> 18 feb 2007 kl. 22.52 skrev dmitri:
>>
>>> With org.apache.lucene.store.MMapDirectory throughput is better but
>>> I still
>>> have to create multiple IndexSearcher instances to have 100% CPU
>>> utilization.
>>>
>>> With multiple IndexSearchers search times are better under
>>> multithreaded
>>> load.
>>>
>>> concurrent      1 searcher           5 searchers       10 searchers
>>> threads
>>> 1               180                  177               167
>>> 100             4887                 4056              3775
>>
>> Are you using a single or multiple IndexReaders?
>>
>> --  
>> karl
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>>
>
> --  
> View this message in context: http://www.nabble.com/IndexSearcher- 
> on-multi-core-CPU-machine-tf3249889.html#a9043584
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Reply | Threaded
Open this post in threaded view
|

Re: IndexSearcher on multi-core CPU machine

Karl Wettin
I don't know. But I'm curious about the results.

19 feb 2007 kl. 16.33 skrev dmitri:

>
> I haven't tried using several IndexSearchers over a single  
> IndexReader.
> Do you think it can help?
> -------------------
> dmitri
>
>
> karl wettin-3 wrote:
>>
>>
>> What are the effects if you supply the same reader to  
>> IndexSearcher:s?
>>
>> 19 feb 2007 kl. 16.03 skrev dmitri:
>>
>>>
>>> I use
>>> -------------
>>> searcher = new IndexSearcher(indexLocation);
>>> -------------
>>>
>>> So readers are created under the hood.
>>>
>>> ----
>>> dmitri
>>>
>>>
>>> karl wettin-3 wrote:
>>>>
>>>>
>>>> 18 feb 2007 kl. 22.52 skrev dmitri:
>>>>
>>>>> With org.apache.lucene.store.MMapDirectory throughput is better  
>>>>> but
>>>>> I still
>>>>> have to create multiple IndexSearcher instances to have 100% CPU
>>>>> utilization.
>>>>>
>>>>> With multiple IndexSearchers search times are better under
>>>>> multithreaded
>>>>> load.
>>>>>
>>>>> concurrent      1 searcher           5 searchers       10  
>>>>> searchers
>>>>> threads
>>>>> 1               180                  177               167
>>>>> 100             4887                 4056              3775
>>>>
>>>> Are you using a single or multiple IndexReaders?
>>>>
>>>> --  
>>>> karl
>>>>
>>>> -------------------------------------------------------------------
>>>> --
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>>>
>>>
>>> --  
>>> View this message in context: http://www.nabble.com/IndexSearcher-
>>> on-multi-core-CPU-machine-tf3249889.html#a9043584
>>> Sent from the Lucene - Java Users mailing list archive at  
>>> Nabble.com.
>>>
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/IndexSearcher- 
> on-multi-core-CPU-machine-tf3249889.html#a9044066
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]