My Oracle Support Banner

Scripts and Tips for Monitoring CPU Resource Manager (Doc ID 1338988.1)

Last updated on SEPTEMBER 04, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 12.1.0.1 [Release 11.1 to 12.1]
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.

Purpose

Oracle Database Resource Manager is a tool for managing how multiple consumer groups (i.e. workloads) or pluggable databases (PDBs) use and share resources, such as CPU, I/O, and parallel servers. In this document, we focus on using Resource Manager to manage CPU. Once you have created and enabled a resource plan, you should run real or representative workloads, monitor Resource Manager, and tune the resource plan as needed.

This document provides scripts for monitoring and tuning Resource Manager for CPU.

Scope

This script can be run on any Enterprise Edition database that is version 11.1 or later. We do not provide scripts for earlier versions since the v$rsrcmgrmetric_history view was introduced in 11.1.

You must be logged in as a SYS user to run this script.

Details

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Purpose
Scope
Details
 Monitor Current Resource Plan
 Determine Current Resource Plan Details
 Monitor CPU Usage and Waits by Consumer Group
 Monitor CPU Usage and Waits by Pluggable Database
 The query below shows, for each PDB, the average number of sessions running (avg_running) and waiting for CPU (avg_waiting) per minute for the past hour. The resource allocation specified in the resource plan (allocation) is expressed as the average number of sessions that the PDB can be guaranteed to run.  Issue this query from the root container.
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.