|
Attached graphs showing the throughput and CPU usage running with and
without the patch. The graphs show the average of seven runs, throughput and CPU usage were reported every 30 seconds. 12 clients were running an update-intensive load on the database. The database had 10 GB of user data, and the page cache size was 512 MB. The CPU usage is relatively low because the tests were run on an 8-CPU machine. The first 30 minutes the CPU usage was higher and the throughput significantly lower without the patch than with the patch. Sorry, I forgot the output from svn stat.
M java/engine/org/apache/derby/impl/services/cache/Clock.java Hi, Knut. Normally I wouldn't review a kernel change, but this is a very simple change, it seems to have a lot of value, and it makes sense to me. I'll do a sanity build and test and then I will go ahead and check in. If a kernel developer would like to review, please do so.
Checked in patch, revision number 344270
bash-2.05$ svn commit Sending java/engine/org/apache/derby/impl/services/cache/Clock.java Transmitting file data . Committed revision 344270. Fixed in revision 344270.
Issue is reopened in order to add more comments to the code.
Patch
to the code: // 1) find out how many invalid items there are in the // cache // 2) search for a free invalid item // 3) stop searching when there are no more invalid // items to find and // Invalid items might occur in the cache when // a) a new item is created in growCache(), but it // is not in use yet, or // b) an item is deleted (usually when a table is // dropped) // It is critical to break out of the loop as soon as // possible since we are blocking others trying to // access the page cache. New items are added to the // end of the page cache, so the search for invalid // items should start from the end. If the comments are OK, could a committer please commit this change? Thanks. svn stat: M java/engine/org/apache/derby/impl/services/cache/Clock.java Fixed in revision 344270. Extra comments put into the code in revision 345215.
Reopening to port to 10.1.
Fix merged cleanly. Derbyall ran with two failures on Solaris 10 x86/Sun JVM 1.5 (derbynet/testSecMec.java and unit/T_Diagnosticable.unit), but these are also seen in Ole's regression tests.
Committed to 10.1 with revision 409374. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The patch modifies the search for a free slot in the page cache
(org.apache.derby.impl.services.cache.Clock.findFreeItem()) in the
following way:
1) find out how many invalid pages there are in the page cache
2) check whether pages that are skipped in the search are invalid
3) if the number of skipped invalid pages equals the number of
invalid pages, stop the search for invalid pages
Could someone please review the patch? Thanks.