Top user memory usage


Job details

Name: Top user memory usage
Platform: Oracle
Category: Performance
Description: Check can be used to trace memory usage per server-process (session).
Long description: This task check can be used to trace memory usage per server-process (session).
Version: 2.5
Default schedule: 6,16,26,36,46,56 * * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & ten_and_above=‘1′]

Parameters

Name Default value Description
warning threshold 300 Warning threshold for the amount of memory used by single session (PGA/UGA size) in MB.
alarm threshold 1000 Alarm threshold for the amount of memory used by single session (PGA/UGA size) in MB.
min user memory size 20 The minimum size of user memory usage per session registered in the history table.
delete older than 14 Delete trace statistics older than … days.

Job Summary

SELECT t1.sid "SID",
       NVL(t2.username, 'background process') "Username",
       t2.machine "Machine",
       t2.program "Program",
       t2.status "Status",
       ROUND(SUM(t1.value)/1048576, 1) "Memory Usage",
       t3.sql_text "SQL Text"
  FROM v$sesstat t1, v$session t2, v$sqlarea t3
 WHERE t1.statistic# IN (20, 25) AND t1.sid = t2.sid
       AND t2.SQL_ADDRESS = t3.ADDRESS (+)
GROUP BY t1.sid, t2.username, t2.machine, t2.program, t2.status, t3.sql_text
HAVING SUM(t1.value)/1048576 > 8
ORDER BY "Memory Usage" DESC;

Implementation Details

Dependencies

Output Structure

Output Category Description Methodology
Current Usage Details about current top sessions by memory usage. Extracted live from standard Oracle performance views (v$sesstat, v$session, and v$sqlarea).
Historical Usage Historical records of sessions that were top memory users. Extracted from “dbw_user_mem_histr” which is populated by the stored procedure based on memory usage exceeding preset thresholds.

Alerts and Notifications

This configuration ensures thorough monitoring and manageability of memory usage per session in Oracle databases, aiding in maintaining overall system health and performance.