Skip to content
Back to skills

Latency Principles

ASecurity

Principles, laws, and checklists for analyzing and optimizing software latency. Use this skill when: (1) Diagnosing slow performance or latency spikes, (2) Designing systems with strict latency requirements, (3) Analyzing theoretical limits using Little's Law or Amdahl's Law, or (4) Learning about latency sources (OS, Hardware, Network).

  • 225 stars
  • 0 votes
  • 2 copies
  • 7 views
  • Added September 4, 2026
code-qualitygoawsdebuggingperformance

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add NeverSight/skills_feed --skill latency-principles --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Latency Principles?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Latency Principles
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-latency-principles/badge)](https://www.skillsdirectory.com/skills/neversight-latency-principles)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: latency-principles
description: "Principles, laws, and checklists for analyzing and optimizing software latency. Use this skill when: (1) Diagnosing slow performance or latency spikes, (2) Designing systems with strict latency requirements, (3) Analyzing theoretical limits using Little's Law or Amdahl's Law, or (4) Learning about latency sources (OS, Hardware, Network)."
---

# Latency Principles

This skill provides a systematic approach to understanding and reducing latency in software systems, based on the book "Latency" by Pekka Enberg.

## Core Concepts

Latency is the time delay between a cause and its observed effect. It is a distribution, not a single number.

### Quick Reference

- **Little's Law**: `Concurrency = Throughput * Latency`. Use to size queues and thread pools.
- **Amdahl's Law**: Speedup is limited by the serial part of the task. Use to estimate max benefit of parallelization.
- **Tail Latency**: The experience of the 99th percentile users. In high-fanout systems, tail latency dominates.

For detailed definitions and laws, see [references/principles.md](references/principles.md).

## Diagnosis & Optimization

When facing latency issues, follow this systematic approach:

1.  **Measure First**: Identify *where* the time is going. Don't guess.
2.  **Check the Usual Suspects**: Use the checklist to rule out common issues.
    - See [references/diagnostic_checklist.md](references/diagnostic_checklist.md) for a comprehensive list covering Hardware, OS, and Architecture.
3.  **Model the System**:
    - Is it a throughput problem (queuing)? -> Apply Little's Law.
    - Is it a serial execution problem? -> Apply Amdahl's Law.
    - Is it a tail latency problem (variability)? -> Check fanout and shared resource contention.

## Common Sources of Latency

- **Physics**: Distance (Speed of light).
- **Hardware**: CPU frequency scaling, cache misses, NUMA.
- **OS**: Context switching, interrupts, scheduler latency.
- **Runtime**: Garbage collection pauses, JIT compilation.

## When to use Reference Files

- **[references/principles.md](references/principles.md)**: When you need deep theoretical background, definitions of laws, or understanding of latency compounding.
- **[references/diagnostic_checklist.md](references/diagnostic_checklist.md)**: When you are actively debugging a slow system and need a list of things to check.

Files in this skill

  • SKILL.md2.3 KB
  • description_ar.txt575 B
  • description_cn.txt315 B
  • description_de.txt428 B
  • description_en.txt340 B
  • description_es.txt382 B
  • description_fr.txt440 B
  • description_it.txt421 B
  • description_ja.txt561 B
  • description_ko.txt442 B
  • description_ru.txt755 B
  • description_tw.txt315 B
  • stats.json65 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in code-quality →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.