Database Reference
In-Depth Information
Shares are counters—the more you allocate the resources your PDB gets. Utilization limits are percentages and
define how many CPU-percent your application is allowed to consume. Utilization limits are not cumulative for the
CDB; each PDB can use up to 100%. Shares and utilization limits currently extend to CPU and parallel query.
To demonstrate the new resource manager features, three very small PDBs will be created for a quick Swingbench
run, as shown here:
SYS@CDB$ROOT> create pluggable database swingbench1
2 admin user pdbadmin identified by secret
3 roles=(dba)
4 default tablespace soe datafile size 100m
5 autoextend on next 100m maxsize 10g;
Pluggable Database created.
SYS@CDB$ROOT> alter pluggable database swingbench1 open;
Pluggable Database altered.
In the next step the Order Entry schema creation wizard is used to populate the SOE schema in the newly created
pluggable database. Once the test data has been created, the PDB is cloned to swingbench2 and swingbench3, using
the same technique as demonstrated earlier in this chapter.
SQL> create pluggable database swingbench2
2 from swingbench1;
3 /
Pluggable database created.
â–  In the absence of specific directives, the following defaults will be applied: each pDb will get exactly one share,
and can use 100 percent of Cpu and parallel query. that is, unless you decide to change the defaults using the
update_cdb_default_directive() procedure in the dbms_resource_manager package.
Note
Creating the CDB plan
With three PDBs in place serving the same purpose the administrator needs to make a choice which one he or she
wants to prefer. Let's assume for this scenario that database swingbench1 is twice as important as swingbench2 and
swingbench3. The shares will be distributed according to the PDB importance, and parallel query will be forbidden
(swingbench is a OLTP-style workload). There is no limit for individual PDB's CPU utilization. To implement this
resource plan, the following code has been executed in the root:
begin
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA;
DBMS_RESOURCE_MANAGER.CREATE_CDB_PLAN(
plan => 'SWINGBENCH_PLAN');
-- set the shares for PDB swingbench1. Prevent
-- parallel query
 
 
Search WWH ::




Custom Search