Use Auto Scaling

When you create an Autonomous Database instance, by default OCPU auto scaling is enabled and storage auto scaling is disabled. You can manage auto scaling from the Oracle Cloud Infrastructure Console to enable or disable OCPU auto scaling or storage auto scaling.

OCPU Auto Scaling

With OCPU auto scaling enabled the database can use up to three times more CPU and IO resources than specified by the number of OCPUs as shown in the OCPU count on the Oracle Cloud Infrastructure Console.

When OCPU auto scaling is enabled, if your workload requires additional CPU and IO resources, the database automatically uses the resources without any manual intervention required. For example, when the OCPU count is 128, this allows the database to use up to 128 x 3 OCPUs (384 OCPUs) when auto scaling enabled.

To see the average number of OCPUs used during an hour you can use the "Number of OCPUs allocated" graph on the Overview tab in Database Actions (on the Database Monitor card). See Database Monitor Overview for more information.

Enabling OCPU auto scaling does not change the concurrency and parallelism settings for the predefined services. See Manage Concurrency and Priorities on Autonomous Database for more information.

Note:

If your license type is Bring Your Own License (BYOL) with Oracle Database Standard Edition (SE), auto scaling allows the system to automatically use up to three times more CPU and IO resources, capped at a maximum of 8 OCPUs.

See Add CPU or Storage Resources or Enable Auto Scaling for the steps to enable OCPU auto scaling.

Storage Auto Scaling

When you create an Autonomous Database instance, by default Storage auto scaling is disabled. You can manage scaling and enable storage auto scaling from the Oracle Cloud Infrastructure Console.

With Storage auto scaling enabled the Autonomous Database can expand to use up to three times the reserved base storage, as specified by the storage shown in the Storage field on the Oracle Cloud Infrastructure Console. If you need additional storage, the database automatically uses the reserved storage without any manual intervention required.

For example, if your reserved base storage is 128 TB, you have access to 384 TB of storage.

As data flows in, you are billed based on your base storage. For example, if your reserved base storage is 4 TB, after you exceed 4 TB, storage is billed based on the average allocated storage rounded up to the nearest TB per hour (billed by the minute). Thus, for this example with 4 TB of base storage, using storage auto scaling you are charged for 4 TB until you cross 4 TB of allocated storage. As the allocated storage grows over 4 TB, for example up to 4.9 TB, you are charged for 5 TB (based on the average allocated storage billed by the minute).

If you delete 1 TB of data, your allocated storage remains at 4.9 TB and you are billed for 5 TB until you perform a shrink operation. When you perform a shrink operation, Autonomous Database reduces the data and undo tablespace size, in this case back to 3.9 TB. After the shrink operation completes, billed is again based on your reserved base storage of 4 TB. See Shrink Storage for more information.

Note:

Reducing temp tablespace requires a database restart.

If you disable Storage auto scaling and the used storage is greater than the reserved base storage, as specified by the storage shown in the Storage field on the Oracle Cloud Infrastructure Console, Autonomous Database shows a warning on the disable storage auto scaling confirmation dialog. The warning lets you know that the reserved base storage value will be increased to the nearest TB greater than the actual storage usage, and shows the new reserved base storage value.

To see the Autonomous Database instance storage usage, you can view the "Storage allocated" and "Storage used" graphs on the Overview tab by clicking the Database Monitor card in Database Actions. See Database Monitor Overview for more information.

See Add CPU or Storage Resources or Enable Auto Scaling for the steps to enable storage auto scaling.

Shrink Storage

When the storage used in the database is significantly lower than the allocated storage, the shrink operation reduces the allocated storage.

To understand storage allocation and the shrink operation, note the following:

  • Reserved base storage: is the base amount of storage you select for the database when you provision or scale the database, excluding any auto-scaled value. The reserved base storage is shown in the Storage field on the Oracle Cloud Infrastructure Console.

  • Allocated storage: is the amount of storage physically reserved for all database tablespaces (excluding sample schema tablespaces). This number also includes the free space in these tablespaces.

  • Used storage: is the amount of storage actually used in all tablespaces (excluding the sample schema tablespaces). The used storage excludes the free space in these tablespaces. Used storage is the storage actually used by database objects, tables, indexes, and so on, including internally used temp space.

  • Maximum storage: is the maximum storage reserved. When storage auto scaling is disabled, the maximum storage equals the reserved base storage. When storage auto scaling is enabled, the maximum storage is three times the base storage (maximum = reserved base x 3).

Note:

The Shrink operation is not available with Always Free Autonomous Database.

To shrink storage:

  1. On the Details page, click Manage Scaling.
  2. In the Manage scaling area, select Shrink.
  3. Click Confirm in the Shrink Database dialog.

Note:

The Shrink operation is a long running operation.

The Shrink operation requires that all of the following apply:

  • Storage auto scaling must be enabled.

  • The allocated storage must be greater than the reserved base storage.

  • The allocated storage, rounded up to the nearest 1TB, can be reduced by 1TB or more.

  • The following must be true:

    Allocated storage - Used storage > 100 GB

When you click Shrink and these conditions are not met, Autonomous Database shows the Action unavailable dialog.

Note the following restrictions for the Shrink operation:

  • The shrink operation is not allowed if the Autonomous Database instance contains either of the following:

    • Advanced Queuing tables

    • Tables with LONG columns

  • If you have columns with the ROWID data type, the ROWIDs that these column values point to may change during the shrink operation.

  • Tables that contain the following may be moved offline during the shrink operation. DML operations on these tables may be blocked for the duration of the move and the table indexes for these tables may become unusable until the shrink operation completes:

    • Tables with bitmap join indexes

    • Nested tables

    • Object tables

    • Partitioned tables with domain indexes