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

Several eviction statistics misleading, they imply success, when they mean attempt

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Storage Engines
    • 3
    • StorEng - Defined Pipeline
    • Needed
    • Triage and Release

      Summary
      Eviction statistics could be misleading if eviction attempts fail.

      Motivation
      Here is the code for __evict_page:

          /*
           * An internal session flags either the server itself or an eviction worker thread.
           */
          if (is_server)
              WT_STAT_CONN_INCR(session, cache_eviction_server_evicting);
          else if (F_ISSET(session, WT_SESSION_INTERNAL))
              WT_STAT_CONN_INCR(session, cache_eviction_worker_evicting);
          else {
              if (__wt_page_is_modified(ref->page))
                  WT_STAT_CONN_INCR(session, cache_eviction_app_dirty);
              WT_STAT_CONN_INCR(session, cache_eviction_app);
              cache->app_evicts++;
              time_start = WT_STAT_ENABLED(session) ? __wt_clock(session) : 0;
          }
      
       .....
          WT_WITH_BTREE(session, btree, ret = __wt_evict(session, ref, previous_state, flags));
       .....
      

      Several statistics being incremented there count the number of pages being evicted (application or worker threads or server, etc). But they imply that the pages actually evict. Whereas __wt_evict could potentially fail and mislead the interpretations being derived from FTDC. eg:

      "cache pages evicted by application threads" implies that these pages have been successfully evicted by the application thread. Whereas, since in this case, the pages actually failed the statistic is misleading. We should rename these bunch of statistics.

      • Does this affect any team outside of WT?
        Yes, TSEs or other engineers reading FTDC could be misled.
      • Is this issue urgent?
        No

      [Optional] Suggested Solution
      Rename statistics to imply attempt count rather than success. Can also add statistics around a failure count.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated: