[ 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-13.diff Attaching a patch (d2911-13) which addresses 2a and 4h. I have started the regression tests suite. 2a: Instead of inventing a new name for lockWhenIdentityIsSet(), I created a new method waitUntilIdentityIsSet() and let the callers first invoke lock() and then waitUntilIdentityIsSet(). I think that makes the code clearer. 4h: I created named constants for the numeric constants in rotateClock() and shrinkMe(). I didn't make any changes to trimMe(), since I'm wondering if it's best just to remove it. After this patch, I think it's only 4g (explain the heuristics in ClockPolicy.trimMe()) that hasn't been addressed. I believe that trimMe() in reality is dead code (supported by the fact that its predecessor Clock.trimToSize() is always a no-op in the regression tests according to the test coverage reports), and a better and more reliable solution for the problem it tries to solve, is to reduce the cache size. Unless someone comes up with a situation where Clock.trimToSize() and ClockPolicy.trimMe() provide valuable functionality, I'm inclined to remove the latter. > 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: cleaner.diff, cleaner.tar, d2911-1.diff, d2911-1.stat, > d2911-10.diff, d2911-10.stat, d2911-11.diff, d2911-12.diff, d2911-13.diff, > d2911-2.diff, d2911-3.diff, d2911-4.diff, d2911-5.diff, d2911-6.diff, > d2911-6.stat, d2911-7.diff, d2911-7a.diff, d2911-9.diff, d2911-9.stat, > d2911-enable.diff, d2911-entry-javadoc.diff, d2911-unused.diff, > d2911-unused.stat, d2911perf.java, derby-2911-8.diff, derby-2911-8.stat, > perftest.diff, perftest.pdf, perftest.stat, perftest2.diff, perftest6.pdf, > poisson_patch8.tar > > > 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.