Skip to content

Decay algorithm adjustment #813

Closed

Description

@interwq

Discussed with @jasone offline about our current decay based purging implementation. We believe there is a bug causing the decay to be slower than it should, from this line:

decay->nunpurged = extents_npages_get(extents);

Here we track the # of unpurged pages at the end of each epoch, and use it to determine the # of new dirty pages in the next epoch. However, if the dirty pages are being reused quickly, e.g. if they all get reused in the next epoch, then decay->nunpurged becomes 0 in the next epoch; and then in a future epoch they will all be counted as "new" dirty pages (in other words the same dirty pages will be double counted the next time they are generated). As a result, we will allow more dirty pages to be alive then we should.

The fix we discussed was, instead of tracking the nunpurged, we track the npages_limit at the end of the epoch, and rely on that to determine new # of dirty pages.

One assertion we could make based on this fix:
npages_limit <= peak_n_dirty_pages

Either @jasone or I will be getting this fix, probably after #714, so that test it for both cases (tick-triggered and background threads driven).

Activity

  1. added this to the 5.0.0 milestone on May 3, 2017
  2. self-assigned this
    on May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions