Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 45454 invoked from network); 27 Sep 2007 12:06:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Sep 2007 12:06:18 -0000 Received: (qmail 5660 invoked by uid 500); 27 Sep 2007 12:06:07 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 5625 invoked by uid 500); 27 Sep 2007 12:06:07 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 5616 invoked by uid 99); 27 Sep 2007 12:06:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2007 05:06:07 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED 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; Thu, 27 Sep 2007 12:08:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6A4517141FE for ; Thu, 27 Sep 2007 05:05:53 -0700 (PDT) Message-ID: <7050842.1190894753343.JavaMail.jira@brutus> Date: Thu, 27 Sep 2007 05:05:53 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2911) Implement a buffer manager using java.util.concurrent classes In-Reply-To: <19242816.1183715524465.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/DERBY-2911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-2911: -------------------------------------- Attachment: d2911-6.stat d2911-6.diff Attaching a new patch (d2911-6.diff) which implements a replacement algorithm using the interface and synchronization model described in the previous comments. The main part of the patch is the new ClockPolicy class and its rotateClock() method. I have done my best to state all requirements about synchronization and lock order in comments, so I hope it is possible for others to understand the code... I manually edited modules.properties to enable the new buffer manager and ran the full regression test suite. suites.All ran successfully, whereas derbyall had one failure. The failure in derbyall was unit/T_RawStoreFactory.unit which has been mentioned before. This is an expected failure until reuse of invalid entries has been enabled for caches whose size is smaller than the maximum size. I have not run any performance tests on this last patch, but I will do so. The performance test attached to this issue doesn't test the replacement algorithm since it creates just a small database. I will therefore see if I can run some other tests with different buffer sizes and also test it with update load, for instance using the test client attached to DERBY-1961. What's left to do: - reuse Cacheable from invalid entries instead of growing the clock when size < maxSize (will fix the failure in unit/T_RawStoreFactory.unit) - implement a background cleaner - shrink the cache if it exceeds the maximum size > Implement a buffer manager using java.util.concurrent classes > ------------------------------------------------------------- > > Key: DERBY-2911 > URL: https://issues.apache.org/jira/browse/DERBY-2911 > Project: Derby > Issue Type: Improvement > Components: Performance, Services > Affects Versions: 10.4.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Minor > Attachments: d2911-1.diff, d2911-1.stat, d2911-2.diff, d2911-3.diff, d2911-4.diff, d2911-5.diff, d2911-6.diff, d2911-6.stat, d2911-entry-javadoc.diff, d2911-unused.diff, d2911-unused.stat, d2911perf.java > > > There are indications that the buffer manager is a bottleneck for some types of multi-user load. For instance, Anders Morken wrote this in a comment on DERBY-1704: "With a separate table and index for each thread (to remove latch contention and lock waits from the equation) we (...) found that org.apache.derby.impl.services.cache.Clock.find()/release() caused about 5 times more contention than the synchronization in LockSet.lockObject() and LockSet.unlock(). That might be an indicator of where to apply the next push". > It would be interesting to see the scalability and performance of a buffer manager which exploits the concurrency utilities added in Java SE 5. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.