Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-82839

Improve resource consumption statistics for updates

    • Storage Execution
    • Fully Compatible
    • Execution Team 2024-03-04, Execution Team 2024-03-18

      When a user performs an update we pass the full size of the new document to the metrics collector, not the change in size. We then calculate billed units (i.e. docunitswritten) based on the full size. This is not intuitive to end-users, and in some cases results in serverless bills that are disproportionate to expectations.

      It would be helpful if we had additional write metrics (e.g., updatebyteswritten and updateunitswritten) that tracked the update size/delta alongside the existing "catch all" metric for inserts/updates.

      Additionally, if an update ends up generating a delta WT_MODIFY instead of a full replacement, the document-bytes-written operation metric will only accrue the count of the modified bytes instead of the entire document byte count. Since the code logic to determine whether to use a delta update or a full update is internal to MongoDB, it is undesirable to leak this internal logic into the public-facing operation metric.

      We should set the document-bytes-written metric to the absolute value of the change in size for the document being written, regardless of whether the entire document was replaced or not. The downstream consumers of this metric would have to recognize that this was a delta change and could be negative sometimes.

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            steve.kuhn@mongodb.com Steve Kuhn
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: