On Mon, 2014-09-15 at 09:10 +0200, Harry Yu wrote: > I'm developing poi search application using lucene 4.8 . Recently, I > met a trouble that the performance of IndexSearcher.search is bad in > multiple-thread environment. According the test results, I found that > if thread number is 1, the response time of searching is only 17ms. > But that would be 400ms when I increased threads to 30.
With a single thread you have 1000ms/s / 17ms ~= 59 searches/second. For 30 threads you have 1000ms/s / 400ms * 30 = 75 searches/second As you have a dual-core machine, the ideal outcome would be 2*59 = 118 searches/second. Accounting for fluctuations in measuring, more GC and a bit of congestion, it does not seem unreasonable with 75. (17ms/search seems like quite a long time for such a small index, but that is independent of the threading issue) What was the expected outcome of your test? - Toke Eskildsen, State and University Library, Denmark --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org