Enabling Real-Time Analytics With Database In-Memory

How do I limit the amount of memory each PDB can use in the IM column store?

Maria Colgan
Master Product Manager

In case you aren’t familiar with what a PDB is, let me begin by explaining what a Multitenant environment is and how PDBs fit into it.

Oracle Multitenant is a new database consolidation model in Oracle Database 12c in which multiple Pluggable Databases (PDBs) are consolidated within a single Container Database (CDB). While keeping many of the isolation aspects of single databases, Oracle Multitenant allows PDBs to share the system global area (SGA) and background processes of a common CDB.

When used with Oracle Database In-Memory, PDBs also share a single In-Memory column store (IM column store) and hence the question, "How do I control how much memory each PDB can use in the IM column store?"

The total size of the IM column store is controlled by the INMEMORY_SIZE parameter setting in the CDB. By default, each PDB sees the entire IM column store and has the potential to fully populate it and starve it’s fellow PDBs.

In order to avoid starving any of the PDBs, you can specify how much of the shared IM column store a PDB can use by setting the INMEMORY_SIZE parameter inside the specific PDB using the following command:

ALTER SYSTEM SET inmemory_size = 4G container = CURRENT;

Not all PDBs in a given CDB need to use the IM column store. Some PDBs can have the INMEMORY_SIZE parameter set to 0, which means they won't use the In-Memory column store at all. The following shows an example with three PDBs:

It is also not necessary for the sum of the PDB's INMEMORY_SIZE parameters to be less than or equal to the size of the INMEMORY_SIZE parameter of the CDB. It is possible for the PDBs to oversubscribe to the IM column store. Oversubscription is allowed to ensure that valuable space in the IM column store is not wasted should one of the pluggable databases be shutdown or unplugged. Since the INMEMORY_SIZE parameter is static (i.e. requires a database instance restart for changes to be reflected) it is better to allow the PDBs to oversubscribe, so all of the space in the IM column store can be used.

However, when doing this it is possible for one PDB to starve another PDB of space in the IM column store due to this oversubscription. If you don’t expect any PDBs to be shut down for extended periods of time or any of them to be unplugged it is recommended that you don’t oversubscribe.

You might now be wondering about how to control the population order with PDBs.

Each PDB is a full Oracle database in its own right, so each PDB will have its own priority list. When a PDB starts up the objects on its priority list will be populated into the In-Memory column store in order, assuming there is available space.

Join the discussion

Comments ( 2 )
  • claudio roca Thursday, July 18, 2019
    This is exactly was I was looking for!, I'm about to migrate a couple of nonCDB 12.2 databases into one CDB, since my nonCDB databases are configured to use IM column store, I was wondering how would I suppose to deal with it while consolidating several nonCDB into one CDB.
  • Andy Rivenes Monday, July 29, 2019
    Hi Claudio,

    The amount of memory that a PDB can use can be configured with the inmemory_size initialization parameter, but ultimately the amount of memory allocated to the CDB is the upper limit on the amount of memory that all PDBs can use.


    Andy Rivenes
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.