Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
Configure Dynamic Scaling in Oracle Exadata Cloud Infrastructure
Introduction
When running database workloads in the cloud, optimizing the cost of infrastructure and providing adequate compute resources to fulfil the business needs is important. You need compute resources to easily scale up or down to match the demands on the workload.
Oracle Database Exadata Cloud Service is a managed database service optimized for performance, availability, security, and cost effectiveness. With Exadata Cloud service, billing is based upon the number of CPU cores allocated to virtual machines (VMs). You can configure dynamic scaling to meet CPU requirements when workloads are high and optimize costs by lowering the number of CPU cores when the workload demand is reduced.
Objectives
- Configure dynamic scaling in Oracle Exadata Cloud Infrastructure.
Prerequisites
-
Install and configure Oracle Cloud Infrastructure Command Line Interface (OCI CLI).
-
Provision and deploy Oracle Database in Oracle Exadata Cloud Infrastructure. For more information, see Creating an Exadata Cloud Infrastructure Instance.
Task 1: Install the Dynamic Scaling Tool
Dynamic scaling is installed using RPM with the following command. After installation, we start the service.
rpm -i Dynamicscaling-2.0.1-X.el7.x86_64.rpm
Task 2: Configure Dynamic Scaling Parameters
Dynamic scaling has some default parameters that you can override using specific parameters.
Task 3: Execute Dynamic Scaling
You can perform dynamic scaling using the OCI CLI as shown in the following screenshot. Run it from all the nodes of the Exadata VM cluster. It considers the parameter values and starts the dynamic scaling process with the OS process ID (PID). This process continuously monitors the load on the VM cluster nodes.
Scaling information is written to a scalingtime.json
file. A node-specific file is automatically created when the dynamic scaling parameter cluster-aware is enabled. The dynamic scaling process considers the max CPU load value from node-specific JSON files and performs the scaling operation. Each time a scaling operation is performed, it updates the status in the scalingtime.json
file. After a scale-up operation is performed, the next scale-down operation must wait for the time defined by the parameter “scale-downwait time”.
Task 4: Monitor Dynamic Scaling Operation
The dynamicscaling.bin
process running on the compute node monitors the load from the JSON file and performs a scale-down operation if the current CPU load is below the minimum threshold. If the current CPU load is above the maximum threshold, a scale-up operation runs.
The status is reflected in the OCI Console, and the VM cluster is updated. The status is indicated as updating during a scale operation. Scale-down runs according to the scale factor parameter. In the previous screenshot, the process is scaling down by two OCPUs because the scale factor is defined as 2.
After the scale-down operation is complete, the updated CPU count is displayed in the OCI Console. This operation is logged in the scaling-time.json
file.
Related Links
Acknowledgments
- Author - Sanjay Rahane (Senior Cloud Engineer)
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.
Configure Dynamic Scaling in Oracle Exadata Cloud Infrastructure
F90943-02
July 2024