Max processes
Job details
Name: | Max processes |
Platform: | Oracle |
Category: | Capacity |
Description: | Checks the maximum number of processes. |
Long description: | Task checks the number of processes and the instance parameter value ‘processes’. |
Version: | 1.5 |
Default schedule: | 0,4,8,12,16,20,24,28,32,36,40,44,48,52,56 * * * |
Requires engine install: | Yes |
Compatibility tag: | .[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’] |
Parameters
Name | Default value | Description |
---|---|---|
keep data for | 14 | Number of days to provide detailed statistics for process history on the instance. |
warning threshold | 20 | The warning threshold for the remaining number of processes which can be started on the instance. |
alarm threshold | 10 | The alarm threshold for the remaining number of processes which can be started on the instance. |
Job Summary
- Purpose: This job monitors the maximum number of processes used in an Oracle database instance to manage capacity and performance.
- Why: Effective monitoring of process usage helps prevent the database from exceeding its configured limits, potentially leading to performance degradation or system halts. By keeping track of both user and background processes, it ensures the database operates within safe process limits.
- Manual checking: You can check the maximum number of processes manually by querying the Oracle view and tables involved:
SELECT * FROM v$parameter WHERE name = 'processes';
SELECT count(*) FROM v$session WHERE username IS NULL; -- For background processes
SELECT count(*) FROM v$session WHERE username IS NOT NULL; -- For user processes
Tables and Procedures Definition
- Tables Created:
- dbw_pros_load_histr_#instance~id#: Holds historical data about user and background processes.
- Procedures:
- Procedure dbw_pros_load_#instance~id#: This procedure is responsible for collecting data about current processes, storing historical records, maintaining the history by cleaning up old records, generating daily aggregates, and evaluating the thresholds to issue alerts.
Implementation Details and Process Flow
This job includes the execution of several SQL commands to:
- Create necessary tables to store historical and aggregated data about process usage.
- Use PL/SQL blocks to manage data collection, aggregation, and cleanup involving these tables:
Process Flow:
- Gather parameters such as retention period (keep data for), warning, and alarm thresholds.
- Fetch current configuration of the maximum processes allowed (from v$parameter).
- Record current counts of user and background processes (from v$session).
- Store the records into historical table dbw_pros_load_histr_#instance~id#.
- Clean up historical data beyond the retention period.
- Generate daily aggregates (previous day) if not already done.
- Insert aggregated data into the table dbw_pros_load_aggr_histr_#instance~id#.
- Evaluate current process load against the defined thresholds and update the job status accordingly to reflect potential warnings or alarms.
Dependency Handling
- Dependencies: Ensures that historical and aggregated data tables as well as the main procedure exist and are operational.
- If any of the creation or execution steps fail, the job is designed to clean up inconsistent or partial data to prevent database pollution.
Reporting Capabilities
- Reports Generated:
- Process history: Visualizes detailed history data of user and background processes, showcasing trends over time.
Each report leverages data visualizations through charts categorized by date and differentiated by process types (user vs. background), providing intuitive insights into the database’s operational status.