Performance Investigation

Diagnose latency, throughput, CPU, memory, allocation, lock contention, storage, and network regressions with measurement-first analysis. Use for benchmarks, profiles, scalability limits, and production performance problems.

iamHrithikRaj bfaeae1 1.4 KB Updated

File contents

Performance investigation

Define the problem

Record:

  • User-visible metric and target.
  • Baseline and regression size.
  • Workload, concurrency, dataset, and environment.
  • Measurement window and statistical variation.
  • Relevant code, configuration, dependency, or traffic changes.

Do not compare results produced by materially different workloads.

Decompose the cost

Break the path into:

  • Queueing and scheduling.
  • CPU and instruction cost.
  • Allocation and memory pressure.
  • Synchronization and contention.
  • Storage and filesystem I/O.
  • Network transfer and remote dependency time.
  • Retries, timeouts, and duplicated work.

Gather evidence

Prefer:

  • Profiles and traces.
  • Histograms and percentiles.
  • Hardware and runtime counters.
  • Allocation and lock-contention data.
  • Controlled A/B experiments.

Avoid optimizing from intuition or isolated microbenchmarks.

Recommend an optimization

Include:

  1. Identified bottleneck.
  2. Supporting measurement.
  3. Proposed change.
  4. Expected effect and assumptions.
  5. Correctness and operational risks.
  6. Benchmark and production validation plan.
  7. Rollback or disablement strategy.

iamHrithikRaj/loom/tree/main/skills/performance-investigation commit bfaeae13bc

Frequently asked questions

npx skillmds@latest add iamhrithikraj/performance-investigation