db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Matrigali <mikem_...@sbcglobal.net>
Subject Re: [jira] Closed: (DERBY-704) Large page cache kills initial performance
Date Tue, 15 Nov 2005 19:07:12 GMT
Also I was wondering if you had any idea where the invalid pages
were coming from?  The original problem with invalid pages was
from drop tables, where applications didn't like it that we used
all the pages in the cache when they were growing a single table
to 1/2 the cache size and then dropping it.  So the invalid case
was sort of special and wasn't expected to happen very often.
The usual case should be the cache growing to full and then LRU'ing
old pages to make for way for new ones.

Maybe there are some temp tables involved in your testing?

I thought you were doing a TPCC type of benchmark, so I am not
sure where the invalid pages are coming from.

Your work on big caches is very interesting, historically not much
work has been done in this area.

Mike Matrigali wrote:

> just got a chance to look at the patch, it would have been nice if
> some of the great comments that are in the bug description had made
> it into the code changes.
> Knut Anders Hatlen (JIRA) wrote:
>>     [ http://issues.apache.org/jira/browse/DERBY-704?page=all ]
>>Knut Anders Hatlen closed DERBY-704:
>>Fixed in revision 344270.
>>>Large page cache kills initial performance
>>>        Key: DERBY-704
>>>        URL: http://issues.apache.org/jira/browse/DERBY-704
>>>    Project: Derby
>>>       Type: Bug
>>> Components: Services, Performance
>>>   Versions:,,,,,,,
>>>Environment: All platforms
>>>   Reporter: Knut Anders Hatlen
>>>   Assignee: Knut Anders Hatlen
>>>    Fix For:
>>>Attachments: DERBY-704.diff, cpu-usage.png, derbyall_report.txt, throughput.png
>>>When the page cache is large the performance gets lower as the page
>>>cache is being filled. As soon as the page cache is filled, the
>>>throughput increases. In the period with low performance, the CPU
>>>usage is high, and when the performance increases the CPU usage is
>>>This behaviour is caused by the algorithm for finding free slots in
>>>the page cache. If there are invalid pages in the page cache, it will
>>>be scanned to find one of those pages. However, when multiple clients
>>>access the database, the invalid pages are often already taken. This
>>>means that the entire page cache will be scanned, but no free invalid
>>>page is found. Since the scan of the page cache is synchronized on the
>>>cache manager, all other threads that want to access the page cache
>>>have to wait. When the page cache is large, this will kill the
>>>When the page cache is full, this is not a problem, as there will be
>>>no invalid pages.

View raw message