![]() | Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition | ||
|
|
![]() |
||||||||||||||||||||||||||||
Solution Type Technical Instruction Sure Solution 1474290.1 : ODA (Oracle Database Appliance): Howto Configuring and Monitoring Instance Caging
In this Document
Applies to:Oracle Database Appliance Software - Version 2.1.0.1 and laterOracle Database Appliance - Version All Versions and later Information in this document applies to any platform. GoalThis article provides a step-by-step guide for configuring Instance Caging on ODA. Note:
Oracle strongly recommends that you use the Oracle Database Appliance templates, because they implement best practices and are configured specifically for Oracle Database Appliance. You can use either Oracle Appliance Manager or Database Configuration Assistant (DBCA) to create databases on Oracle Database Appliance. The templates are available with both utilities. SolutionDetermine Number of CPUs
The first step is to determine the number of CPUs on your ODA, using the following query. In this context, we need the number of CPU threads (not the number of cores). select value from v$osstat where stat_name = 'NUM_CPUS';
i.e.: in this case the active cores are 12 for node, with the Hyper-Threading we have the NUM_CPUS=24
# oakcli show core_config_key Optional core_config_key is not applied on this machine yet ! SQL> select value from v$osstat where stat_name = 'NUM_CPUS'; VALUE ---------- 24
Determine "cpu_count" for All Instances
For example, suppose the total number of CPUs (i.e. CPU threads) is 16. Using the partition approach, we could set cpu_count=8 for database A, cpu_count=4 for database B, and cpu_count=4 for database C. The sum of the cpu_counts is 16, which equals the number of CPUs. For example, for an ODA with 16 CPU threads, you could use the over-subscribe approach and set cpu_count=8 for database A, cpu_count=8 for database B, and cpu_count=8 for database C. The sum of the cpu_counts is 24, which is greater than the number of CPUs. Therefore, if all databases are using their full CPU allocation, there will be some CPU contention.
Enabling Instance Caging for Oracle Database ApplianceBy default, instance caging is not enabled on Oracle Database Appliance. To enable instance caging, enable Oracle Database Resource Manager by setting the RESOURCE_MANAGER_PLAN initialization parameter for each database on ODA, so that you allocate core resources among databases. The Resource Manager parameter specifies the top plan, identifying the plan to be used for the current instance. If no plan is specified with this parameter, then the Resource Manager is not enabled. See Also:
Oracle Database Administrator's Guide for more information about enabling and configuring instance caging
To enable Instance Caging, set the cpu_count of each instance (or check the value of it, if you are using the ODA template) and then enable CPU Resource Manager. show parameter cpu_count
alter system set cpu_count = 4;
alter system set resource_manager_plan = 'default_plan';
Monitor Instance Caging
To verify that Instance Caging is enabled, check that "instance_caging" equals "ON" and that "cpu_count" is set appropriately. If no rows are returned, Resource Manager is off or Resource Manager is on but not managing CPU. If a row is returned, it indicates the plan being used. select name from v$rsrc_plan where is_top_plan = 'TRUE' and cpu_managed = 'ON';
show parameter cpu_count; i.e.:
SQL> select name from v$rsrc_plan where is_top_plan = 'TRUE' and cpu_managed = 'ON'; NAME SQL> show parameter cpu_count; NAME TYPE VALUE select to_char(begin_time, 'HH24:MI') time, sum(avg_running_sessions) avg_running_sessions, sum(avg_waiting_sessions) avg_waiting_sessions from v$rsrcmgrmetric_history group by begin_time order by begin_time;
Tuning Instance CagingYou can dynamically tune Instance Caging by adjusting the value of cpu_count. Changes will take effect within seconds. We do not recommend that you change cpu_count too frequently, since changing its value has some overhead.
We also don't recommend that you set it to 1 or change the value from a very small number to an extremely large value. References<NOTE:1362445.1> - Configuring and Monitoring Instance CagingAttachments This solution has no attachment |
||||||||||||||||||||||||||||
|