Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D94E3275 for ; Wed, 4 May 2011 21:45:47 +0000 (UTC) Received: (qmail 59971 invoked by uid 500); 4 May 2011 21:45:46 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 59924 invoked by uid 500); 4 May 2011 21:45:46 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 59917 invoked by uid 99); 4 May 2011 21:45:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2011 21:45:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2011 21:45:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 492DCC1983 for ; Wed, 4 May 2011 21:45:03 +0000 (UTC) Date: Wed, 4 May 2011 21:45:03 +0000 (UTC) From: "Uwe Schindler (JIRA)" To: dev@lucene.apache.org Message-ID: <279758070.22978.1304545503296.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1360884420.20624.1304481483347.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SOLR-2493) SolrQueryParser constantly parse luceneMatchVersion in solrconfig. Large performance hit. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028989#comment-13028989 ] Uwe Schindler commented on SOLR-2493: ------------------------------------- We should not again fight here against each other. The problem is fixed, we could release 3.1.1 if we fixed the last slowdown in MultiPhraseQuery. The discussion here is just about how to prevent this. For me as a non-Solr comitter, when I did this code with Robert last year, I was also really confused about the design of Config (and in my opinion this is a wrong design). We should maybe open another issue and separate parsing and value-holding in two spearate classes (SolrConfig and ConfigParser). If we would do this all is solved (see above). > SolrQueryParser constantly parse luceneMatchVersion in solrconfig. Large performance hit. > ----------------------------------------------------------------------------------------- > > Key: SOLR-2493 > URL: https://issues.apache.org/jira/browse/SOLR-2493 > Project: Solr > Issue Type: Bug > Components: search > Affects Versions: 3.1 > Reporter: Stephane Bailliez > Assignee: Uwe Schindler > Priority: Blocker > Labels: core, parser, performance, request, solr > Fix For: 3.1.1, 3.2, 4.0 > > Attachments: SOLR-2493-3.x.patch, SOLR-2493.patch > > > I' m putting this as blocker as I think this is a serious issue that should be adressed asap with a release. With the current code this is no way near suitable for production use. > For each instance created SolrQueryParser calls > > getSchema().getSolrConfig().getLuceneVersion("luceneMatchVersion", Version.LUCENE_24) > instead of using > getSchema().getSolrConfig().luceneMatchVersion > This creates a massive performance hit. For each request, there is generally 3 query parsers created and each of them will parse the xml node in config which involve creating an instance of XPath and behind the scene the usual factory finder pattern quicks in within the xml parser and does a loadClass. > The stack is typically: > at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363) > at com.sun.org.apache.xml.internal.dtm.ObjectFactory.findProviderClass(ObjectFactory.java:506) > at com.sun.org.apache.xml.internal.dtm.ObjectFactory.lookUpFactoryClass(ObjectFactory.java:217) > at com.sun.org.apache.xml.internal.dtm.ObjectFactory.createObject(ObjectFactory.java:131) > at com.sun.org.apache.xml.internal.dtm.ObjectFactory.createObject(ObjectFactory.java:101) > at com.sun.org.apache.xml.internal.dtm.DTMManager.newInstance(DTMManager.java:135) > at com.sun.org.apache.xpath.internal.XPathContext.(XPathContext.java:100) > at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.eval(XPathImpl.java:201) > at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:275) > at org.apache.solr.core.Config.getNode(Config.java:230) > at org.apache.solr.core.Config.getVal(Config.java:256) > at org.apache.solr.core.Config.getLuceneVersion(Config.java:325) > at org.apache.solr.search.SolrQueryParser.(SolrQueryParser.java:76) > at org.apache.solr.schema.IndexSchema.getSolrQueryParser(IndexSchema.java:277) > With the current 3.1 code, I do barely 250 qps with 16 concurrent users with a near empty index. > Switching SolrQueryParser to use getSchema().getSolrConfig().luceneMatchVersion and doing a quick bench test, performance become reasonable beyond 2000 qps. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org