Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ADF93101DD for ; Wed, 9 Apr 2014 08:44:07 +0000 (UTC) Received: (qmail 18632 invoked by uid 500); 9 Apr 2014 08:44:06 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 18466 invoked by uid 500); 9 Apr 2014 08:44:03 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 18447 invoked by uid 99); 9 Apr 2014 08:44:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Apr 2014 08:44:01 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chetan.mehrotra@gmail.com designates 209.85.214.175 as permitted sender) Received: from [209.85.214.175] (HELO mail-ob0-f175.google.com) (209.85.214.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Apr 2014 08:43:55 +0000 Received: by mail-ob0-f175.google.com with SMTP id uy5so2344715obc.34 for ; Wed, 09 Apr 2014 01:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=1KPVl7OwfVmF/InYhuObi0gYT4FzL5oOniQ+JEggGjA=; b=LOg8y6X4yNLuoUqyc84apRKsdXpUPm5PBG4Pk6Hdeh3np5/6okVlmpaulrlSuMabq/ 8RNTgsarqWizGtcd7n9+9q2t4iK/oZPfp/UPRgqG1m7JBnJX40oCMHWDm2qZJrLPZNhP OXRD6V5an9xADW7NZMe91vf/BO9VVsQqMFRYXuAFewrGaAG1gBvZ8xIk8kBNCVkVGewV l5v1wcc4najGvvEvpQmIlO7BCoMOPaKFEkyQ/K3p8AOTN6GinNuaOo2/jDFQZgTwcl1l 576tHG/1GGSKW0bnZpTI3xBCCkS299PeHoVa3swKfLqEpWDMfQZ9KEtP7nGfG+Hjz2yj k4Mw== MIME-Version: 1.0 X-Received: by 10.60.125.195 with SMTP id ms3mr7648459oeb.3.1397033013359; Wed, 09 Apr 2014 01:43:33 -0700 (PDT) Received: by 10.60.98.67 with HTTP; Wed, 9 Apr 2014 01:43:33 -0700 (PDT) In-Reply-To: References: Date: Wed, 9 Apr 2014 14:13:33 +0530 Message-ID: Subject: Re: Slow full text query performance and Lucene Index handling in Oak From: Chetan Mehrotra To: oak-dev@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Apr 9, 2014 at 12:25 PM, Marcel Reutegger wrote: >> Since the Lucene index is in any case updated asynchronously, it >> should be fine for us to ignore the base NodeState of the current >> session and instead use an IndexSearcher based on the last state as >> updated by the async indexer. This would allow us to reuse the >> IndexSearcher over multiple queries. > > I was also wondering if it makes sense to share it across multiple > sessions performing a query to reduce the number of index readers > that may be open at the same time. however, this will likely also > reduce concurrency because we synchronize access to a single > session. I tried with one approach where I used a custom SerahcerManager based on Lucene SearcherManager. It obtains the root NodeState directly from NodeStore. As NodeStore can be accessed concurrently it should not have any impact on session concurrency With this change there is a slight improvement Oak-Tar 1 39 40 40 44 64 1459 Oak-Tar(Shared) 1 32 33 34 36 61 1738 So did not gave much boost (at least with approach taken). As I do not have much understanding of Lucene internal can someone review the approach taken and see if there are some major issues with it Chetan Mehrotra [1] https://issues.apache.org/jira/secure/attachment/12639366/OAK-1702-shared-indexer.patch [2] https://lucene.apache.org/core/3_6_0/api/all/org/apache/lucene/search/SearcherManager.html