Updated on 2025-01-09 GMT+08:00

Overview of Scaling Up Storage Space

As more data is added, you may start to run out of space. This section describes how to scale up the storage space of a DB instance. Table 1 describes the scale-up methods provided by GaussDB.

Table 1 Scale-up methods

Scale-up Method

Supported Instance Type

Scope

Description

Manually Scaling Up Storage Space for an Instance

  • Distributed
  • Centralized

All shards

Shard-level scale-up is performed based on the selected storage space. All shards are scaled up at a time.

The added storage space must be a multiple of 4 GB x Number of shards.

Manually Scaling Up Storage Space of Specified Shards

Distributed

  • Specified shards
  • All shards

Shard-level scale-up is performed based on the selected storage space. One or more shards are scaled up at a time.

The added storage space must be a multiple of 4 GB.

Configuring Storage Autoscaling for an Instance

  • Distributed
  • Centralized
  • Specified shards
  • All shards

Shard-level scale-up is performed based on the user-defined scaling increment (specified by the Scale Up By parameter). When the available storage of a DN component drops to or below the specified threshold, an automatic scale-up task is triggered to scale up the shard where the DN component with insufficient available storage is located. Storage can be scaled by percentage or a fixed amount.

  • Percentage: The storage is scaled up by a percentage you specify. The added storage space is the storage space of the shard multiplied by the scaling increment.
  • Fixed amount: The storage is scaled up by a fixed amount you specify. The added storage space is a fixed value.

Introduction Video

Manually Scaling Up Storage Space for an Instance

Let's take an independently deployed distributed instance as an example. This instance has three shards, three replicas, and three CNs, which are the default configurations, with a total storage space of 120 GB before the scale-up. This means that each shard has a storage space of 40 GB. If 12 GB of storage is added, the total storage space is 132 GB after scale-up, including 4 GB for each shard. After the scale-up, each shard has a storage space of 44 GB.

Figure 1 Scaling up storage space

Manually Scaling Up Storage Space of Specified Shards

Let's take an independently deployed distributed instance as an example. This instance has three shards, three replicas, and three CNs, which are the default configurations, with a total storage space of 120 GB before the scale-up. This means that each shard has a storage space of 40 GB. If you increase the storage space of shard 1 and shard 2 by 4 GB and 8 GB, respectively, the total storage space after scale-up is 132 GB. The storage spaces of shard 1 and shard 2 are 44 GB and 48 GB, respectively.

Figure 2 Scaling up storage space

Configuring Storage Autoscaling for an Instance

  • By percentage

    Take the independently deployed distributed instance with three shards, three replicas, and three CNs as an example. Its total storage space before the scale-up is 120 GB, with each shard holding 40 GB. In the autoscaling policy, both the Trigger If Available Storage Drops To and Scale Up By parameters are set to 20%. If the available storage usage of shard 1 drops to 20% or lower, a scale-up action is automatically triggered. The added storage space of shard 1 is 8 GB (40 x 20%). After the scale-up, the storage space of shard 1 is 48 GB, and the total storage space of the instance is 128 GB.

    Figure 3 Scaling up storage space

  • By fixed amount

    Take the independently deployed distributed instance with three shards, three replicas, and three CNs as an example. Its total storage space is 120 GB before scale-up, and each shard has a storage space of 40 GB. In the autoscaling policy, the Trigger If Available Storage Drops To parameter is set to 20%, and the Scale Up By parameter is set to 40 GB. If the available storage usage of the DN 1_1 and DN 3_3 components drops to or below 20%, a scale-up action is automatically triggered for the two shards where DN 1_1 and DN 3_3 are located. A 40 GB storage increment is added to both shards. After the scale-up, their storage space is both 80 GB, and the total storage space of the instance is 200 GB.

    Figure 4 Scaling up storage space