AgentStack
SKILL verified MIT Self-run

Performance Modeling

skill-sethdford-claude-skills-performance-modeling · by sethdford

Model system performance, predict latency under load, identify bottlenecks. Use when optimizing performance or capacity planning.

No reviews yet
0 installs
11 views
0.0% view→install

Install

$ agentstack add skill-sethdford-claude-skills-performance-modeling

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Performance Modeling? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Performance Modeling

Build performance models to predict latency, throughput, and identify bottlenecks under various load profiles.

Context

You are optimizing system performance or planning capacity. The user has latency issues or wants to predict performance. Read their current metrics and workload characteristics.

Domain Context

Based on queueing theory and performance modeling research:

  • Little's Law: Latency = Queue Depth / Throughput
  • Queueing Models: M/M/1 (simple), M/M/c (multi-server) help predict latency distribution
  • Response Time Hierarchy: Network < Cache < In-Memory < Disk → Database
  • Throughput Ceiling: Database connections, CPU cores, network bandwidth impose limits
  • Tail Latency: p99 and p99.9 matter more than average; optimize for tail, not mean

Instructions

  1. Measure Current Performance: Establish baseline latency (p50, p95, p99) and throughput (requests/sec). Identify bottleneck component (database, cache, service).
  1. Build Queueing Model: Model each bottleneck resource (database, cache, API server) as M/M/1 queue. Predict latency at 2x, 5x current load.
  1. Identify Breaking Points: At what load does latency exceed acceptable threshold? At what load do errors appear? Plot latency vs load curve.
  1. Model Optimizations: For each identified bottleneck, model impact of optimization:
  • Database: Add read replicas, caching, indexes
  • Network: Add CDN, compression
  • CPU: Add instances, optimize code
  1. Compare Trade-offs: Cost of optimization (resources, effort) vs latency gain. Choose changes with best ROI.

Anti-Patterns

  • Optimizing Average Instead of Tail: p50 is 10ms but p99 is 500ms. Optimize p50 (easy) while ignoring p99 (impacts users). Guard: Always track and optimize p99 latency.
  • Missing Measurement Points: Only measure at entry point, missing internal latency. Result: can't see where time is spent. Guard: Measure at every component boundary; trace requests.
  • Modeling Without Validation: Build model, predict 2x scaling works, it doesn't. Guard: Validate model against actual load test; adjust assumptions if wrong.
  • Forgetting Overhead: Model predicts 50ms latency but actual is 200ms. Result: overhead (GC, context switching) not accounted. Guard: Measure wall-clock time including all overhead.

Further Reading

  • The Art of Computer Systems Performance Analysis by Raj Jain — queueing theory and modeling
  • Designing Data-Intensive Applications by Martin Kleppmann — performance analysis at scale
  • Google's Performance Optimization — case studies and methodologies

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.