All Products
Search
Document Center

ApsaraDB RDS:Storage compression

Last Updated:Feb 28, 2026

Storage compression reduces the physical storage footprint of your ApsaraDB RDS for MySQL instance by up to 50%, allowing you to store up to 2.5 times more data within the same storage capacity. The feature compresses table data in data storage and files in log storage, such as transaction log files, at the hardware level with minimal performance impact and no application changes. Storage compression is disabled by default.

How it works

Storage compression uses an Alibaba Cloud intelligent transparent compression disk with an embedded dedicated chip. The chip compresses and decompresses data in real time at the physical disk layer, using a compression algorithm equivalent to zlib Level 6.

Key characteristics:

  • Transparent to applications. Compression and decompression happen at the storage layer. No changes to queries, schemas, or application logic are required.

  • Reduces write amplification. Transparent compression reduces data migration within the disk, lowering the inherent write amplification of SSDs.

  • Hardware-accelerated. A dedicated chip handles compression. Compared with software-based compression, transparent compression is more efficient and has minimal impact on performance.

For example, an instance with 100 GB of storage capacity can hold up to 250 GB of data after you enable storage compression. Actual ratios depend on data characteristics.

Prerequisites

Before you enable storage compression, verify that your RDS instance meets all of the following requirements:

RequirementSupported values
MySQL versionMySQL 8.0, MySQL 5.7, or MySQL 5.6
EditionRDS High-availability Edition or RDS Cluster Edition
Instance typeDedicated instance type
Storage typePremium ESSD or Premium Local SSD
Storage capacity (Premium ESSD)1,000 to 25,000 GB
Storage capacity (Premium Local SSD)1,000 to 2,400 GB
Billing methodSubscription or pay-as-you-go

Enable storage compression

Important

Storage compression cannot be disabled after it is enabled. Review the Limitations and Billing sections before proceeding.

  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select the region of your RDS instance. Find the instance and click its ID.

  2. In the Configuration Information section of the Basic Information page, click Enable Storage Compression.

    Note

    If the button is not displayed, your RDS instance does not meet the prerequisites listed above.

  3. In the Enable Storage Compression dialog box, read and confirm the usage notes and click OK.

  4. Click OK to confirm. The instance status changes to Upgrading/Downgrading. When the process completes, the Configuration Information section displays Enabled for storage compression.

Monitor storage after enabling compression

After you enable storage compression, monitor the following metrics on the Standard Monitoring tab of the Monitoring and Alerts page:

MetricDescription
MySQL Storage Space Used (MB)Logical (uncompressed) storage used by MySQL data
MySQL Physical Storage Used (MB)Physical (compressed) storage used on disk
Disk Usage (%)Percentage of physical storage capacity in use

Compare MySQL Storage Space Used (MB) and MySQL Physical Storage Used (MB) to assess the compression ratio. For more information, see View the monitoring information.

Billing

After you enable storage compression, the storage capacity fee increases by a 1.25x multiplier to reflect the expanded effective capacity. Billing is based on physical (compressed) data.

Storage capacity fee

Compression statusFee formula
DisabledUnit price of storage capacity x Storage capacity x Usage duration
Enabled1.25 x Unit price of storage capacity x Storage capacity x Usage duration

When you enable storage compression, the system creates an order. For subscription instances, this generates a configuration upgrade order with a price difference payment. For pay-as-you-go instances, this generates a specification change order and the new rate applies immediately. The billing logic follows the same rules as a specification change. Fees shown in the ApsaraDB RDS console are authoritative.

Free quota on backup storage

Storage compression doubles the free quota on backup storage. Backups are measured against uncompressed (logical) data size.

Storage typeCompression statusFree quota
Premium ESSDDisabled200% of purchased storage capacity
Premium ESSDEnabled400% of purchased storage capacity
Premium Local SSDDisabled50% of purchased storage capacity
Premium Local SSDEnabled100% of purchased storage capacity

To view your current free quota, check the Backup Usage parameter in the Instance Resources section of the Basic Information page. The Backup Usage parameter indicates the actual amount of logical data.

If backup files exceed the free quota, excess backup storage is charged hourly:

Hourly fee = (Total backup file size - Free quota) x Unit price of backup storage

For details on backup billing, see Billable items and Backup storage fees.

Limitations

Irreversibility

Storage compression cannot be disabled after it is enabled.

Specification change restrictions

After you enable storage compression, the following specification changes are restricted:

RestrictionDetails
Instance typeCannot change from a dedicated instance type to a general-purpose instance type
Billing methodCannot change from pay-as-you-go to serverless
Storage typePremium Local SSD instances cannot change storage type to cloud disk
Storage capacityCannot reduce storage capacity below 1,000 GB
Elastic upgradeCloud disk instances cannot perform elastic upgrades

For more information, see Change instance specifications.

Read-only instances

  • Enable storage compression on all read-only instances before enabling it on the primary instance. For more information, see Read-only ApsaraDB RDS for MySQL instances.

  • New read-only instances attached to a compression-enabled primary instance automatically inherit the storage compression setting.

Backup and restoration

  • Database backups contain uncompressed (logical) data. Backup data itself is not compressed.

  • Storage compression can be enabled on instances restored from backup files. For more information, see Backup and restoration.

Recycle bin

Instances restored from the recycle bin inherit the storage compression setting of the original instance. For more information, see Use the recycle bin feature.

Performance impact

Storage compression has minimal impact on instance performance. Stress test results show that throughput changes remain within -5% to +5% under various workloads and concurrency levels.

Test environment

ParameterValue
Application serverAlibaba Cloud Elastic Compute Service (ECS) instance
RDS edition and instance typeRDS High-availability Edition, dedicated (8 cores, 32 GB memory)
Storage typePremium ESSD with I/O performance burst enabled
Storage capacity1,000 GB
Test toolsysbench
Test casesoltp_read_only, oltp_read_write, oltp_write_only

Results: 12 GB dataset

Concurrencyoltp_read_only (before)oltp_read_only (after)Changeoltp_read_write (before)oltp_read_write (after)Changeoltp_write_only (before)oltp_write_only (after)Change
16738.056534.69-3%4698.924620.96-2%3296.623151.49-4%
849446.3248834.86-1%30464.4129389.79-4%17935.9417371.47-3%
1679411.7678639.35-1%47852.2546415.14-3%27851.1527257.97-2%
32100070.48100314.490%68408.6768521.400%40468.3139921.37-1%
64113637.50112402.16-1%82387.0782751.290%57843.8957267.82-1%
128113871.22112133.53-2%90124.6189783.530%69850.3968477.59-2%
256108770.33107001.19-2%88390.1688001.180%79330.6779290.030%
512104325.11102797.59-1%85701.0484782.41-1%77186.7476983.980%

Results: 48 GB dataset

Concurrencyoltp_read_only (before)oltp_read_only (after)Changeoltp_read_write (before)oltp_read_write (after)Changeoltp_write_only (before)oltp_write_only (after)Change
11945.091902.89-2%1700.041748.473%1639.681722.175%
815934.4515155.32-5%13049.8913230.251%12203.4412518.783%
1632436.3231072.30-4%23130.8923727.463%20668.3321196.573%
3256018.8855409.98-1%38182.3839864.064%30498.3331356.853%
6472838.5373459.991%51153.8351888.101%41560.4142073.771%
12880598.8780788.340%58943.6558837.550%50755.5551526.622%
25680500.5780369.960%58969.9459222.250%56874.2056512.52-1%
51274476.6274758.100%58756.2858347.02-1%58009.1058565.041%

FAQ

How do I check the compression ratio after enabling storage compression?

Go to Monitoring and Alerts > Standard Monitoring on your instance page. Compare the MySQL Storage Space Used (MB) metric (logical data) with MySQL Physical Storage Used (MB) (physical data on disk). The ratio between these two values reflects the actual compression ratio for your workload.

Can I disable storage compression after enabling it?

No. Storage compression is irreversible. Once enabled, it cannot be disabled. Review the Limitations section before enabling.

Does storage compression affect my backups?

Backups contain uncompressed (logical) data. Backup file sizes are not reduced by storage compression. However, the free quota on backup storage is doubled when compression is enabled. See the Free quota on backup storage section for details.

Why is the Enable Storage Compression button not displayed?

Your instance does not meet one or more prerequisites. Verify the MySQL version, edition, instance type, storage type, storage capacity, and billing method against the Prerequisites table.

References