page-cache-reclaim-diagnosis

Diagnose Linux memory reclaim issues from vmstat, meminfo, and zoneinfo metrics.

3|2|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/openeuler-mirror/witty-diagnosis-agent --skill page-cache-reclaim-diagnosis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: page-cache-reclaim-diagnosis
Source: https://github.com/openeuler-mirror/witty-diagnosis-agent/tree/main/test/page-cache-reclaim-diagnosis
Command: npx skills add https://github.com/openeuler-mirror/witty-diagnosis-agent --skill page-cache-reclaim-diagnosis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill resolves complex Linux memory performance issues by identifying the root causes of high CPU usage in kswapd, process stalls due to direct memory reclaim, and I/O storms caused by dirty page writeback or improper cache clearing.

Core Features & Use Cases

  • Automated Symptom Analysis: Automatically maps user-reported symptoms like "kswapd high CPU" or "allocstall" to specific diagnostic branches.
  • Hypothesis-Driven Diagnosis: Uses a structured, multi-branch approach to validate potential causes like NUMA imbalance, memory fragmentation, or disk I/O bottlenecks.
  • Use Case: When a production server experiences intermittent latency spikes, use this Skill to determine if the issue is caused by excessive direct memory reclaim or a dirty page writeback storm, and receive actionable tuning recommendations.

Quick Start

Use the page-cache-reclaim-diagnosis skill to analyze the system memory pressure and reclaim activity for the time window starting at 2024-01-15 14:00:00.

Frequently Asked Questions about page-cache-reclaim-diagnosis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does kswapd consume high CPU and cause system stalls on Linux?

High kswapd CPU usage and system stalls on Linux are caused by kernel memory reclaim pressure. This Skill analyzes vmstat, meminfo, and zoneinfo metrics to isolate whether NUMA imbalance, memory fragmentation, or page cache overuse is triggering the reclaim storm.

How do I diagnose direct memory reclaim latency spikes in production?

You can diagnose direct memory reclaim latency by analyzing allocstall events and vmstat metrics for a specific time window. This Skill uses a hypothesis-driven framework to map process stalls to root causes like disk I/O bottlenecks or improper cache clearing, providing actionable tuning recommendations.

What causes dirty page writeback storms and how can I identify them?

Dirty page writeback storms are caused by excessive dirty cache flushing that overwhelms disk I/O capacity. This Skill identifies these storms by analyzing kernel memory reclaim metrics and maps the symptoms to specific diagnostic branches to validate disk I/O bottlenecks.

How do I tune sysctl parameters to prevent Linux kernel page cache overuse?

To tune sysctl parameters against page cache overuse, you must first isolate the root cause of memory pressure. This Skill diagnoses kswapd spikes and direct reclaim issues using memory metrics, then provides specific sysctl tuning recommendations to mitigate cache overuse.

Can I use vmstat and meminfo analysis for NUMA imbalance diagnosis?

Yes, vmstat and meminfo analysis can be used for NUMA imbalance diagnosis. This Skill implements a structured multi-branch approach to validate potential causes like NUMA imbalance by analyzing these exact metrics alongside zoneinfo data during memory pressure events.

What are the limitations of diagnosing memory pressure without zoneinfo metrics?

Diagnosing memory pressure without zoneinfo metrics limits the ability to detect memory fragmentation across zones. This Skill requires vmstat, meminfo, and zoneinfo together to validate hypotheses like NUMA imbalance and fragmentation, ensuring accurate root cause isolation.