From dev-return-14376-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Tue Sep 25 09:56:16 2007 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 48930 invoked from network); 25 Sep 2007 09:56:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Sep 2007 09:56:15 -0000 Received: (qmail 85089 invoked by uid 500); 25 Sep 2007 09:56:05 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 85056 invoked by uid 500); 25 Sep 2007 09:56:05 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 85045 invoked by uid 99); 25 Sep 2007 09:56:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2007 02:56:05 -0700 X-ASF-Spam-Status: No, hits=-98.8 required=10.0 tests=ALL_TRUSTED,DNS_FROM_DOB,RCVD_IN_DOB X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2007 09:58:26 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0BA44714168 for ; Tue, 25 Sep 2007 02:55:51 -0700 (PDT) Message-ID: <10593955.1190714151043.JavaMail.jira@brutus> Date: Tue, 25 Sep 2007 02:55:51 -0700 (PDT) From: "Thomas Mueller (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1112) CacheManager interval between recalculation of cache sizes should be configurable In-Reply-To: <4905624.1188923567066.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530078 ] Thomas Mueller commented on JCR-1112: ------------------------------------- Hi, The method getMemoryUsed could be improved by keeping the current value and only add / subtract when there are changes. Still from time to time a full recalculation (like now) is required because the size of the objects in the cache could change. If only one in 20 calls trigger a full recalculation, it would result in a speed up of about 10 times. For me, the CacheManager is a workaround; if possible the number of caches should be reduced to one. Thomas > CacheManager interval between recalculation of cache sizes should be configurable > --------------------------------------------------------------------------------- > > Key: JCR-1112 > URL: https://issues.apache.org/jira/browse/JCR-1112 > Project: Jackrabbit > Issue Type: New Feature > Components: jackrabbit-core > Reporter: Przemo Pakulski > Assignee: Thomas Mueller > Priority: Minor > Attachments: JCR-1112.txt > > > Currently interval between recaluclation of cahce size is hard coded to 1000 ms. Resizing/recalculation of cache size is quite expensive method (especially getMemoryUsed on MLRUItemStateCache is time consuming) > Depending on the configuration, we realized that under some load up to 10-15% percent of CPU time (profiler metrics) could be spend doing such recalculations. It does not seem to be needed to resize cache every second. Best this interval should be configurable in external config. file with other cache settings (like memory sizes). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.