mssql-performance-revi…
Agentic offline orchestrator for end-to-end SQL Server performance reviews. Forms hypotheses from artifacts or symptoms, dispatches the specialised review…
Analyze SQL Server file-level I/O latency and auto-growth events using sys.dm_io_virtual_file_stats, sys.master_files, and default trace auto-growth records. Applies 15 checks (Z1–Z15) covering data and log file latency thresholds, hot file detection, stall ratio analysis, data
$ npx -y skills add vanterx/mssql-performance-skills --skill sqldiskio-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sqldiskio-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Analyze SQL Server file-level I/O latency and auto-growth events using sys.dm_io_virtual_file_stats, sys.master_files, and default trace auto-growth records. Applies 15 checks (Z1–Z15) covering data and log file latency thresholds, hot file detection, stall ratio analysis, data
name: sqldiskio-review description: Analyze SQL Server file-level I/O latency and auto-growth events using sys.dm_io_virtual_file_stats, sys.master_files, and default trace auto-growth records. Applies 15 checks (Z1–Z15) covering data and log file latency thresholds, hot file detection, stall ratio analysis, data and log placement on the same volume, TempDB co-location with user databases, auto-growth event frequency and sizing, file growth during production hours, system drive file placement, and multi-snapshot I/O trend analysis. Use this skill whenever a DBA suspects slow I/O, queries show PAGEIOLATCH or WRITELOG waits, or a file grew unexpectedly. Trigger when pasting output from sys.dm_io_virtual_file_stats or sys.master_files. triggers: - /sqldiskio-review - /diskio-review - /io-latency
Analyze SQL Server file-level I/O performance and storage configuration issues. Applies 15 checks (Z1–Z15) across three categories:
Accept any of:
-- 1. I/O latency snapshot (cumulative since restart or since last baseline)
-- Best practice: capture twice 60 seconds apart and subtract to get interval stats
SELECT
DB_NAME(vfs.database_id) AS database_name,
mf.physical_name,
mf.type_desc,
vfs.io_stall_read_ms,
vfs.num_of_reads,
vfs.io_stall_write_ms,
vfs.num_of_writes,
vfs.io_stall,
vfs.num_of_bytes_read / 1048576 AS mb_read,
vfs.num_of_bytes_written / 1048576 AS mb_written,
CASE WHEN vfs.num_of_reads > 0
THEN vfs.io_stall_read_ms / vfs.num_of_reads ELSE 0 END AS avg_read_ms,
CASE WHEN vfs.num_of_writes > 0
THEN vfs.io_stall_write_ms / vfs.num_of_writes ELSE 0 END AS avg_write_ms,
CASE WHEN (vfs.num_of_reads + vfs.num_of_writes) > 0
THEN vfs.io_stall / (vfs.num_of_reads + vfs.num_of_writes)
ELSE 0 END AS avg_stall_per_io_ms
FROM sys.dm_io_virtual_file_stats(NULL, NULL) AS vfs
JOIN sys.master_files AS mf
ON vfs.database_id = mf.database_id
AND vfs.file_id = mf.file_id
ORDER BY vfs.io_stall DESC;
-- 2. File configuration (placement and auto-growth settings)
SELECT
DB_NAME(database_id) AS database_name,
name AS logical_name,
physical_name,
type_desc,
size * 8 / 1024 AS size_mb,
CASE is_percent_growth
WHEN 1 THEN CAST(growth AS VARCHAR) + '%'
ELSE CAST(growth * 8 / 1024 AS VARCHAR) + ' MB'
END AS growth_setting,
max_size,
is_read_only
FROM sys.master_files
ORDER BY database_id, type;
-- 3. Auto-growth events from default trace (last 24 hours)
DECLARE @tracefile NVARCHAR(500);
SELECT @tracefile = REVERSE(SUBSTRING(REVERSE(path), CHARINDEX('\', REVERSE(path)), 500))
+ N'log.trc'
FROM sys.traces WHERE is_default = 1;
SELECT
DatabaseName,
FileName,
CASE EventClass WHEN 92 THEN 'Data Auto-Grow'
WHEN 93 THEN 'Log Auto-Grow' END AS event_type,
Duration AS duration_ms, -- Duration is reported in milliseconds for event classes 92/93
IntegerData * 8 / 1024 AS growth_mb,
StartTime
FROM fn_trace_gettable(@tracefile, DEFAULT)
WHERE EventClass IN (92, 93)
AND StartTime >= DATEADD(HOUR, -24, GETDATE())
ORDER BY StartTime DESC;---
| Metric | Good | Warning | Critical | |--------|------|---------|----------| | Data file avg read latency | < 10 ms | 10–20 ms | > 20 ms | | Data file avg write latency | < 10 ms | 10–20 ms | > 20 ms | | Log file avg write latency | < 5 ms | 5–10 ms | > 10 ms | | Stall ratio (avg stall ms per I/O operation) | < 5 ms | 5–15 ms | > 15 ms | | Hot file: single file share of total I/O | < 60% | 60–80% | > 80% | | Auto-growth events in last 24 h | 0 | 1–3 | > 3 | | Auto-growth fixed-size increment | ≥ 256 MB | 64–255 MB | < 64 MB |
> **Threshold provenance:** The data/log avg-latency bands (Z1–Z3) reflect widely-cited storage-latency guidance. The remaining cutoffs — **Z4 (stall ratio), Z5 (hot-file share), and Z11–Z15 (auto-growth event count and increment sizing)** — are **reasonable operational heuristics, not Microsoft-documented values.** Use them to prioritize where to look; confirm an actual problem against the workload's own baseline rather than the number alone.
---
Run these first — latency is the direct measure of disk I/O quality.
SQL Server performance tuning skills for LLMs — 829 checks across 26 skills covering T-SQL, execution plans, wait stats, deadlocks, Query Store, indexes, encryption, Always On AG, WSFC, ERRORLOG, SPN, memory, disk I/O, config drift, setup logs, SSRS & migration readiness. Remote MCP server on Cloudflare Workers.
Repo: vanterx/mssql-performance-skills
Agentic offline orchestrator for end-to-end SQL Server performance reviews. Forms hypotheses from artifacts or symptoms, dispatches the specialised review…
Audits SQL Server Always On Availability Group configuration correctness across all layers — prerequisites, replica design, listener architecture, backup…
Analyze SQL Server Setup Bootstrap log files to diagnose failed installations, failed Cumulative Update or Service Pack patching, failed cluster node…
Analyzes Windows Server Failover Cluster (WSFC) CLUSTER.LOG files for Always On Availability Group root-cause diagnosis. Use this skill when an availability…
Analyze SQL Server instance and database configuration drift against proven DBA best practices. Applies 29 checks (B1–B29) across five categories: parallelism…
Analyze SQL Server deadlock XML (from system_health XE session, SSMS deadlock graph, or trace) to identify root cause and produce a prioritized remediation…