Add brendangregg-use-tsa skill - #1467
Open
Daniyal (thecsdoctor) wants to merge 1 commit into
Open
Conversation
Daniyal (thecsdoctor)
force-pushed
the
add-brendangregg-use-tsa
branch
from
July 28, 2026 01:35
3dfe4ff to
e146fab
Compare
Author
|
Prathit (@Prat011) please review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem it solves
AI agents debugging performance issues typically improvise: they run whichever three commands they happen to know (the "streetlight anti-method") or change settings until the symptom stops. This skill gives Claude a fixed, evidence-first procedure for system performance troubleshooting and root-cause analysis: problem statement → 60-second triage → USE sweep (Utilization, Saturation, Errors for every resource) → TSA breakdown (thread time across Executing/Runnable/Paging/Sleeping/Lock/Idle) → drill-down with off-CPU analysis and flame graphs → verified fix → structured report.
The skill itself (SKILL.md, per-resource Linux checklists, thread-state instructions, methodology toolbox, and triage/RCA/postmortem report templates) lives at https://github.com/thecsdoctor/brendangregg-use-tsa-skill — this PR adds the README link, per the repo's external-link convention.
Who uses this workflow
Developers, SREs, and anyone who has ever typed "this server is slow, figure out why" into an agent and gotten guesswork back. It also produces the incident artifacts teams actually need: triage notes, RCA reports with falsifiable hypotheses, and blameless postmortems with command-to-output evidence tables.
Attribution / inspiration
Inspired by Brendan Gregg's published methodologies — the USE Method, the TSA Method, Off-CPU Analysis, and "Thinking Methodically about Performance" (ACM Queue 2012 / CACM 2013), as well as Systems Performance: Enterprise and the Cloud.
Example of how it's used
User: "Checkout latency is 20x normal since this morning. Figure out why."
Claude works the phases instead of guessing: quantifies the regression (p99 95ms → 1.9s after a 14:02 deploy), exonerates host CPU/memory/disk/network in the 60s sweep with the actual numbers, then TSA shows 61% of thread time in Runnable on a half-idle host — the signature of a resource-control limit. Evidence:
cpu.max= 1.5 CPUs withnr_throttledclimbing 54k/min → cgroup CPU throttling after a replica increase. Fix applied and verified with the same instruments (nr_throttled0/s for 72h, p99 back to 110ms). The report includes the dead ends that were ruled out, not just the cause.Checklist