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

Give up compaction if the cache is under pressure for too long

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Compaction
    • Storage Engines
    • 5
    • StorEng - Defined Pipeline

      Compaction periodically checks if the cache is stuck:

              /*
               * Periodically check if compaction has been interrupted or if eviction is stuck, quit if
               * this is the case.
               */
              if (first || ++i > 100) {
      ...
                  if (__wt_cache_stuck(session))
                      WT_ERR(EBUSY);
      ...
              }
      

      Waiting for the cache to be stuck might be too late and put the system in trouble. Instead, we could have a conservative approach and use thresholds to know if the system is slowly becoming unstable. This was done for the background compaction thread in WT-13080.

      One suggestion is to check periodically the right thresholds and if we are experiencing pressure for some time, it might be better to give up on compaction to avoid adding more pressure to the system.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: