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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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
- 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)
- Dirty Page Ratio: $\frac{\text{pages_dirty}}{\text{pages_total}} \times 100$
- $> 75%$: DIRTY_STALL (Risk of checkpoint flushing stalls)
- Instance Partitioning:
- For buffer pools $> 1\text{GB}$, recommend
innodb_buffer_pool_instances$\ge 8$.
- For buffer pools $> 1\text{GB}$, recommend
🛡️ Guardrails & Safety
- All recommendations specify exact SQL (
SET GLOBAL ...) and rollback SQL. - Changes requiring restart (e.g.
innodb_buffer_pool_instanceson older MySQL) are explicitly flagged withrequires_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
Comments
- …
More skills from this repository
cli-execution-mastery
9.5kHelps your agent run the MySQLTuner health check with the right connection and login options, for local, remote or container databases.
detect_fragmented_tables
9.5kHelps your agent find database tables that waste disk space through fragmentation, and suggest safe ways to reclaim it, with notes on how much each cleanup affects the server.
diagnose_replication_lag
9.5kHelps your agent check whether a MySQL or MariaDB replica has fallen behind its main server, and find any failed replication threads and their errors.
Similar skills
discrawl
394kLets your agent search and summarize a saved local archive of Discord messages, check how fresh it is, and read direct messages.
clickhouse-io
280kHelps your agent optimize queries and schemas in ClickHouse databases. It applies best practices for high-performance analytical workloads. Use when analytical queries are too slow.
scientific-db-pubmed-database
280kHelps your agent search for scientific articles in the biomedical field. It's useful for research needing specific medical information.