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 A58AD7792 for ; Sat, 17 Dec 2011 22:12:03 +0000 (UTC) Received: (qmail 77793 invoked by uid 500); 17 Dec 2011 22:12:02 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 77704 invoked by uid 500); 17 Dec 2011 22:12:02 -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 77689 invoked by uid 99); 17 Dec 2011 22:12:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Dec 2011 22:12:02 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,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; Sat, 17 Dec 2011 22:11:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 997451192AA for ; Sat, 17 Dec 2011 22:11:30 +0000 (UTC) Date: Sat, 17 Dec 2011 22:11:30 +0000 (UTC) From: "Simon Willnauer (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <330244234.23106.1324159890629.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <47832488.21137.1324075950805.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3653) Lucene Search not scalling 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/LUCENE-3653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171691#comment-13171691 ] Simon Willnauer commented on LUCENE-3653: ----------------------------------------- bq. The SegmentCoreReaders sync cannot be removed in Lucene 3.x, as segments are read/write. You can remove the synchronization partly in your Lucene instance by patching it, the risk is on your side! This is not a bug in Lucene. In Lucene trunk, most of this sync is removed as IndexReaders will be pure read-only. We are currently working on removing contention in SegmentReader's SegmentCore. Uwe, I had a quick look at it and I think we can remove this. We set the tis in the ctor or if we load a NRT reader. So basically we can assign the tisNoIndex reader to the tis instead of leaving it will a null ref and use a second boolean to actually signal if it was loaded or not. for read access this is not necessarily required to be synced since if you pull a NRT reader you can rely on the IW sync / mem barrier to see the latest reference. I will take a closer look at this next week. > Lucene Search not scalling > -------------------------- > > Key: LUCENE-3653 > URL: https://issues.apache.org/jira/browse/LUCENE-3653 > Project: Lucene - Java > Issue Type: Improvement > Reporter: Gerrit Jansen van Vuuren > Attachments: App.java, profile_1_a.png, profile_1_b.png, profile_1_c.png, profile_1_d.png, profile_2_a.png, profile_2_b.png, profile_2_c.png > > > I've noticed that when doing thousands of searches in a single thread the average time is quite low i.e. a few milliseconds. When adding more concurrent searches doing exactly the same search the average time increases drastically. > I've profiled the search classes and found that the whole of lucene blocks on > org.apache.lucene.index.SegmentCoreReaders.getTermsReader > org.apache.lucene.util.VirtualMethod > public synchronized int getImplementationDistance > org.apache.lucene.util.AttributeSourcew.getAttributeInterfaces > These cause search times to increase from a few milliseconds to up to 2 seconds when doing 500 concurrent searches on the same in memory index. Note: That the index is not being updates at all, so not refresh methods are called at any stage. > Some questions: > Why do we need synchronization here? > There must be a non-lockable solution for these, they basically cause lucene to be ok for single thread applications but disastrous for any concurrent implementation. > I'll do some experiments by removing the synchronization from the methods of these classes. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa 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