[SERVER-50756] add occupied disk size to dbstats Created: 03/Sep/20  Updated: 29/Oct/23  Resolved: 29/Sep/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.9.0-alpha0

Type: Improvement Priority: Major - P3
Reporter: Eric Milkie Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
is documented by DOCS-13901 Investigate changes in SERVER-50756: ... Closed
Problem/Incident
causes SERVER-62277 Performance regression from dbstats d... Closed
Related
is related to SERVER-42037 Expose WiredTiger block-manager stats... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-10-05
Participants:

 Description   

There is a need to calculate the amount of occupied disk space a database is consuming. This can be useful when calculating whether a database could be physically moved to a smaller disk size. Currently, only the on-disk file size is reported by dbstats, but this includes unoccupied blocks in files.
To calculate this for WiredTiger, we can use block_reuse_bytes statistic per file, versus block_size.



 Comments   
Comment by Githook User [ 29/Sep/20 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-50756 Add unoccupied storage space to dbStats

The dbStats command will return how much unoccupied storage space is being used for collections,
indexes, and in total: freeStorageSize, indexFreeStorageSize, and totalFreeStorageSize.
Branch: master
https://github.com/mongodb/mongo/commit/b65313388afab2a98934e482456d62cfdec7c340

Generated at Thu Feb 08 05:23:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.