One-click install
npx skills add https://github.com/alex-quan-001/nutshell-skills --skill tikv-memory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tikv-memory
Source: https://github.com/alex-quan-001/nutshell-skills/tree/main/skills/diagnosis/tikv-memory
Command: npx skills add https://github.com/alex-quan-001/nutshell-skills --skill tikv-memory

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

TiKV memory issues are notoriously difficult to troubleshoot due to its multi-module architecture and lack of unified memory accounting, leading to wasted time guessing at root causes of gradual memory growth, sudden OOM crashes, and memory hotspots.

Core Features & Use Cases

  • Structured Diagnostic Guidance: Step-by-step routing for initial checks, key configuration review, and metric analysis to prioritize OOM prevention or root cause tracing.
  • Known Issue Reference Library: Pre-documented workarounds and fixed versions for verified TiKV memory bugs including scheduler lock_key leaks, pessimistic lock memory bloat, resolved-ts OOM, and coprocessor backlog issues.
  • Metric and Profile Collection Instructions: Clear guidance for identifying major memory consumers via TiDB Dashboard metrics, and collecting heap profiles for both pre-v7.5 and v7.5+ TiKV instances. Use case: If your TiKV cluster is experiencing repeated OOMs after a recent scale-in operation, use this skill to cross-reference symptoms against known scaling-related memory issues, check relevant metrics for region count and memory pressure, and apply the correct mitigation steps.

Quick Start

Use the tikv-memory skill to investigate the gradual memory growth and OOM crashes affecting your 3-node TiKV v7.5.6 cluster, and retrieve the recommended workaround for the pessimistic lock memory leak pattern.

Frequently Asked Questions about tikv-memory

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

FAQPage Schema
Why does my TiKV node keep crashing with OOM and how do I find the root cause?

TiKV OOM crashes often stem from resolved-ts memory pressure, coprocessor backlogs, or pessimistic lock leaks. You can root cause TiKV memory growth by routing initial checks, reviewing key configurations, and analyzing per-module metrics to pinpoint the exact memory consumer.

How do I collect a heap profile on TiKV v7.5 to diagnose memory hotspots?

To collect a TiKV heap profile for diagnosing memory hotspots, follow the specific profile collection procedures designed for pre-v7.5 and v7.5+ TiKV instances, which help identify the exact modules consuming excessive memory.

What are the most common known issues that cause TiKV memory bloat?

Common known TiKV memory bloat issues include scheduler lock_key leaks, pessimistic lock memory accumulation, resolved-ts OOM, and coprocessor task backlogs. A known issue reference library provides documented workarounds and fixed versions for these verified bugs.

How do I check if my TiKV memory pressure is related to excessive region count?

To check if TiKV memory pressure is caused by excessive region count, review key metrics for per-module memory estimation and analyze TiDB Dashboard metrics to identify if region overhead is the primary memory consumer triggering swap anomalies or OOMs.

Does this TiKV memory diagnosis approach apply to clusters that recently scaled in?

Yes, this diagnostic approach applies to TiKV clusters experiencing repeated OOMs after a scale-in operation by cross-referencing symptoms against known scaling-related memory issues, checking region count metrics, and applying the correct mitigation steps.