lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aviran" <amo...@infosciences.com>
Subject FW: Lucene Search has poor cpu utilization on a 4-CPU machine
Date Mon, 12 Jul 2004 18:19:08 GMT

Hi all,
First let me explain what I found out. I'm running Lucene on a 4 CPU server.
While doing some stress tests I've noticed (by doing full thread dump) that
searching threads are blocked on the method: public FieldInfo fieldInfo(int
fieldNumber) This causes for a significant cpu idle time. 
I noticed that the class org.apache.lucene.index.FieldInfos uses private
class members Vector byNumber and Hashtable byName, both of which are
synchronized objects. By changing the Vector byNumber to ArrayList byNumber
and byName to HashMap, I was able to get 110% improvement in performance
(number of searches per second).

This issue was raised on Lucene user group, in which Doug suggested I submit
a  patch to the developer mailing list. So here it is attached to this
email.
I also reported this issue in bugzilla (Bug 30058)

Thanks,
Aviran



---------------------------------------------------------------------
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