[ https://issues.apache.org/jira/browse/DERBY-5772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-5772: -------------------------------------- Attachment: pagecache-counters.png pagecache-counters.diff Uploading a slightly revised version of [^pagecache-counters.diff] where the MBean and the cache manager have two extra methods, setCollectAccessCount() and getCollectAccessCount(), that can be used to switch counting of cache accesses on and off. Default is off. With that patch, I ran some tests to see how these changes would affect the performance. I used the performance test clients from the org.apache.derbyTesting.perf.clients package. The test was run with derby.storage.pageCacheSize=25000 and -load sr_select_multi. I believe this tests the worst case for the patch because - there are no writes (writing a page to disk would dwarf the cost of increasing a counter) - the entire database fits in the page cache, so there are no cache misses (cache misses would have generated disk I/O, which would have dwarfed the cost of the counter) - each thread has its own table, so there are no data or lock bottlenecks that shadow the overhead of maintaining counters in the cache The test ran on an 8-core machine with Solaris 11 and JDK 8u20. The attached graph [^pagecache-counters.png] shows the results from running the test with from 1 up to 16 concurrent threads (each point in the graph is the average of nine test runs). My reading of the results is that there is no measurable difference in performance between the clean trunk and one that has the probes without enabling them. If the probes are enabled, there is a small, but measurable, degradation when the system gets saturated (when the number of threads is >= 10 in this experiment). I think this means it would be safe to add such probes, have them disabled by default, and make it easy to turn them on at runtime when needed. > Give users a way to monitor more Derby internals. > -------------------------------------------------- > > Key: DERBY-5772 > URL: https://issues.apache.org/jira/browse/DERBY-5772 > Project: Derby > Issue Type: Improvement > Components: JMX, Tools > Affects Versions: 10.9.1.0 > Reporter: Rick Hillegas > Attachments: pagecache-counters.diff, pagecache-counters.diff, > pagecache-counters.png > > > We should give users a way to track hits/misses in the page cache. This will > help users tune the size of the page cache. JMX-visible monitors might be a > useful solution here. See the following email thread: > http://old.nabble.com/Cache-Hit-Miss-rates-for-Derby-pageCache-to33865646.html#a33865646 -- This message was sent by Atlassian JIRA (v6.3.4#6332)