A technical troubleshooting blog about Oracle with other Databases & Cloud Technologies.

Manageability Monitor Process (MMON) and Manageability Monitor Lite Process (MMNL) : Oracle Background Process

2 min read
MMON Performs many tasks related to manageability, including taking Automatic Workload Repository snapshots and performing Automatic Database Diagnostic Monitor analysis.

MMNL Performs tasks relating to manageability, including active session history sampling and metrics computation.
The manageability monitor process (MMON) and manageability monitor lite process (MMNL) perform tasks related to the Automatic Workload Repository (AWR). The AWR is a repository of historical performance data that includes cumulative statistics for the system, sessions, individual SQL statements, segments, and services. It provides problem detection and self-tuning. 

The AWR resides in the SYSAUX tablespace. AWR reports can be generated in the CDB root or in any PDB. MMON gathers memory statistics from the system global area (SGA), filters them, and creates snapshots of those statistics in the AWR every 60 minutes(or another interval that you choose). It also performs Automatic Database Diagnostic Monitor (ADDM) analysis and issues alerts for metrics that exceed their threshold values.

MMNL gathers session statistics(such as the user ID, state, the machine, and the SQL that it's processing) and stores them in the active session history(ASH) buffer, which is part of the shared pool in the SGA. Specifically, MMNL samples the V$SESSION and V$SESSION_WAIT views every second and then records that data in the V$ACTIVE_SESSION_HISTORY view in the ASH buffer.

MMNL doesn't sample Inactive sessions. The ASH is a rolling buffer in memory, so newer information overwrites earlier information when needed. When the ASH buffer becomes full or when MMON takes a snapshot, MMNL flushes(empties) the ASH buffer into the DBA_HIST_ACTIVE_SESS_HISTORY view in the AWR. Because space is expensive, MMNL flushes only one in every 10 entries. 

MMNL also computes metrics.

Both MMON and MMNL can run as threads or as an operating system processes. In addition to database instances, MMON and MMNL also run on Oracle Automatic Storage Management (Oracle ASM) instances.