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:36:12 GMT
Is the operation IndexSearcher.search I/O or CPU bound if I am doing
100's of searches on the same query?

Thanks

-John


On Thu, 06 Jan 2005 10:31:49 -0800, Doug Cutting <cutting@apache.org> wrote:
> John Wang wrote:
> > 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?
> 
> If you're performing compute-bound work on a single-processor machine
> then threading should give you no better performance than sequential,
> perhaps a bit worse.  If you're performing io-bound work on a
> single-disk machine then threading should again provide no improvement.
>   If the task is evenly compute and i/o bound then you could achieve at
> best a 2x speedup on a single CPU system with a single disk.
> 
> If you're compute-bound on an N-CPU system then threading should
> optimally be able to provide a factor of N speedup.
> 
> Java's scheduling of compute-bound theads when no threads call
> Thread.sleep() can also be very unfair.
> 
> Doug
> 
> ---------------------------------------------------------------------
> 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