WL#4479: Falcon Engine - Page Cache: high concurency Get Free Buffer

Affects: WorkLog-3.4 — Status: Complete — Priority: Medium

Falcon page cache has a findBuffer() routine that looks at the BDB list starting
at the oldest and moving toward the youngest.  This code is single threaded and
can include time consuming disk IO.

This change will increase the concurrency by executing most of the algorithm
without held locks.  It will accommodate a lost race condition in the situation
where two threads are looking for the same page at the same time by re-queuing
the 2nd free page at the end of the BDB list and waiting for the first BDB to be
ready for use.

This change will also move unavailable BDB's to the front of the list to deal
with the situation where a BDB was requested once, aged to the end of the list
but is still in use.  There is no need to search this BDB every time we look for
a free BDB.

It will search the tail fraction of the LRU for a bdb that is not in use and not
dirty to avoid a forced disk write that slows down a user thread needlessly.  If
there are no unused and clean pages in tail fraction of the list, then a dirty
page will be used and the forced write will occur thus slowing down user threads
to accommodate the size of the page cache and speed of the disks.

You must be logged in to tag this worklog

No Comments yet

Votes

Not yet rated.
You must be logged in to vote.

Watches

0 members are watching this worklog
You must be logged in to track this worklog.

Provide Feedback

Please note:
HTML will be purified, but we allow for a number of HTML tags so that you have the flexibility to decorate your comment text to some extent. The comments allow the following HTML tags:

strong, b, em, blockquote, a, code, pre

To put code into your comment, simply encapsulate your code with
[code language="XXX"][/code], where XXX is any common language, for instance "PHP", "SQL", "C", etc.



You must be logged in to comment