Skip to content

DOCS-7942 Added statement that dataSize is uncompressed and outlined … #2692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions source/includes/ref-toc-command-diagnostic.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
name: ":dbcommand:`explain`"
file: /reference/command/explain
description: |
Returns information on the execution of various operations.
---
name: ":dbcommand:`listDatabases`"
file: /reference/command/listDatabases
description: "Returns a document that lists all databases and returns basic database statistics."
---
name: ":dbcommand:`dbHash`"
file: /reference/command/dbHash
description: "Returns hash value a database and its collections."
---
name: ":dbcommand:`driverOIDTest`"
file: /reference/command/driverOIDTest
description: "Internal command that converts an ObjectId to a string to support tests."
---
name: ":dbcommand:`listCommands`"
file: /reference/command/listCommands
description: "Lists all database commands provided by the current :program:`mongod` instance."
---
name: ":dbcommand:`availableQueryOptions`"
file: /reference/command/availableQueryOptions
description: "Internal command that reports on the capabilities of the current MongoDB instance."
Expand All @@ -35,16 +14,6 @@ name: ":dbcommand:`connPoolStats`"
file: /reference/command/connPoolStats
description: "Reports statistics on the outgoing connections from this MongoDB instance to other MongoDB instances in the deployment."
---
name: ":dbcommand:`shardConnPoolStats`"
file: /reference/command/shardConnPoolStats
description: |
Reports statistics on a :program:`mongos`'s connection pool for client
operations against shards.
---
name: ":dbcommand:`dbStats`"
file: /reference/command/dbStats
description: "Reports storage utilization statistics for the specified database."
---
name: ":dbcommand:`cursorInfo`"
file: /reference/command/cursorInfo
description: "Removed in MongoDB 3.2. Replaced with :serverstatus:`metrics.cursor`."
Expand All @@ -53,14 +22,55 @@ name: ":dbcommand:`dataSize`"
file: /reference/command/dataSize
description: "Returns the data size for a range of data. For internal use."
---
name: ":dbcommand:`dbHash`"
file: /reference/command/dbHash
description: "Returns hash value a database and its collections."
---
name: ":dbcommand:`dbStats`"
file: /reference/command/dbStats
description: "Reports storage utilization statistics for the specified database."
---
name: ":dbcommand:`diagLogging`"
file: /reference/command/diagLogging
description: "Provides a diagnostic logging. For internal use."
---
name: ":dbcommand:`driverOIDTest`"
file: /reference/command/driverOIDTest
description: "Internal command that converts an ObjectId to a string to support tests."
---
name: ":dbcommand:`explain`"
file: /reference/command/explain
description: |
Returns information on the execution of various operations.
---
name: ":dbcommand:`features`"
file: /reference/command/features
description: "Reports on features available in the current MongoDB instance."
---
name: ":dbcommand:`getCmdLineOpts`"
file: /reference/command/getCmdLineOpts
description: "Returns a document with the run-time arguments to the MongoDB instance and their parsed options."
---
name: ":dbcommand:`getLog`"
file: /reference/command/getLog
description: "Returns recent log messages."
---
name: ":dbcommand:`hostInfo`"
file: /reference/command/hostInfo
description: "Returns data that reflects the underlying host system."
---
name: ":dbcommand:`isSelf`"
file: /reference/command/isSelf
description: "Internal command to support testing."
---
name: ":dbcommand:`listCommands`"
file: /reference/command/listCommands
description: "Lists all database commands provided by the current :program:`mongod` instance."
---
name: ":dbcommand:`listDatabases`"
file: /reference/command/listDatabases
description: "Returns a document that lists all databases and returns basic database statistics."
---
name: ":dbcommand:`netstat`"
file: /reference/command/netstat
description: "Internal command that reports on intra-deployment connectivity. Only available for :program:`mongos` instances."
Expand All @@ -73,35 +83,25 @@ name: ":dbcommand:`profile`"
file: /reference/command/profile
description: "Interface for the :ref:`database profiler <profiler>`."
---
name: ":dbcommand:`validate`"
file: /reference/command/validate
description: "Internal command that scans for a collection's data and indexes for correctness."
name: ":dbcommand:`serverStatus`"
file: /reference/command/serverStatus
description: "Returns a collection metrics on instance-wide resource utilization and status."
---
name: ":dbcommand:`shardConnPoolStats`"
file: /reference/command/shardConnPoolStats
description: |
Reports statistics on a :program:`mongos`'s connection pool for client
operations against shards.
---
name: ":dbcommand:`top`"
file: /reference/command/top
description: "Returns raw usage statistics for each database in the :program:`mongod` instance."
---
name: ":dbcommand:`validate`"
file: /reference/command/validate
description: "Internal command that scans for a collection's data and indexes for correctness."
---
name: ":dbcommand:`whatsmyuri`"
file: /reference/command/whatsmyuri
description: "Internal command that returns information on the current client."
---
name: ":dbcommand:`getLog`"
file: /reference/command/getLog
description: "Returns recent log messages."
---
name: ":dbcommand:`hostInfo`"
file: /reference/command/hostInfo
description: "Returns data that reflects the underlying host system."
---
name: ":dbcommand:`serverStatus`"
file: /reference/command/serverStatus
description: "Returns a collection metrics on instance-wide resource utilization and status."
---
name: ":dbcommand:`features`"
file: /reference/command/features
description: "Reports on features available in the current MongoDB instance."
---
name: ":dbcommand:`isSelf`"
file: /reference/command/isSelf
description: "Internal command to support testing."
...
19 changes: 14 additions & 5 deletions source/reference/command/dbStats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,17 @@ Output

.. data:: dbStats.dataSize

The total size in bytes of the data held in this database including the
:term:`padding factor`. The ``scale`` argument affects this
value. The :data:`~dbStats.dataSize` will not decrease when :term:`documents
<document>` shrink, but will decrease when you remove documents.
The total size in bytes of the uncompressed data held in this database. The
``scale`` argument affects this value. The :data:`~dbStats.dataSize` will decrease
when you remove :term:`documents <document>`.

For databases using the :doc:`MMAPv1 </core/mmapv1>` storage engine, ``dataSize`` includes
preallocated space and the :term:`padding factor`. The ``dataSize`` will not decrease when
documents shrink.

For databases using the :ref:`WiredTiger <storage-wiredtiger-compression>` storage engine,
``dataSize`` may be larger than ``storageSize`` if compression is enabled. The ``dataSize``
will decrease when documents shrink.

.. sum of all records not counting deleted records

Expand All @@ -89,7 +96,9 @@ Output
The total amount of space in bytes allocated to collections in this database
for :term:`document` storage. The ``scale`` argument affects this
value. The :data:`~dbStats.storageSize` does not decrease as you remove or
shrink documents.
shrink documents. This value may be smaller than ``dataSize`` for databases
using the WiredTiger storage engine with :ref:`compression <storage-wiredtiger-compression>`
enabled.

.. sum of all extents (no indexes or the $freelist)
.. include links to eventual documentation of storage management
Expand Down