Skip to Main Content
  • Questions
  • How to limit the resources at pluggable level in database 12cR2

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Huang.

Asked: November 16, 2018 - 1:15 am UTC

Last updated: November 29, 2018 - 12:27 am UTC

Version: 12.2.0.1

Viewed 1000+ times

You Asked

Some bad performance pdbs may result in disaster for the whole db machine, in order to avoid this situation we need to limit the pdb resource usage!
There's tens of pdbs in our 12cR2, each one requires DIFFERENT resources, we have to limit them with DIFFERENT configurations.
1) As we known, we could assign the SGA_TARGET, but how could we change the sga_max_size for SOME SPECIFIC pdb?
We've fired the 'ALTER SYSTEM SET SGA_MAX_SIZE=... SCOPE=SPFILE' clause, but met the ORA-65040 error.

SQL> alter session set container=n2dev;
SQL> ALTER SYSTEM SET SGA_MAX_SIZE=2G container=CURRENT scope=spfile;
 ALTER SYSTEM SET SGA_MAX_SIZE=2G container=current scope=spfile
*
ERROR at line 1:
ORA-65040: operation not allowed from within a pluggable database



2) Also we wanna assign the CPU upper limit for some pdbs, will the CPU_COUNT parameter work or shall we consider CDB Resource Manager Plans? CPU_COUNT seems to be much convenient.

3) by the way, we've both set the max_iops and max_mbps to limit the IO of PDB, would these 2 params takes effect on UNDO tbs?

Thanks!

and Connor said...

In a container, SGA_TARGET will be in effect synonymous with SGA_MAX_SIZE, in that, it restricts the pluggable database to consume that amount of memory.

Similarly, cpu_count at the pluggable level works in a similar way to instance caging at the database level, we will use resource manager to throttle the instance (in this case, the pluggable) to use that much worth of CPU, eg

SQL> conn / as sysdba
Connected.
SQL> show parameter cpu_count

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------
cpu_count                            integer     16
SQL>
SQL>
SQL> alter session set container = pdb122a;

Session altered.

SQL> alter system set cpu_count = 4;

System altered.


Check this whitepaper for details

https://www.oracle.com/technetwork/database/multitenant/overview/multitenant-wp-12c-2078248.pdf


Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Thanks

Huang Joe, November 28, 2018 - 3:25 am UTC

Thanks Connor, That is really what we are looking for. I should have read the New Features twice.
Connor McDonald
November 29, 2018 - 12:27 am UTC

glad we could help

More to Explore

Multitenant

Need more information on Multitenant? Check out the Multitenant docs for the Oracle Database