WL#4478: Falcon Engine - Scavenge: Prevent Large Age Groups

Affects: WorkLog-3.4 — Status: Un-Assigned — Priority: Medium

Falcon scavenger currently uses age groups for scavenging.  The smallest atomic
scavenge is one age group.  When a heavy read query executes and fills the cache
it will be ejected from the cache as one.  Effectively clearing the cache.  Even
if there is no other data that needs the cache elements.

Original Solution - Use floor for Early Out:
This change will allow items to remain in cache if the background scavenger task
has reached a memory floor limit.  Other items in the age group will be
scavenged on the next successive scavenge calls.  

The problem with this solution is that records are not actually scavenged in age
group order.  RecordScavenge::inventoryRecord() will find the target age group
and then the scavenger cycle will scavenge ANY record it comes across from that
age group and older as it traverses the tables and record trees.  The scavenge
cycle MUST finish the entire list of records on each cycle or else there will be
records in the last tables that NEVER get scavenged.  So in order to make a
partial age group scavenge work, the whole scavenge code must be reworked so
that the next cycle can start where the last one left off.

New Solution - Smaller consistently sized age groups 
Instead of trying to scavenge only parts of an age group when one age group is
too big, use a load based trigger to make sure no age group gets too big.  If
the age groups are consistently sized and contain a small incremental portion of
the record cache, then the scavenger will never need to scavenge only part of an
age group.

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