VK Cloud logo

Disk autoscaling

VK Cloud supports automatic scaling of database disks. When the amount of free disk space reaches a threshold value, the disk size is automatically increased by the expansion step. This increase is limited by the specified maximum disk size.

Autoscaling is supported for the following types of disks:

  • Data disk — a disk with data connected to the VM in addition to the main disk.
  • WAL disk — a disk storing the write-ahead log (Write-Ahead Log, WAL). Only for PostgreSQL databases in Single, Master-Replica, and Cluster configurations.

Autoscaling parameters for different types of disks

Parameter

Data disk

WAL disk

Maximum disk size, GB

Set manually and cannot exceed:

  • 10 TB — for High-IOPS SSD;
  • 10 TB — for High-IOPS HA SSD;
  • 25 TB — for SSD disks

Calculated automatically and cannot be set by the user

Threshold value, GB

Calculated by the formula: 2 + current data disk size / 25.

If the value obtained by the formula is greater than 25, the threshold value is set equal to 25 GB

Calculated by the formula: 0.5 + current WAL disk size / 25.

If the value obtained by the formula is greater than 2, the threshold value is set equal to 2 GB

Expansion step, GB

Calculated by the formula: 2 + current data disk size / 25.

If the value obtained by the formula is greater than 25, the threshold value is set equal to 25 GB

Calculated by the formula: 0.5 + current WAL disk size / 25.

If the value obtained by the formula is greater than 2, the threshold value is set equal to 2 GB

Autoscaling algorithm

  1. The user enables autoscaling and sets the maximum disk size: when creating an instance or after its deployment.

  2. The free disk space reaches the threshold value at which autoscaling should trigger.

  3. The service calculates the expansion step and determines whether the disk can be scaled:

    • If the new disk size (current size + expansion step) does not exceed the specified maximum size, the disk size is increased.
    • If the new disk size exceeds the specified maximum size, autoscaling is not performed.

DBMSs supporting autoscaling

The table below shows for which configurations and DBMS versions disk autoscaling is supported.

DBMS type

Single

Master-Replica

Cluster

MySQL (all versions)

Disk autoscaling

Disk autoscaling

Disk autoscaling

PostgreSQL (all versions)

Disk autoscaling

Disk autoscaling

Disk autoscaling

ClickHouse (all versions)

Disk autoscaling

Disk autoscaling

Disk autoscaling

Redis 5

Disk autoscaling

Disk autoscaling

Disk autoscaling

Redis 6

Disk autoscaling

Disk autoscaling

Disk autoscaling

MongoDB 4.0

Disk autoscaling

Disk autoscaling

Disk autoscaling

OpenSearch 2

Disk autoscaling

Disk autoscaling

Disk autoscaling

Was this article helpful?