[SERVER-80122] Add background compaction server's activity to serverStatus Created: 16/Aug/23  Updated: 23/Nov/23  Resolved: 23/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Sean Watt
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on WT-11334 Update the compact session API with a... Closed
depends on WT-11342 Implement the background compaction s... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

This is to expose background compaction metrics in FTDC and will be provided by a new WiredTiger API call.



 Comments   
Comment by Etienne Petrel [ 23/Nov/23 ]

I will close this ticket for now as the function simply outputs stats retrieved from WiredTiger and the current stats should be enough to have a quick overview of what background compaction is doing. If we need more, please feel free to reopen gregory.wlodarek@mongodb.com.

Comment by Sean Watt [ 22/Nov/23 ]

gregory.wlodarek@mongodb.com, is this enough from the server point of view or are we expecting something more?

Comment by Sean Watt [ 22/Nov/23 ]

It appears the serverStatus command already includes all the connection statistics from WiredTiger, so the statistics we've added as part of this project are already included. 

Here's what we can observe as part of serverStatus after running

db.adminCommand({autoCompact: true})
db.runCommand({serverStatus: 1})

 

  "wiredTiger": {
    "uri": "statistics:",
    "autocommit": {
      "retries for readonly operations": 0,
      "retries for update operations": 0
    },
    "background-compact": {
      "background compact failed calls": 0,
      "background compact failed calls due to cache pressure": 0,
      "background compact interrupted": 0,
      "background compact moving average of bytes rewritten": 0,
      "background compact recovered bytes": 0,
      "background compact running": 1,
      "background compact skipped file as it is part of the exclude list": 0,
      "background compact skipped file as not meeting requirements for compaction": 140,
      "background compact successful calls": 14,
      "background compact timeout": 0,
      "number of files tracked by background compaction": 14
    },

 

Comment by Etienne Petrel [ 16/Aug/23 ]

I have added the two following dependencies:

  • WT-11334 adds the "background" config item to the session compact API
  • WT-11342 implements the initial background compaction algorithm

Is there anything specific you need to print information as part of serverStatus?

Generated at Thu Feb 08 06:42:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.