5.2.5 Managing Flash Cache Quotas for Databases and PDBs
IORM enables you to control how you want the flash 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
flash cache. If an interdatabase plan is specified, then the quotas for the PDBs are computed as a percentage of the
flashcachemin
and flashcachesize
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
flash cache is 50 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-4 Case 1: PDB Flash Cache Limits with No Interdatabase Plan
PDB | Flash Cache Min | FC Soft Limit | Normalized Soft Limit | FC Hard Limit |
---|---|---|---|---|
SALESPDB |
20% = 10 GB |
100 (default) |
100 / 175 * 50 GB = 28.57 GB |
n/a |
SERVICESPDB |
20% = 10 GB |
50 |
50 / 175 * 50 GB = 14.28 GB |
n/a |
HRPDB |
0 |
25 |
25 / 175 * 50 GB = 7.14 GB |
n/a |
The next example shows an interdatabase plan with flash cache quotas that includes
the NEWCDB
CDB.
ALTER IORMPLAN dbplan= -
((name=newcdb, share=8, flashCacheSize=20G), -
(name=finance, share=8, flashCacheLimit=10G, flashCacheMin=2G), -
(name=dev, share=2, 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. Flash
cache quotas are only enforced if the directives specify the
flashcachesize
, flashcachelimit
, or
flashcachemin
attributes. The database test
does not
specify any flash cache directive; so that database and its PDBs
(if any exist) are not managed for any flash 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
flashcachemin
and flashcachesize
settings for a
database, then the PDB-specific memory_min
quotas in the CDB plan represent
fractions of the flashcachemin
setting, and the PDB-specific
memory_limit
values represent fractions of the
flashcachesize
.
However, if the interdatabase IORM plan directive specifies
flashcachesize
without flashcachemin
, then the
PDB-specific memory_min
settings are ignored while the
memory_limit
settings continue to represent fractions of the
flashcachesize
.
So, because the example interdatabase IORM plan directive for newcdb
specifies flashcachesize
without flashcachemin
, the
PDB-specific memory_min
quotas in the CDB plan are ignored. The following
table lists the effective flash cache limits when applying the example CDB plan together
with the example interdatabase IORM plan.
Table 5-5 Case 2: PDB Flash Cache Limits with an InterDatabase Plan
PDB | Flash Cache Min | FC Hard Limit | Normalized Hard Limit | FC Soft Limit |
---|---|---|---|---|
SALESPDB |
0 |
100 (default) |
100 / 175 * 20 GB = 11.43 GB |
n/a |
SERVICESPDB |
0 |
50 |
50 / 175 * 20 GB = 5.71 GB |
n/a |
HRPDB |
0 |
25 |
25 / 175 * 20 GB = 2.86 GB |
n/a |
For non-CDB databases, the
flashcachesize
, flashcachemin
, and
flashcachelimit
values are specified in absolute terms and no additional
normalization is required. Because flashcachemin
is a guaranteed
reservation, the sum of flashcachemin
across all the directives should be
less than the total size of the flash cache.
Parent topic: Administering IORM