All Products
Search
Document Center

Database Autonomy Service:Storage analysis

Last Updated:Mar 28, 2026

The storage analysis feature in Database Autonomy Service (DAS) gives you visibility into storage usage across your MongoDB instance — from instance-level totals and growth trends down to per-collection fragmentation rates. When fragmentation accumulates, you can recycle tablespace fragments directly from the DAS console to reclaim disk space and prevent performance degradation.

Supported instances

Before you use this feature, confirm that your instance meets the following requirements:

  • Instance type: Self-managed MongoDB database, or ApsaraDB for MongoDB replica set or sharded cluster instance of a supported version (see the table below)

  • Connection state: Connected to DAS and in the Normal Access state. For more information, see Database instances.

Supported ApsaraDB for MongoDB versions

Major versionMinor versionSupported
MongoDB 4.03.0.xNo
MongoDB 4.24.0.0–4.0.22No
MongoDB 4.24.0.23 and laterYes
MongoDB 4.4 using Database File System (DBFS)AllNo
MongoDB 4.45.0.0–5.0.6No
MongoDB 4.45.0.7 and laterYes
MongoDB 5.0AllYes
MongoDB 6.0AllYes

View storage information

Use the Storage Analysis page to monitor three types of storage health signals:

When you want to...Go to
Check overall disk health: total used space, average daily growth rate within the previous seven days, and days until fullStorage Overview > Storage section
Identify tables or collections with storage exceptionsStorage Overview > Exceptions section
Analyze storage growth over the past seven daysStorage Overview > Storage Trend section
Inspect per-table storage usage, fields, and indexesStorage Overview > Tablespaces section
View storage usage per database and its tablespace breakdown; click a table name to view its fields and indexesData Space tab

To open the Storage Analysis page:

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. Find the instance and click its instance ID.

  4. In the left-side navigation pane, click Storage Analysis.

  5. Click the Storage Overview or Data Space tab.

Note

In the Storage section, hover over the image.png icon to see details for each metric.

Recycle tablespace fragments

When a collection's fragmentation rate is high, recycling tablespace fragments frees up disk space. DAS runs the compact command on the target collection to perform the recycling.

Important

Tablespace fragment recycling only works on hidden nodes. To recycle fragments on a primary or secondary node, you must first switch that node to a hidden node. To switch nodes, see Primary/Secondary switchover. To run compact manually on any node, see Defragment the disks of an instance to increase disk utilization.

Choose automatic or manual recycling

Automatic recyclingManual recycling
How it triggersDAS scans hidden nodes during the maintenance window and runs compact on qualifying collectionsYou initiate recycling on a specific collection
Qualifying conditionsIndex + data storage > 1 GB and fragmentation rate > 20%Any collection you select
Per-node cap100 GB per hidden node per recycling roundNo cap per operation
Best forMany collections with small recyclable spaceCollections with large recyclable space, especially those exceeding 100 GB

Set up automatic recycling

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. Find the instance and click its instance ID.

  4. In the left-side navigation pane, click Storage Analysis.

  5. In the Tablespaces section, find the table and click Recycle in the Fragmentation Rate column.

  6. In the Recycle dialog box, configure an automatic recycling plan and specify a maintenance window.

During each maintenance window, DAS scans hidden node collections and runs compact on collections where index and data storage exceeds 1 GB and the fragmentation rate exceeds 20%. The total recyclable space processed per hidden node per round is capped at 100 GB. If a collection's recyclable space exceeds 100 GB, recycle it manually instead.

Recycle fragments manually

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. Find the instance and click its instance ID.

  4. In the left-side navigation pane, click Storage Analysis.

  5. In the Tablespaces section, find the table and click Recycle in the Fragmentation Rate column.

  6. In the Recycle dialog box, go to the Collection with High Fragmentation Rate section.

  7. Find the collection and click Recycle in the Actions column.

  8. Select Execute Now or Run in the O & M window.

Recycling limits and recommendations

  • Recycling is not immediate. DAS runs compact in the background, and the duration depends on the amount of fragmentation.

  • Recycle up to 10 collections per batch. Wait for the current recycling task to finish before starting the next one — running too many concurrent tasks may cause failures.

  • Collections with a low fragmentation rate may yield limited space savings after recycling.

  • If recyclable space exceeds 100 GB, the recycling task may take more than one hour. Schedule it during a low-traffic period.

Note

If a cache eviction error occurs during recycling, the instance encountered cache pressure and the compact operation exited early. Reschedule the task at a different time. If the task fails repeatedly, submit a ticket.

Verify recycling results

After the recycling task completes, click Re-analyze to view the updated storage statistics. Check whether the fragmentation rate and used space have decreased.

API reference

OperationDescription
CreateStorageAnalysisTaskCreates a storage analysis task to query storage usage details for databases and tables.
GetStorageAnalysisResultQueries the status and results of a storage analysis task.

What's next

For MongoDB instances that don't support storage analysis (instances earlier than MongoDB 4.0, or instances not using replica set or sharded cluster topology), see Defragment the disks of an instance to increase disk utilization.