agentleFS
narenaryannarenaryan/agent-skills/skills/engineering/linux-io-latency-triage/SKILL.md

linux-io-latency-triage

Skill0 starsChanged 39 days agoMITView on GitHub

Use when Linux applications stall, blocked tasks or I/O wait rise, NVMe latency spikes, or block tracing shows unexpectedly slow requests or no events

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After approval for bounded tracing, examples for distributions shipping BCC's -bpfcc names:

    line 32
  2. Very specific:

    Prefer histograms first; per-request output can be costly.

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Linux I/O Latency Triage

Measure the boundary before naming the bottleneck: application latency, OS queueing, and issued-request latency are different clocks. Block completion samples omit requests still outstanding; an empty histogram cannot exonerate a stalled device.

Establish comparable evidence

Record window, device mapping, workload, versions, and units. Use top to orient CPU/process pressure, then interval measurements:

vmstat -w -t 1 11
iostat -x -y -t 1 10

Collect during the same incident window; sequential runs are not synchronized. Discard vmstat's first CPU/I/O rate row: it averages since boot; its process/memory fields are instantaneous. iostat -y skips its since-boot report. Check local flags.

SignalNext discriminating observation; not a verdict
Runnable tasks/high CPUCheck CPU pressure before blaming storage
Swap-in/out plus stallsInvestigate memory pressure driving I/O
Rising await/queue lengthInspect latency distribution and device layer
High SSD/NVMe %utilCorrelate latency and throughput; parallel devices can remain busy without exhausting capacity

Preflight, then narrow tracing

Identify the installed implementation: BCC Python tools and libbpf CO-RE binaries can share names but differ in flags. BCC needs compatible compilation dependencies/headers; CO-RE needs suitable target BTF and supported helpers/hooks, not merely a recent kernel. Record kernel, hooks, device scope, and authorization. Never install tools, widen privileges, or disable security controls just to get a trace.

After approval for bounded tracing, examples for distributions shipping BCC's -bpfcc names:

biolatency-bpfcc -h
biosnoop-bpfcc -h
# Only in an already authorized tracing context:
biolatency-bpfcc -D -T 1 10
timeout --signal=INT 10s biosnoop-bpfcc -Q

Prefer histograms first; per-request output can be costly. Default microseconds preserve sub-ms detail; -m truncates to milliseconds. Use supported device filters once mapping is verified. Preserve stderr, attachment failures, lost-event warnings and stop status; INT is a soft stop, not guaranteed termination or complete capture.

For this BCC implementation, biolatency defaults to issue-to-completion; -Q includes OS queueing. Biosnoop -Q reports separate QUE(ms) and LAT(ms) for the same request. Long QUE with short LAT points toward pre-issue delay; long LAT localizes delay after issue, not necessarily failing media. Never subtract percentiles from separate histogram runs to estimate queueing.

Evidence contract

Report measured boundary, time/device scope, observed tails, coverage gaps, and the next test. Correlate application/filesystem evidence before attributing writes; require independent device/error evidence before alleging SSD failure. See sources and scenario tests.

Pitfalls

  • Issuing PID/comm can identify writeback workers, not the application that dirtied pages; unknown attribution stays unknown.
  • Missing biosnoop attribution can print QUE=0 without queue metadata; treat it as unknown, not measured zero.
  • Failed attachment, wrong device, dropped events, or outstanding requests invalidate “no slow I/O” claims.
  • Block timing excludes earlier application/filesystem work; device-mapper/RAID layers must not be summed blindly.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.