Note:

Scale CPU Resources on Oracle Exadata Database Service on Cloud@Customer

Introduction

To optimize consumption on Oracle Exadata Database Service on Cloud@Customer you want to scale your CPU resources to match the actual performance requirements at any given time of your Oracle Database workloads. Oracle Exadata Database Service on Cloud@Customer provides you several tools for scaling, which you can choose from based on your specific requirements.

Objectives

Prerequisites

Method 1: Scale CPU Resources Manually from the OCI Console

The most straightforward way to scale the CPU resources allocated to a VM cluster is to do it on the OCI Console. This is sufficient for one-time operations, which are not reoccurring on a frequent basis and where automation is not required.

  1. Log in to the OCI Console and open the navigation menu.

    Image showing the Navigation Menu

  2. Under Oracle Database, click Oracle Exadata Database Service on Cloud@Customer.

    Image showing the Oracle Database Menu

  3. Select Region and Compartment that contains the VM cluster for which you want to scale the CPU resources.

  4. Click Exadata VM Clusters.

    Image showing the Exadata VM Clusters selection

  5. Click the name of the VM cluster for which you want to scale the CPU resources.

  6. Click Scale VM Resources.

    Image showing VM Cluster Information

  7. In Scale VM Cluster, specify the OCPU (ECPU for X11M) count value per VM and click Save Changes.

    Image showing Scaling VM Cluster

    You can see the total number of OCPUs/ECPUs allocated to the VM cluster on the right-hand side. The minimum increment for OCPU is one and for ECPU is four.

Note: When you set the number of OCPUs (ECPUs for X11M) to zero, will shut down the VM cluster and eliminate any billing for that VM cluster, but the hypervisor will still reserve the minimum 2 OCPUs (8 ECPUs for X11M) for each VM. These reserved OCPUs (ECPUs for X11M) cannot be allocated to any other VMs, even though the VM to which they are allocated is shut down. The Control Plane does not account for reserved OCPUs (ECPUs for X11M) when showing maximum available OCPU (ECPU for X11M), so you should account for these reserved OCPUs (ECPUs for X11M) when performing any subsequent scaling operations to ensure the operation can acquire enough OCPUs (ECPUs for X11M) to successfully complete the operation.

Method 2: Scale CPU Resources with OCI CLI

The OCI CLI is a small-footprint tool that you can use on its own or with the console to complete OCI tasks. The OCI CLI provides the same core functionality as the console, plus additional commands. Some of these, such as the ability to run scripts, extend the console functionality.

The OCI CLI is built on the OCI SDK for Python and runs on Mac, Windows, or Linux. The Python code makes calls to OCI APIs to provide the functionality implemented for the various services including Oracle Exadata Database Service on Cloud@Customer. These calls are REST APIs that use HTTPS requests and responses.

  1. Download OCI CLI for your operating system from here: OCI CLI GitHub repository.

  2. Follow the installation instructions for your operating system mentioned here: Installing the CLI.

  3. Run the following command to verify your installation.

    $ oci --version
    
  4. Set up a configuration using the setup dialog that contains the required credentials for working with OCI.

    $ oci setup config
    
  5. Verify your configuration file. For example:

    [DEFAULT]
    user=ocid1.user.oc1..<unique_ID>
    fingerprint=<your_fingerprint>
    key_file=~/.oci/oci_api_key.pem
    tenancy=ocid1.tenancy.oc1..<unique_ID>
    # Some comment
    region=us-ashburn-1
    
  6. You can check your connectivity by running the following command, which will show the namespace of your tenancy.

    $ oci os ns get
    
  7. Run the following command to list your available compartments.

    $ oci iam compartment list
    
  8. Run the following command to list your available VM clusters in a compartment.

    $ oci db vm-cluster list –-compartment-id <Compartment OCID>
    
  9. Scale the CPU resources under the VM cluster.

    $ oci db vm-cluster update –-vm-cluster-id <VM Cluster OCID> –-cpu-core-count <number of OCPUs>
    
  10. Run the following command to check the successful scaling of the VM cluster.

    $ oci db vm-cluster get --vm-cluster-id <VM Cluster OCID>
    

Note:

Method 3: Scale CPU Resources with the dbaascli Command in Disconnected Mode

You can use the dbaascli utility to perform various database lifecycle and administration operations on Oracle Exadata Database Service on Cloud@Customer including scaling the CPU resources under your VM cluster when your Oracle Exadata Database Service on Cloud@Customer is in disconnected mode.

To use the utility, you must be connected to an Oracle Exadata Database Service on Cloud@Customer virtual machine, and you need root access to be able to run all the dbaascli administration commands.

Note: The command is designed not to work in connected mode and will time out after 600 seconds (10 minutes). It should only be used in disconnected mode.

  1. Run the following command to scale your CPU core count.

    #dbaascli cpuscale update --coreCount <coreCount> --message <message>
         Where:
         --coreCount specifies the number of CPUs that you want to scale up or down per VM in a cluster
         --message is optional, you can include a message for your reference
    
  2. Run the following command to check the result of the operation, which will show the current or last scaling operation initiated by the dbaascli utility

    #dbaascli cpuscale get_status
    

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.