Thursday, October 26, 2023

Dynamic CPU Scaling in Oracle

 Dynamic CPU Scaling

New parameter CPU_MIN_COUNT in Oracle Database 19c


Starting with Oracle Database 19.4 a new feature called “Dynamic CPU Scaling” got introduced. 

The basic idea is, that with the new Multitenant architecture all pluggable databases (PDBs) share the CPUs defined by CPU_COUNT in the container database (CDB). 

By default each and every PDB has the same value for CPU_COUNT in the CDB. Basically this is an over-allocation of CPU resources. 


That’s why Oracle introduced a new parameter called CPU_MIN_COUNT that shall be available to a specific PDB in any case to preserve a minimum of CPU capacity. 


At the end this means for me, that the CPU scaling occurs only if the sum of all CPU_MIN_COUNTs over all PDBs is lower than the actual CPU_COUNT defined in the CDB. 

Or at least, it seems to work as I would have expected in that case. But nevertheless it is a handy feature to limit CPU resources and noisy neighbor issues in a multitenant environment.


CPU_MIN_COUNT specifies the minimum number of CPUs required by a pluggable database (PDB) at any given time. 


This parameter specifies the minimum number of CPUs required by a PDB at any given time. For multi-threaded CPUs, this number corresponds to CPU threads, not CPU cores. 


You can set this parameter at the CDB level, and for each individual PDB. This enables you to control each PDBs minimum share of CPU utilization within a CDB. 


If the sum of the CPU_MIN_COUNT values across all open PDBs in a CDB is equal to the value of CPU_MIN_COUNT for the CDB, then the CDB instance is considered full. 


If the sum exceeds the value of CPU_MIN_COUNT for the CDB, then the CDB instance is over-provisioned. 

Oracle does not prevent you from over-provisioning a CDB. 


Resource Manager is enabled at the CDB level by setting the RESOURCE_MANAGER_PLAN at the root level to the name of a CDB resource plan. If the CDB resource plan has no configured CPU directives, that is, the SHARES and UTILIZATION_LIMIT directives are unset, then Resource Manager uses the CPU_COUNT and CPU_MIN_COUNT settings for the PDB to manage CPU utilization.

So review all existing resource plan on cdb before test this parameter.


Regards,

Alireza Kamrani

Senior RDBMS Consultant

Fleet Patching & Provisioning (FPP) Concepts and cloning methods for Oracle/Grid Home

  Fleet Patching & Provisioning (FPP) Concepts and cloning methods for Oracle/Grid Home:                           ♠️Alireza Kamrani♠️  ...