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

Create additional stats for the background compaction server

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.2.0, 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: Compaction
    • None
    • 3

      Tasks:

      Add new statistics to track the status of the background compaction server. The list of suggested statistics can be found below:

      • The background compaction server encountered an error
        • This stat currently exists and is called background_compact_fail. However, it is not used when the background compaction returns WT_ERROR after being interrupted, it should be added there too - Done in WT-11637
      • The table did not meet the requirements to be eligible for compaction
      • The background compaction server successfully compacted a table
        • After the compact API call, we should check for the ret value and update that stat when it is 0 before any other processing.
      • The number of elements present in the queue processed by the background compaction server
        • There is no such queue in the current implementation, this is no longer needed. A stat tracking the number of elements being tracked has been added through WT-11343 background_compact_files_tracked
      • The number of blocks moved for compaction
      • The amount of space saved by shrinking tables
        • We could make a stat out of compact_bytes_rewritten which appears in the __wt_block struct
      • The number of pages visited by compaction
        • This is already covered by the following stat:
        • BtreeStat('btree_compact_pages_reviewed', 'btree compact pages reviewed', 'no_clear,no_scale'), 
      • The number of checkpoints generated by compaction
        • This stat should be updated whenever __compact_checkpoint is called.
      • The I/O load generated by compaction
        • The current implementation does not allow us to do this.
      • When getting EBUSY in __compact_worker before setting another_pass to true and setting ret back to 0.
        • This does not mean a failure but just a possible transient EBUSY on a specific dhandle.
        • There is already a verbose message when this occurs, a stat may not be required.
      • When compaction is interrupted by the application - Done in WT-11344

      Definition of done:

      • A set of new statistics have been defined and implemented for background compaction.

            Assignee:
            etienne.petrel@mongodb.com Etienne Petrel
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: