PERF-002 recommended memory-monitoring

Memory usage tracking over time

Track memory usage with historical trends visible

Question to ask

"Is your memory usage trending up month over month?"

What to check

  • Memory metrics collected (heap, RSS, etc.)
  • Historical data available (minimum 24h)
  • Trends visible over time, not just point-in-time

Verification guide

Severity: Recommended

Check automatically:

  1. Look for memory metrics collection:
# Check for memory-related monitoring in code
grep -riE "memoryUsage|heap|rss|memory.used|process.memory" --include="*.ts" --include="*.js" src/ lib/ app/ 2>/dev/null | head -10

# Check for memory in monitoring/metrics config
grep -riE "memory|heap" --include="*.yaml" --include="*.yml" --include="*.json" monitoring/ config/ 2>/dev/null | head -10
  1. Check container/orchestration memory config (implies monitoring exists):
# Docker memory limits
grep -iE "memory|mem_limit" docker-compose*.yml Dockerfile 2>/dev/null

# Kubernetes memory config
grep -iE "memory" kubernetes/*.yaml k8s/*.yaml deploy/*.yaml 2>/dev/null
  1. Verify historical data available:
    • Memory graphs should show hours/days of history
    • Not just current point-in-time value

If not found in code, ask user:

  • "Where can I see memory usage graphs for the app?"
  • "Is memory tracked in the same tool as response times?"
  • "Can you show historical memory trends (last 24h, 7d)?"

Cross-reference with:

  • PERF-001 (often same monitoring tool)
  • MON-001 (Section 12 - infrastructure monitoring)

Pass criteria:

  • Memory usage visible over time (at minimum 24h history)
  • Can see historical trends, not just current value
  • Graphs show heap/RSS or equivalent memory metrics

Fail criteria:

  • No memory tracking
  • Only point-in-time checks (no historical graph)
  • Memory only visible in container orchestrator, not application level

Evidence to capture:

  • Monitoring tool used for memory
  • Dashboard URL or screenshot
  • Sample memory trend (24h or 7d graph)

Section

17. Performance Monitoring

Performance & Analytics