Skip to content
Skillpedia
Databases9.5k · #12276

analyze_buffer_pool

What it does

This skill checks how well a MySQL or MariaDB server uses its InnoDB memory cache. It is for database admins who want to know whether the server needs more memory or a different setup.

When to use it

  • ✓When your MySQL or MariaDB server is slow and you suspect memory or disk reads are the cause.
  • ✓When you want to know whether the InnoDB buffer pool is sized well for your server.
  • ✓When you see signs of write stalls and want them explained.

Skill link

https://github.com/major/MySQLTuner-perl/blob/master/.agent/skills/analyze-buffer-pool/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/major/MySQLTuner-perl/blob/master/.agent/skills/analyze-buffer-pool/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Check whether my MySQL buffer pool is big enough and tell me what size to set.”

5 new skills a week. 1 minute to read.

How it works

The agent reads statistics from the server without changing anything, calculates the cache hit ratio and the share of dirty pages, and recommends a size based on the available memory.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

AI Skill: InnoDB Buffer Pool Sizing & Efficiency Analysis

🧠 Purpose & Operational Objectives

The analyze_buffer_pool skill enables autonomous DBA agents to diagnose memory pressure, caching efficiency, and dirty page write stalls in the InnoDB storage engine.

📋 Preconditions & Context

  • Server running MySQL 5.5+ or MariaDB 10.0+ with InnoDB enabled.
  • Database connectivity established or cached audit state available.
  • Read-only execution: does not execute any modifying statements directly.

🛠️ Input Parameters

Parameter Type Required Default Description
target_ram_percentage number No 75 Target percentage of available host RAM dedicated to InnoDB (50-85%).
include_dirty_pages boolean No true Include dirty page write stall analysis.

📊 Evaluation Criteria & Thresholds

  1. Hit Ratio: $\frac{\text{read_requests} - \text{reads}}{\text{read_requests}} \times 100$
    • $\ge 99%$: OPTIMAL
    • $95% - 99%$: ACCEPTABLE
    • $< 95%$: UNDERSIZED (Generates disk I/O bottleneck)
  2. Dirty Page Ratio: $\frac{\text{pages_dirty}}{\text{pages_total}} \times 100$
    • $> 75%$: DIRTY_STALL (Risk of checkpoint flushing stalls)
  3. Instance Partitioning:
    • For buffer pools $> 1\text{GB}$, recommend innodb_buffer_pool_instances $\ge 8$.

🛡️ Guardrails & Safety

  • All recommendations specify exact SQL (SET GLOBAL ...) and rollback SQL.
  • Changes requiring restart (e.g. innodb_buffer_pool_instances on older MySQL) are explicitly flagged with requires_restart: true.
FAQ

Does this change my database settings?

No. It reads statistics only and makes recommendations.

What is a good hit ratio?

The skill treats 99 percent or higher as optimal, and under 95 percent as undersized.

Which versions does it support?

MySQL 5.5 or later and MariaDB 10.0 or later, with InnoDB enabled.

Details

Original description by the author

Deeply analyzes InnoDB Buffer Pool efficiency, hit ratio, memory allocation, and instance concurrency to recommend optimal sizing.

repo: major/MySQLTuner-perl

Popularity

GitHub stars
9.5k
Ranking position
#12276
License
GPL-3.0
Updated
10/28/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills