Memory Leak Detection via Process-Level Sampling and Indexing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods fail to effectively detect memory leaks in computer systems, particularly in multi-user environments, as they often result in false alarms, do not pinpoint the offending process, and require system rebooting, which can lead to performance degradation and crashes.

Innovation Solution

A system that periodically samples memory usage, computes a memory-leak index using an exponential forgetting function to rank processes, and identifies those with non-negative indexes, thereby detecting subtle memory leaks with minimal resource usage and avoiding false alarms.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If time-series analysis is used to detect gradual resource exhaustion, then preventive actions can be taken to avoid system failure, but the entire system may have to be rebooted and subtle memory leaks cannot be detected when memory usage is large and noisy

Engineering Contradiction:
Improvesystem reliabilityVSAvoidmemory leak detection precision
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The patent segments the system-level memory usage data into process-level data by associating memory usage statistics with process identifiers (PID). This allows the system to detect memory leaks at the process level rather than system level, enabling precise identification of offending processes without requiring system reboots. The segmentation is achieved through periodic sampling of process memory usage and correlation with process information from system calls.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism using process identifiers (PID) and process name associations to bridge between memory usage data and specific processes. This intermediary layer allows the system to trace memory consumption back to individual processes without direct inspection of process memory structures, enabling accurate memory leak detection while maintaining system stability and avoiding false alarms.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If system administrators terminate processes consuming the largest amounts of memory, then system crash can be prevented, but the terminated processes may not be the ones that actually have a memory leak

Engineering Contradiction:
Improvesystem stabilityVSAvoidmemory leak identification accuracy
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The patent dynamically calculates memory leak rates by computing the rate of change of memory usage over time for each process, rather than using static memory usage thresholds. This dynamic approach allows the system to identify processes with increasing memory consumption patterns (memory leaks) rather than simply terminating processes with high absolute memory usage. The memory leak rate is calculated as the derivative of memory usage with respect to time, providing a dynamic metric for identifying problematic processes.

Inventive Principle:
Principle #15Dynamics

3Reliability

If memory usage sampling is performed continuously to detect memory leaks, then early detection is achieved, but system resources are consumed

Engineering Contradiction:
Improvememory leak detection capabilityVSAvoidsystem resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent employs periodic sampling of memory usage at predetermined time intervals rather than continuous monitoring. This periodic action reduces the computational overhead and resource consumption while still enabling effective memory leak detection. The sampling interval is configured to capture memory leak trends without excessive frequency, balancing detection effectiveness with resource efficiency. The system processes memory usage data at each sampling point and updates process memory usage statistics accordingly.

Inventive Principle:
Principle #19Periodic action

Data Source

PatentUS7716648B2Method and apparatus for detecting memory leaks in computer systems
Publication Date: 2010.05.11 ORACLE AMERICAN INC
  • US7716648B2 patent drawing
  • US7716648B2 patent drawing
  • US7716648B2 patent drawing

AI summary

A system that identifies processes with a memory leak in a computer system. During operation, the system periodically samples memory usage for processes running on the computer system. The system then ranks the processes by memory usage and selects a specified number of processes with highest memory usage based on the ranking. For each selected process, the system computes a first-order difference of memory usage by taking a difference between the memory usage at a current sampling time and the memory usage at an immediately preceding sampling time. The system then generates a memory-leak index based on the first-order difference and a preceding memory-leak index computed at the immediately preceding sampling time.