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

Improve how the background compaction server decides when a table should be compacted

    • 8
    • ASeasonTooMany-2023-08-22, BermudaTriangle- 2023-09-05, TheMoon-StorEng - 2023-09-19

      The background compaction server should not try to compact the same tables over and over, especially if this may not be worth it. We could create an in-memory data structure to know whether the background compaction server should compact or not a table.

      For instance, every time a table is compacted, we could save the time when compaction was performed, the time it took, the effectiveness of compaction and if the table was currently being accessed. With that information, the next time the background compaction selects that table for compaction, we could decide whether it is necessary or not to try compaction again. This should reduce the number of compaction calls that were not that beneficial as well as the contention related to handles management.

      Tasks:

      • Define the required information
      • Define what would lead to the execution of compaction
      • Create and keep up to date the in-memory data structure to store all the necessary information
      • Use that structure to decide whether compaction should be performed or not

      Definition of done:

      • The background compaction server relies on a new set of information to perform compaction

            Assignee:
            sean.watt@mongodb.com Sean Watt
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: