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 730D710A5D for ; Mon, 28 Oct 2013 07:14:14 +0000 (UTC) Received: (qmail 17814 invoked by uid 500); 28 Oct 2013 07:14:13 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 17678 invoked by uid 500); 28 Oct 2013 07:14:13 -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 17666 invoked by uid 99); 28 Oct 2013 07:14:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Oct 2013 07:14:11 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mueller@adobe.com designates 64.18.1.23 as permitted sender) Received: from [64.18.1.23] (HELO exprod6og109.obsmtp.com) (64.18.1.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Oct 2013 07:14:05 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob109.postini.com ([64.18.5.12]) with SMTP ID DSNKUm4OqKzXPMqhnGKV3KSvD+TNcBzz3Kry@postini.com; Mon, 28 Oct 2013 00:13:44 PDT Received: from inner-relay-2.corp.adobe.com ([153.32.1.52]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r9S7A0iH016912 for ; Mon, 28 Oct 2013 00:10:00 -0700 (PDT) Received: from nahub02.corp.adobe.com (nahub02.corp.adobe.com [10.8.189.98]) by inner-relay-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r9S7DhOU003846 for ; Mon, 28 Oct 2013 00:13:43 -0700 (PDT) Received: from eurcas01.eur.adobe.com (10.128.4.27) by nahub02.corp.adobe.com (10.8.189.98) with Microsoft SMTP Server (TLS) id 8.3.327.1; Mon, 28 Oct 2013 00:13:43 -0700 Received: from eurmbx01.eur.adobe.com ([10.128.4.32]) by eurcas01.eur.adobe.com ([10.128.4.27]) with mapi; Mon, 28 Oct 2013 07:13:41 +0000 From: Thomas Mueller To: "oak-dev@jackrabbit.apache.org" Date: Mon, 28 Oct 2013 07:13:46 +0000 Subject: Re: Reduce number of calls from Oak to Mongo DB on restarts Thread-Topic: Reduce number of calls from Oak to Mongo DB on restarts Thread-Index: Ac7TrTqAZVJ70Z2ySN2FL5zaEEBdLg== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.8.130913 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi, >The SegmentMK addresses this issue by grouping related content into >larger segments and thus reducing the number of network or disk >accesses needed in most use cases. Perhaps the MongoMK could do >something similar? Yes. What might work is to store a limited number of child nodes (a subtree really) in the parent node (in the parent document), for a certain revision. Kind of a cache, which is only used if there is no change below the given subtree. The subtree cache would be built in a background thread, and outdated subtree caches could be removed whenever a document is changed (possibly also in a background thread). Using MapDB [1] or the H2 MVStore [2] for caching: this might improve startup time drastically, if we really load many nodes at startup. But I'm a bit afraid of the added complexity to maintain a local storage. So far we don't use local storage as far as I know. [1] http://www.mapdb.org/ [2] http://h2database.com/html/mvstore.html Regards, Thomas