资源规划
I/O资源隔离
set linesize 400
col PDB_NAME for a10
col BEGIN_TIME for a30
col END_TIME for a30
SELECT R.SNAP_ID,
R.CON_ID,
P.PDB_NAME,
TO_CHAR(R.BEGIN_TIME, YYYY-MM-DHH24:MI) AS BEGIN_TIME,
TO_CHAR(END_TIME, YYYY-MM-D HH24:MI) AS END_TIME,
R.IOPS,
R.IOMBPS,
R.IOPS_THROTTLE_EXEMPT,
R.IOMBPS_THROTTLE_EXEMPT,
R.AVG_IO_THROTTLE
FROM DBA_HIST_RSRC_PDB_METRIC R, CDB_PDBS P
WHERE R.CON_ID = P.CON_ID
ORDER BY R.BEGIN_TIME;
SQL> alter session set container=masterpdb;
Session altered.
SQL> alter system set max_iops=27 scope=both;
System altered.
SQL> alter system set max_mbps=1 scope=both;
System altered.
SQL> alter session set container=masterpdb2;
Session altered.
SQL> alter system set max_iops=25 scope=both;
System altered.
SQL> alter system set max_mbps=1 scope=both;
System altered.
内存隔离
如果需对每个PDB进行内存控制,需要满足:
CDB$ROOT中初始化参数NONCDB_COMPATIBLE保持为默认的FALSE。
CDB$ROOT中初始化参数MEMORY_TARGET设置为0。
CDB$ROOT中的SGA_TARGET不为0。
PDB中的pga_aggregate_target必须小于CDB$ROOT中的pga_aggregate_target。
SQL> alter session set container=masterpdb;
Session altered.
SQL> alter system set sga_target=200M scope=both;
System altered.
SQL> alter system set sga_min_size=100M scope=both;
System altered.
SQL> alter system set pga_aggregate_limit=256M;
System altered.
SQL> alter system set pga_aggregate_target=10M scope=both;
System altered.
SQL> alter session set container=masterpdb2;
Session altered.
SQL> alter system set sga_target=230M scope=both;
System altered.
SQL> alter system set sga_min_size=50M scope=both;
System altered.
SQL> alter system set pga_aggregate_limit=256M;
System altered.
SQL> alter system set pga_aggregate_target=10M scope=both;
System altered.
CPU隔离
SQL> exec DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
PL/SQL procedure successfully completed.
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_CDB_PLAN(plan => CDB_PLAN_TEST,
comment => CDB PLAN);
END;
/
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_CDB_PROFILE_DIRECTIVE(plan => CDB_PLAN_TEST,
profile => PDB_1_PROFILE,
shares => 3,
utilization_limit => 40,
parallel_server_limit => 40);
END;
/
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_CDB_PROFILE_DIRECTIVE(plan => CDB_PLAN_TEST,
profile => PDB_2_PROFILE,
shares => 1,
utilization_limit => 20,
parallel_server_limit => 20);
END;
/
SQL> exec DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
PL/SQL procedure successfully completed.
SQL> exec DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
PL/SQL procedure successfully completed.
ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = CDB_PLAN_TEST scope=both;
SQL> alter session set container=masterpdb;
Session altered.
SQL> alter system set db_performance_profile=PDB_1_PROFILE scope=spfile;
System altered.
SQL> alter session set container=masterpdb2;
Session altered.
SQL> alter system set db_performance_profile=PDB_2_PROFILE scope=spfile;
System altered.
SQL> alter pluggable database all close immediate;
Pluggable database altered.
SQL> alter pluggable database all open;
Pluggable database altered.
select inst_id, name, con_id, value, ispdb_modifiable
from gv$system_parameter2
where name = db_performance_profile
order by 1, 2, 3, 4;
SQL> alter session set container=CDB$ROOT;
Session altered.
select p.name, shares, utilization_limit, parallel_server_limit, profile
from v$rsrc_plan r, v$pdbs p
where r.con_id = p.con_id;
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/129418.html
集成安装之Oracle12C补丁升级数据字典更新报错处理 img{ display:block; margin:0 auto !important; width:100%; } body{ width:75%; ...
阅读 1249·2023-01-11 13:20
阅读 1557·2023-01-11 13:20
阅读 1011·2023-01-11 13:20
阅读 1680·2023-01-11 13:20
阅读 3971·2023-01-11 13:20
阅读 2517·2023-01-11 13:20
阅读 1310·2023-01-11 13:20
阅读 3481·2023-01-11 13:20