5.2.7 Managing PMEM Cache Quotas for Databases and PDBs
Note:
This topic applies only to Oracle Exadata System Software releases before 23.1.0. Otherwise, see Managing XRMEM Cache Quotas for Databases and PDBs.
I/O Resource Management (IORM) enables you to control how you want the PMEM cache to be shared among different databases and pluggable databases (PDBs).
This can be done using just the CDB resource plan or in conjunction with the I/O Resource Management (IORM) interdatabase plan.
Consider an example intradatabase resource plan for the NEWCDB
CDB. The plan specifies memory_min
and
memory_limit
for the 3 PDBs mentioned in the
plan.
Note the following:
- The
memory_min
andmemory_limit
values are specified in percentages and range from 0 and 100. Because over-provisioning is supported, the sum of the percentages is not restricted to 100%. If the sum of these values is greater than 100%, then the values are normalized down to a percentage. - If
memory_min
is not specified, then it defaults to 0. - If
memory_limit
is not specified, then it defaults to 100. - For
CDB$ROOT
, there is a 5%memory_limit
value.
The following code shows how to create the example intradatabase plan. The sum
of the memory_min
values is 40%, and the sum of the
memory_limit
values is 175%, which must be normalized. If an
interdatabase plan is not specified, then these percentages apply to the entire size of the
PMEM cache. If an interdatabase plan is specified, then the quotas for the PDBs are computed as a percentage of the
pmemcachemin
and pmemcachesize
values for the database
as specified in the interdatabase plan directive.
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
DBMS_RESOURCE_MANAGER.CREATE_CDB_PLAN(
plan => 'NEWCDB_PLAN',
comment => 'CDB resource plan for newcdb');
DBMS_RESOURCE_MANAGER.CREATE_CDB_PLAN_DIRECTIVE(
plan => 'NEWCDB_PLAN',
pluggable_database => 'SALESPDB',
memory_min => 20);
DBMS_RESOURCE_MANAGER.CREATE_CDB_PLAN_DIRECTIVE(
plan => 'NEWCDB_PLAN',
pluggable_database => 'SERVICESPDB',
memory_min => 20,
memory_limit => 50);
DBMS_RESOURCE_MANAGER.CREATE_CDB_PLAN_DIRECTIVE(
plan => 'NEWCDB_PLAN',
pluggable_database => 'HRPDB',
memory_limit => 25);
DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
END;
/
In the example above, if no interdatabase plan is specified and the size of
the PMEM cache is 10 GB, then the following table shows the breakdown of the quotas after
normalization of the limit (because the sum of the memory_limit
values is
greater than 100%). After normalization, if a minimum value is greater than the
corresponding limit, then the minimum value is reduced to make it equal to the limit.
Table 5-8 Case 1: PDB PMEM Cache Limits with No Interdatabase Plan
PDB | PMEM Cache Min | PMEM Soft Limit | Normalized Soft Limit | PMEM Hard Limit |
---|---|---|---|---|
SALESPDB |
20% = 2 GB |
100 (default) |
100 / 175 * 10 GB = 5.71 GB |
n/a |
SERVICESPDB |
20% = 2 GB |
50 |
50 / 175 * 10 GB = 2.85 GB |
n/a |
HRPDB |
0 |
25 |
25 / 175 * 10 GB = 1.42 GB |
n/a |
The next example shows an interdatabase plan with PMEM cache quotas that
includes the NEWCDB
CDB.
ALTER IORMPLAN dbplan= -
((name=newcdb, share=8, pmemCacheSize= 2G, flashCacheSize=10G), -
(name=finance, share=8, pmemCacheMin= 1G, pmemCacheLimit= 2G, flashCacheLimit=10G, flashCacheMin=2G), -
(name=dev, share=2, pmemCacheMin= 100M, pmemCacheLimit= 1G, flashCacheLimit=4G, flashCacheMin=1G), -
(name=test, share=1))
In addition to the NEWCDB
CDB, three other databases (finance
,
dev
, and test
) share the same storage servers. PMEM
cache quotas are only enforced if the directives specify the pmemcachesize
,
pmemcachelimit
, or pmemcachemin
attributes. The database
test
does not specify any PMEM cache directive; so that database and its
PDBs (if any exist) are not managed for any PMEM cache quotas.
Cache limits in an interdatabase IORM plan directive constrain the settings in
any corresponding CDB plan. Consequently, if an interdatabase IORM plan directive specifies
pmemcachemin
and pmemcachesize
settings for a database,
then the PDB-specific memory_min
quotas in the CDB plan represent fractions
of the pmemcachemin
setting, and the PDB-specific
memory_limit
values represent fractions of the
pmemcachesize
.
However, if the interdatabase IORM plan directive specifies
pmemcachesize
without pmemcachemin
, then the
PDB-specific memory_min
settings are ignored while the
memory_limit
settings continue to represent fractions of the
pmemcachesize
.
So, because the example interdatabase IORM plan directive for newcdb
specifies pmemcachesize
without pmemcachemin
, the
PDB-specific memory_min
quotas in the CDB plan are ignored. The following
table lists the effective PMEM cache limits when applying the example CDB plan together with
the example interdatabase IORM plan.
Table 5-9 Case 2: PDB PMEM Cache Limits with an InterDatabase Plan
PDB | PMEM Cache Min | PMEM Hard Limit | Normalized Hard Limit | PMEM Soft Limit |
---|---|---|---|---|
SALESPDB |
0 |
100 (default) |
100 / 175 * 2 GB = 1.14 GB |
n/a |
SERVICESPDB |
0 |
50 |
50 / 175 * 2 GB = 0.57 GB |
n/a |
HRPDB |
0 |
25 |
25 / 175 * 2 GB = 0.28 GB |
n/a |
For non-CDB databases, the
pmemcachesize
, pmemcachemin
, and
pmemcachelimit
values are specified in absolute terms and no additional
normalization is required. Because pmemcachemin
is a guaranteed
reservation, the sum of pmemcachemin
across all the directives should be
less than the total size of the PMEM cache.
Parent topic: Administering IORM