lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Wang <john.w...@gmail.com>
Subject Re: multi-threaded thru-put in lucene
Date Thu, 06 Jan 2005 18:09:05 GMT
I actually ran a few tests. But seeing similar behaviors.

After removing all the possible variations, this is what I used:

1 Index, doccount is 15,000.
Using FSDirectory, e.g. new IndexSearcher(String path), by default I
think it uses FSDirectory.

each thread is doing 100 iterations of search, e.g.

for (int i=0;i<100;++i){
    idxSearcher.search(q);
}

for each thread and each iteration, I am using the same query.

I am timing them the following way:

long start=System.currenTimeInMillis();

for (int i =0;i<threadCount;++i){
   thread[i].start();
}

for (int i=0;i<threadCount;++i){
   thread[i].join();
}


long duration=System.currenTimeInMillis()-start;

duration numbers I am getting are:

1 thread: 445 ms.
2 threads: 870 ms.
5 threads: 2200 ms.

Pretty much the same numbers you'd get if you are running them sequentially.

Any ideas? Am I doing something wrong?

Thanks advance for all your help

-John

On Thu, 6 Jan 2005 00:06:09 -0800 (PST), Chris Hostetter
<hossman_lucene@fucit.org> wrote:
> 
> :     This is what we found:
> :
> :      1 thread, search takes 20 ms.
> :
> :       2 threads, search takes 40 ms.
> :
> :       5 threads, search takes 100 ms.
> 
> how big is your index?  What are the term frequencies like in your index?
> how many differnt queries did you try? what was the structure of your
> query objects like?  were you using a RAMDirectory or an FSDirectory? what
> hardware were you running on?
> 
> Is your test application small enough that you can post it to the list?
> 
> I haven't done a lot of PMA testing of Lucene, but from what limited
> testing i have done I'm a little suprised at those numbers, you'd get
> results just as good if you ran the queries sequentially.
> 
> -Hoss
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message