Track
Performance & eBPF lessons
40 short lessons on Performance & eBPF. Each one starts from a real situation, shows how it works, and ends with a quiz. Free to read.
All 40 lessons
- Latency percentilesBeginner · 4 min
Latency percentiles describe the distribution of observations. p99 is the value at or below which about 99% of sampled operations fall under the chosen…
- Coordinated omissionBeginner · 4 min
A waiting load generator can miss arrivals during a slow response.
- Load testing modelsBeginner · 4 min
Closed tests tie new requests to completions; open tests schedule arrivals independently.
- Queueing theoryBeginner · 4 min
A queue grows when work arrives faster than workers complete it.
- Little lawBeginner · 4 min
Little’s law relates average work in a stable system to throughput and time in that system.
- CPU saturationBeginner · 4 min
CPU saturation describes runnable work waiting for CPU time.
- CPU flamegraphsBeginner · 4 min
A CPU flame graph merges sampled stack traces; frame width shows how often a frame was on-CPU.
- Off CPU profilingBeginner · 4 min
Off-CPU analysis measures where and how long threads wait while blocked instead of running.
- Heap profilingBeginner · 4 min
A heap profile samples allocations by call stack; inuse_space shows live memory and alloc_space shows total churn.
- Memory fragmentationBeginner · 4 min
Fragmentation and retained idle memory let RSS stay above live heap data without a leak.
- Garbage collectionBeginner · 4 min
Garbage collection cost depends on the live heap and the allocation rate, not only on heap size. GOGC and GOMEMLIMIT trade CPU for memory, and each setting moves the…
- Disk latencyBeginner · 4 min
Disk latency is queueing time plus service time, and iostat's await shows both. Utilization alone does not show how much more work a device can take.
- IOPS throughputBeginner · 4 min
IOPS and throughput are linked by I/O size, so the lower of the two caps decides the speed. Test with the workload's real I/O size, not a small-block benchmark at queue…
- Network buffer tuningBeginner · 4 min
TCP buffers cap how much data a connection can have in flight, so the window and the round-trip time set the rate. Size them from bandwidth times round-trip time, then…
- TCP backlogBeginner · 4 min
The listen backlog sets the accept queue for a listening socket, capped by the system somaxconn value. A full queue usually means the application accepts too slowly…
- File descriptor exhaustionBeginner · 5 min
Each open file, socket or pipe takes a descriptor from a per-process limit. A count that climbs with requests points to a leak, and a higher limit only delays the…
- Lock contentionIntermediate · 4 min
A contended lock makes threads sleep on a futex, so CPU can look low while throughput is capped. The length of the locked section sets the ceiling, and adding threads…
- Cache localityIntermediate · 4 min
Cache lines move between RAM and the CPU in fixed blocks, so the order of memory access changes the miss rate. Hardware counters show the cost, and false sharing can…
- NUMA effectsIntermediate · 4 min
Explains how NUMA nodes and memory policy decide where pages live, and how remote memory access shows up as tail latency. It also shows how to check where the memory of…
- eBPF hooksIntermediate · 4 min
Explains how eBPF programs attach to kernel hook points, how the verifier checks them, and why a probe can load yet count nothing. Shows how to confirm a probe fires…
- bpftraceIntermediate · 4 min
Explains how bpftrace turns probes, filters and actions into short scripts that aggregate kernel events into maps and histograms. Covers when to aggregate rather than…
- Perf eventsIntermediate · 4 min
Explains how perf reads hardware and software events in counting and sampling modes, and how IPC and cache misses read together. Shows why comparisons need matched…
- Distributed bottlenecksIntermediate · 4 min
Explains how a shared pool or dependency becomes the bottleneck of a distributed request path, and how retries can make a full queue worse. Shows how to find the shared…
- Tail latency amplificationIntermediate · 4 min
Explains how fan-out multiplies rare slow calls into a slow page, and why a healthy per-call percentile can still hide the problem. Shows how to calculate the odds of…
- Capacity benchmarkingAdvanced · 4 min
Explains how to find the highest load a service sustains under its latency target, by stepping the rate with long holds on production-sized data. Shows why the margin…
- Latency percentiles: failure analysisAdvanced · 4 min
Explains what percentiles tell you that averages hide, and how histogram buckets set the accuracy of a percentile estimate. Shows how to combine hosts correctly, by…
- Coordinated omission: operational verificationAdvanced · 4 min
Explains coordinated omission, where a closed-loop load test skips the slow samples during a stall, and how fixed-rate timing exposes them. Shows how to check a load…
- Load testing models: failure analysisAdvanced · 4 min
Explains how closed and open workload models differ in what happens to arrivals when the system slows, and which model fits public traffic. Shows how to write an…
- Queueing theory: operational verificationAdvanced · 4 min
Explains how utilization drives waiting time in a queue, and why waiting grows sharply near full use even before the CPU is at 100 percent.
- Little law: failure analysisAdvanced · 4 min
Explains Little's law, which relates the number in a system to its arrival rate and time in system, and how to use it to locate a slowdown.
- CPU saturation: operational verificationAdvanced · 4 min
Explains how pressure stall information separates CPU saturation from high utilization and load average inflated by I/O wait. Shows how to read PSI for a host or a…
- CPU flamegraphs: failure analysisAdvanced · 4 min
Explains how CPU flame graphs turn sampled stacks into a picture of where CPU time goes, and what they cannot show about blocked time. Shows how to check a graph…
- Off CPU profiling: operational verificationAdvanced · 4 min
Explains off-CPU time, the time threads spend blocked or waiting, which CPU profiles miss. Shows how scheduler statistics and switch traces expose it, and how to split…
- Heap profiling: failure analysisAdvanced · 4 min
Explains heap profile views, in-use and allocation, and how to tell a real leak from heavy allocation that the collector frees. Shows how to compare two profiles taken…
- Memory fragmentation: operational verificationAdvanced · 4 min
Explains memory fragmentation, where free memory exists but no contiguous block of the needed size is free, and how buddyinfo and compaction show it. Shows when to…
- Garbage collection: failure analysisAdvanced · 4 min
Explains the Go heap goal and the cost of each collection cycle, and how GOGC and the live heap set the trade between memory and CPU.
- Disk latency: operational verificationAdvanced · 4 min
Explains how block device counters give mean read and write latency and queue time, and why low device utilization can hide slow reads. Shows how to derive latency from…
- IOPS throughput: failure analysisAdvanced · 4 min
Explains how IOPS, bandwidth, block size and queue depth relate, and why a bandwidth quote alone does not describe a random workload. Shows how to choose a test block…
- Network buffer tuning: operational verificationAdvanced · 5 min
Explain how socket buffer sizes cap TCP throughput on long links, and check the buffers a live connection uses before changing sysctl values on any host.
- TCP backlog: failure analysisAdvanced · 5 min
Explain how the TCP accept queue fills under load, why the listen backlog alone does not raise the limit, and how to read the queue and counters on a listening socket.