Oracle 12.2 PDB的内存资源管理

原文链接:https://oracle-base.com/articles/12c/multitenant-memory-resource-management-for-pdbs-12cr2

12.2之前的版本,我们根本没有办法控制一个单独的PDB能使用的内存总量。导致的结果就是“一个糟糕的邻居”可能占用大量内存从而导致同一个实例下其他PDB的性能下降。在Oracle 12.2中,你可以控制某单个PDB能使用的内存总量。

如果你的CDB中只有一个PDB,那么你就不需要做这些限制,因为你本来就想让这个单独的PDB用掉实例的所有内存。

PDB内存参数

下列参数都可以在PDB级别进行设置:

* DB_CACHE_SIZE : The minimum buffer cache size for the PDB.

* SHARED_POOL_SIZE : The minimum shared pool size for the PDB.

* PGA_AGGREGATE_LIMIT : The maximum PGA size for the PDB.

* PGA_AGGREGATE_TARGET : The target PGA size for the PDB.

* SGA_MIN_SIZE : The minimum SGA size for the PDB.

* SGA_TARGET : The maximum SGA size for the PDB.

关于哪些值可以设置也有一些限制,官方文档中给出了详细的解释(http://docs.oracle.com/database/122/ADMIN/using-oracle-resource-manager-for-pdbs-with-sql-plus.htm#ADMIN-GUID-A3459A8B-A36A-44D4-9FCD-75CA0E3D3252
 

设置PDB内存参数

Example  Setting the Maximum Aggregate PGA Memory Available for a PDB

With the PDB as the current container, run the following SQL statement to set he PGA_AGGREGATE_LIMIT initialization parameter both in memory and in the spfile to 90 megabytes:

ALTER SYSTEM SET PGA_AGGREGATE_LIMIT = 90M SCOPE = BOTH;

Example  Setting the Minimum SGA Size for a PDB

With the PDB as the current container, run the following SQL statement to set the SGA_MIN_SIZE initialization parameter both in memory and in the spfile to 500 megabytes:

ALTER SYSTEM SET SGA_MIN_SIZE = 500M SCOPE = BOTH;

监控PDB的内存使用

官方文档给出解释:(https://docs.oracle.com/en/database/oracle/oracle-database/12.2/admin/using-oracle-resource-manager-for-pdbs-with-sql-plus.html#GUID-BFBB962E-D5CF-4CD7-B5A5-D6CA74DAA88B

COLUMN PDB_NAME FORMAT A10

SELECT r.CON_ID, p.PDB_NAME, r.SGA_BYTES, r.PGA_BYTES, r.BUFFER_CACHE_BYTES, r.SHARED_POOL_BYTES
FROM V$RSRCPDBMETRIC r, CDB_PDBS p
WHERE r.CON_ID = p.CON_ID;

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值