Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-14144

Should application threads avoid update eviction when "busy"

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Cache and Eviction
    • Storage Engines, Storage Engines - Transactions
    • StorEng - Defined Pipeline

      __wt_evict_needed() is called to determine whether the calling thread should help with eviction work. Normally it returns true if the cache is at or above any of its eviction triggers. But if the busy argument to __wt_evict_needed() is set, then it ignores the dirty eviction trigger.

      I think we should also ignore the update eviction trigger.

      The common cases for setting the busy flag are when the caller is reading a new page into the cache and the system wants to

      • Make sure there is space in the cache for the new (clean) page
      • Limit the work done to create space since the caller may be holding a hazard pointer on the parent page.
        In this case it makes sense to avoid the work of reconciling (and possibly splitting) a dirty page.

      By the same logic, we should also avoid evicting pages for update eviction.

      Before making this change, I recommend looking at git blame to see when the check for update eviction was added – probably around the time we introduced durable history – and see if the ticket, or any of the folks who worked on in have an explanation for why we should perform update eviction here.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            keith.smith@mongodb.com Keith Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: