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

WT_SESSION_NO_RECONCILE flag set by history cursor prevents eviction

    • 8
    • Storage - Ra 2020-04-20, Storage - Ra 2020-05-04

      Following from WT-5929:

      We set the WT_SESSION_NO_RECONCILE flag on the session when we open a history store cursor, and unset it when we close the cursor. While the flag is set the session can not evict pages.

      Whereas this flag used to be set for a very short duration with lookaside eviction, the flag gets set for extended durations with the history store. This reduces eviction performance exponentially.

      To reproduce:
      I am running update-only-btree reduced to a runtime of 30 seconds. I get 20% improvement in operations per sec if the flag is not set on the session at all, ie with the following change:

      diff --git a/src/history/hs.c b/src/history/hs.c
      index b79a90c2b..6e00a5a7a 100644
      --- a/src/history/hs.c
      +++ b/src/history/hs.c
      @@ -12,7 +12,7 @@
        * When an operation is accessing the history store table, it should ignore the cache size (since
        * the cache is already full), and the operation can't reenter reconciliation.
        */
      -#define WT_HS_SESSION_FLAGS (WT_SESSION_IGNORE_CACHE_SIZE | WT_SESSION_NO_RECONCILE)
      +#define WT_HS_SESSION_FLAGS WT_SESSION_IGNORE_CACHE_SIZE
      

      What we need to do:

      • Understand the usage of the flag and how that adapts in the world of durable history
      • Reduce the scope of how long the flag remains set.

            Assignee:
            luke.pearson@mongodb.com Luke Pearson
            Reporter:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: