Oracle instance
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
, 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
(e.g.
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
failure.
The
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
others.
Oracle instance caging appears to be identical in
function to these approaches for dedicating CPU to instances in a monolithic
server environment:
Oracle says that these steps are required to enable instance caging for
each instance:
-
Enable the Resource Manager by assigning a resource plan, and ensure
that the resource plan has CPU directives, using the mgmt_p1
through mgmt_p8 parameters.
See
"Enabling Oracle Database Resource Manager and Switching Plans" for
instructions.
-
Set the cpu_count initialization parameter.
This is a dynamic parameter, and can be set with the following
statement:
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
processors.
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: