caging in Oracle Database Resource Manager
Oracle notes that their Oracle Instance Caging utility is used in
consolidated shops where many instances share the same server CPU resources.
Due to falling prices on large servers with 32 and 64 CPU's shops all across
America are undertaking. However, there is a fundamental argument
about instance consolidation and the fencing (caging) if CPU resources:
Caging: One instance might have a "rogue" task that
all of the CPU, adversely affecting not only that instance, but other
instances on the server.
Expert Tip: Having used both approaches, I do not
recommend using instance caging because while there is this layer of
protecting against "hogging", this is a small risk, and it is more than
outweighed by the ability to share computing resources between instances,
especially when some instances are idle and others are performing
computationally intensive tasks..
, moving dozens and hundreds of instances into a single server for easier
management and resource sharing.
Similar to "fencing" tools from the 1980's mainframes
the Prism tool), Oracle instance caging runs inside the database resource
manager (DRM) and is related with RAC
One Node to facilitate super fast instance relocation is cases of server
Oracle docs note that instance caging is like CPU fencing, dedicating
processors to specific instances, a way to prevent one instance from
"hogging" the processors:
Instance caging is a method that
uses an initialization parameter to limit the number of CPUs that an
instance can use simultaneously.
In the previous example, if you use
instance caging to limit the number of CPUs to four for each of the four
instances, there is less likelihood that one instance can interfere with the
There are also several new dictionary views relating to
instance caging. The dba_rsrc_plans offers several
out-of-the-box resource plans, the v$rsrc_consumer_group,
dba_rsrc_plans, and v$rsrcmgrmetric_history.
There is also the
Oracle instance caging appears to be identical in
function to these approaches for dedicating CPU to instances in a monolithic
server environment. There are many alternatives to resource caging:
Oracle says that these steps are required to enable instance caging for
Enable the Resource Manager by assigning a resource plan, and ensure
that the resource plan has CPU directives, using the
"Enabling Oracle Database Resource Manager and Switching Plans" for
cpu_count initialization parameter.
This is a dynamic parameter, and can be set with the following
ALTER SYSTEM SET CPU_COUNT = 4;
How to deploy instance caging
While CPU fencing tools have been around for decades, tools such as Vmware
also allow for CPU and RAM fencing. However, fencing with instance
caching can be wasteful (since other instances may not share the CPU), and
it's quite rare for one Oracle instance to "hog" an entire bank of
Remember, the goal of server consolidation is to
facilitate sharing of processor resources, not hinder it with instance
caging. Hence, I do NOT recommend deploying instance caging without
careful testing and justification.
See these important related notes
for Oracle instance caging: