Topic domain
Performance Engineering
Measuring, modeling, and improving execution cost.
- Articles
- 80
- Clusters
- 8
- Foundational
- 24
- Intermediate
- 32
- Advanced
- 24
Measurement
10Benchmark design and statistical validity.
- Warmup Transients and Detecting Steady State in Timed Loops
- Clock Sources and the Resolution Floor of a Timing Call
- Measurement Overhead and the Code the Compiler Deletes
- Quantiles from Finite Samples and Their Confidence Bands
- Confidence Intervals for the Difference Between Two Benchmark Runtimes
- Power, the Minimum Detectable Effect, and the Cost of Repeated Looks
Profiling
10Sampling, instrumentation, and flame graphs.
- How Sampling Profilers Turn Timer Interrupts into Execution Profiles
- How Many Samples a Profile Needs Before Its Numbers Mean Anything
- Mapping Sampled Addresses Back to Functions and Source Lines
- Stack Unwinding With and Without Frame Pointers
- Building a Flame Graph from a Set of Stack Samples
- Counting Function Calls Without Losing the Call Count to Inlining
Queuing, tails, and coordination omission.
- Little's Law: Concurrency, Arrival Rate, and Time in System
- Utilization and the Nonlinear Growth of Waiting Time
- Coordinated Omission and the Samples a Closed Loop Never Takes
- Means, Percentiles, and What a Tail Measurement Can Answer
- Decomposing End-to-End Latency into Waiting and Serving
- Aggregating Percentiles Across a Fleet Without Losing the Tail
Contention, batching, and parallelism.
- Throughput, Latency, and Why Concurrency Is Not Parallelism
- Amdahl's Law and the Serial Fraction That Caps Speedup
- Critical Sections, Futexes, and What a Mutex Really Costs
- Batching and the Amortization of Per-Item Cost
- Sharded Counters, Padding, and False Sharing
- Bounded Queues and Backpressure as Throughput Control
Allocation cost and locality effects.
- The Cost Tiers of a Single Allocation Request
- Bytes Fetched per Field: Layout as a Bandwidth Decision
- Working Set Size and the Miss-Rate Cliff
- Dependent Loads and the Cost of Pointer Chasing
- First-Touch Costs in Demand-Paged Memory
- Geometric Growth, Copy Cost, and Peak Footprint
Syscall cost, buffering, and devices.
- Where a read() Syscall Spends Time Before It Reaches the Data
- What write() Actually Does Before Data Leaves the Process
- Readahead Policy and the Read Sizes the Page Cache Actually Sees
- What fsync Guarantees and What It Costs on Real Devices
- Alignment, O_DIRECT, and the Cost of Bypassing the Page Cache
- Zero-Copy Paths: What sendfile, splice, and mmap Remove
Load models and headroom.
- Headroom Arithmetic: Turning a Load Forecast into a Replica Count
- Utilization Targets and the Knee of the Latency Curve
- Little's Law as a Consistency Check on Load Measurements
- Amdahl and Gustafson Bounds in Capacity Models
- Variance and the Effective Capacity of a Replica Pool
- Provisioning Lag and the Reaction Time of a Fleet
Prioritizing work by measured impact.
- Amdahl's Law as a Ceiling on Optimization Returns
- Ranking Optimization Candidates by Expected Payoff
- Why the Busiest Stage Is Not Always the Critical Path
- Removing Work Before Making It Faster
- Measuring What a Component Costs by Taking It Away
- The Break-Even Hit Rate for Adding a Cache
All Performance Engineering articles
- Oct 20, 2026 Sharded Counters, Padding, and False Sharing Why two independent counters placed next to each other can cost more than one shared counter, how cache-line granularity forces padding, and what sharding gives up in exchange.
- Sep 30, 2026 Coordinated Omission and the Samples a Closed Loop Never Takes How a benchmark that waits for each response before issuing the next one systematically excludes the worst delays from its own histogram, and the interval-based correction that recovers them.
- Sep 22, 2026 Mapping Sampled Addresses Back to Functions and Source Lines A sample records a virtual address; turning it into a function name, a file, and a line number requires load addresses, symbol tables, and debug information that frequently disagree.
- Sep 15, 2026 Comparing Two Profiles to Find a Regression That Is Real A differential flame graph is a difference of two sample sets on a shared layout; the normalisation, the noise floor, and frame identity each decide whether a red bar means anything.
- Aug 27, 2026 Power, the Minimum Detectable Effect, and the Cost of Repeated Looks How sample size is determined by the smallest effect worth detecting rather than by convenience, why peeking at a running experiment inflates false positives, and what sequential designs cost in exchange.
- Aug 22, 2026 Utilization and the Nonlinear Growth of Waiting Time Why queue delay rises faster than load, how the shape of the curve depends on service-time variability rather than on arrival statistics, and why a utilization target is a statement about tail risk.
- Jul 25, 2026 Load Balancing Policy and Effective Capacity How assignment policy, connection reuse, and request-class knowledge change the throughput a pool can sustain, and why a policy tuned for latency can reduce total capacity.
- Jul 21, 2026 Decomposing End-to-End Latency into Waiting and Serving How to split a request's elapsed time into the intervals where it was queued, in flight, or actually being executed, and why the sum of stage timers usually exceeds the total.
- Jul 7, 2026 What fsync Guarantees and What It Costs on Real Devices The ordering and durability contracts of fsync, fdatasync, and sync_file_range, how a device cache flush turns them into round trips, and where the guarantee quietly ends.
- Jun 28, 2026 Timeout Budgets, Deadline Propagation, and the Arithmetic of Retry Amplification How a timeout that is short relative to the service latency turns into extra load, why retries must be bounded per request rather than per attempt, and how a remaining-time budget propagates across tiers.
- Jun 17, 2026 Capacity Failure Modes Under Peak Load The specific mechanisms that turn a load peak into an outage: queue overload, resource leaks under retry, cold cache amplification, and the asymmetry between degradation and recovery.
- Jun 17, 2026 Work Stealing and the Cost of Task Granularity How per-worker deques with stealing keep locality for producers and absorb imbalance, why the victim is chosen at the tail, and where the stealing overhead overtakes the gain.
- Jun 5, 2026 Provisioning Lag and the Reaction Time of a Fleet How the delay between a load increase and usable capacity determines the headroom a plan needs, why boot time and image pull dominate the loop, and how the lag compounds with forecast error.
- May 25, 2026 Zero-Copy Paths: What sendfile, splice, and mmap Remove Which memory copies each zero-copy interface eliminates, which ones remain, and the page-cache, alignment, and lifetime constraints that decide whether the saving is real.
- May 21, 2026 Utilization Targets and the Knee of the Latency Curve Why latency stays flat until utilization approaches one and then rises sharply, how arrival variability moves the knee, and how to locate the operating point from measurements rather than doctrine.
- May 19, 2026 What write() Actually Does Before Data Leaves the Process How a buffered write lands in the page cache as dirty pages, when the kernel begins writing them back, and why the call returning does not mean the bytes are on the device.
- May 15, 2026 Shrinking Footprint with Narrow Handles and Inline Storage How pointer-width reduction, index handles, and inline small-object storage cut the bytes a traversal must move, and what each technique costs in indirection.
- May 8, 2026 Bandwidth-Bound and Latency-Bound Work How to tell which of the two memory limits a kernel is actually hitting, why the remedy differs completely, and how the arithmetic intensity decides.
- May 1, 2026 Batching and the Amortization of Per-Item Cost How grouping work converts a fixed per-operation cost into a per-batch cost, where the delay comes from, and why batch size is a throughput constraint rather than a tuning knob.
- Apr 26, 2026 Stack Unwinding With and Without Frame Pointers How a profiler recovers a call chain from registers and memory, why omitting frame pointers breaks the cheap method, and what DWARF call-frame information costs instead.
- Apr 24, 2026 Means, Percentiles, and What a Tail Measurement Can Answer Why the mean and the p99 are answers to different questions, what a percentile of a pooled sample says about an individual request, and the sub-second window where percentile estimates become unstable.
- Apr 23, 2026 Hedged Requests, Tied Requests, and the Cost of Buying Back the Tail When issuing a second copy of a request reduces latency enough to justify the extra work, how to pick the hedge delay from the latency distribution, and why request tying costs a round trip.
- Apr 17, 2026 When Fragmentation Turns into a Latency Problem How address-space spread and shrinking TLB reach convert fragmentation from a capacity problem into a latency one, and how to detect the shift.
- Apr 2, 2026 Amdahl and Gustafson Bounds in Capacity Models Why a serial fraction caps the throughput a fixed workload can reach, how scaled workload changes the bound, and what the usable-scalability limit means for sizing a fleet.
- Mar 30, 2026 Measurement Overhead and the Code the Compiler Deletes How dead-code elimination, loop unrolling, and constant folding silently remove the work a benchmark claims to time, and which structural defences keep the timed region intact.
- Mar 16, 2026 How Sampling Profilers Turn Timer Interrupts into Execution Profiles Why a profiler interrupts rather than instruments, what each sample records, and how timer frequency and signal delivery bias the result.
- Feb 27, 2026 Readahead Policy and the Read Sizes the Page Cache Actually Sees How the kernel detects sequential access, how far ahead it reads, and why a reader that is fed by readahead measures the cache rather than the storage device.
- Feb 20, 2026 Amdahl's Law and the Serial Fraction That Caps Speedup Why a fixed serial portion of a workload bounds speedup no matter how many processors are added, how to estimate that fraction, and where the law stops describing real scaling.
- Jan 13, 2026 Measuring Time a Thread Spends Blocked Instead of Running on-CPU sampling cannot see waiting; reconstructing blocked time requires scheduler tracepoints, state transitions, and a model of what "running" excludes.
- Jan 6, 2026 Why the Busiest Stage Is Not Always the Critical Path Pipeline stages, parallel branches, and slack explain why time spent in the hottest function may not extend total latency, and how to identify the segment that actually does.
- Dec 10, 2025 Optimizations That Move Cost Instead of Removing It Batching, precomputation, and compression reduce one metric by increasing another, so measuring only the targeted metric counts a trade as a win.
- Nov 6, 2025 Choosing a Workload Whose Profile Describes Real Traffic A profile is a property of the run as much as of the program; input distribution, cache state, concurrency, and clock behaviour all decide whether the result transfers.
- Nov 2, 2025 Geometric Growth, Copy Cost, and Peak Footprint Why dynamic arrays grow by a constant factor, where the amortised argument breaks down, and how the transient copy raises a program peak memory.
- Nov 1, 2025 Averaging Ratios and the Geometric Mean in Composite Scores Why the arithmetic mean of normalised ratios depends on the reference machine, when the geometric mean is the right summary, and where the harmonic mean is forced by the arithmetic of rates.
- Oct 18, 2025 Throttling I/O with cgroup Controllers and What the Limits Share How the I/O controller accounts and limits bandwidth and IOPS per group, why a throttle applies to a queue rather than to a process, and how the limits interact with the page cache and with each other.
- Oct 15, 2025 Headroom Arithmetic: Turning a Load Forecast into a Replica Count How arrival rate, service time, and utilization combine into a replica count, why the nonlinearity of queueing makes the last few percent of utilization decisive, and how safety margins compound.
- Oct 8, 2025 Critical Sections, Futexes, and What a Mutex Really Costs The path a mutex takes from uncontended atomic to sleeping thread, how Linux futexes avoid a syscall in the common case, and why uncontended cost predictions fail under contention.
- Sep 20, 2025 How Many Samples a Profile Needs Before Its Numbers Mean Anything Sampling profiles are binomial estimates, not measurements; the arithmetic that turns sample counts into confidence intervals, and the differences a run can actually resolve.
- Aug 15, 2025 First-Touch Costs in Demand-Paged Memory What a program actually pays when it writes to freshly allocated memory, and how page faults, zeroing, and transparent huge pages decide the bill.
- Jul 30, 2025 Bounded Queues, Backpressure, and What to Drop Under Overload Why an unbounded queue converts a capacity problem into a latency problem, how a queue bound is derived from a target latency, and the shedding policies that decide which requests are refused.
- Jul 10, 2025 Choosing an Objective Function for a Mixed Workload Means, percentiles, and goodput weight a workload mix differently, so the objective determines which optimization looks best before any measurement is taken.
- Jun 20, 2025 Little's Law as a Consistency Check on Load Measurements How the identity connecting concurrency, arrival rate, and residence time exposes inconsistent measurement sets, plus the sampling errors and boundary conventions that make a correct system appear to violate it.
- Jun 6, 2025 Where a read() Syscall Spends Time Before It Reaches the Data The fixed work the kernel performs on every read, why cost per byte collapses as buffers shrink, and which interfaces amortise the transition.
- Jun 4, 2025 The Cost Tiers of a Single Allocation Request One allocation call can cost tens of cycles or tens of thousands depending on which tier it stops at: thread cache, shared free list, kernel mapping, or first write.
- May 29, 2025 Profiling JIT Code and Runtimes That Manage Their Own Memory Generated code has no ELF symbol table and moved objects confuse address attribution; profiling a managed runtime requires per-method code maps and object-aware heap analysis.
- May 18, 2025 Bounded Queues and Backpressure as Throughput Control Why an unbounded queue converts overload into latency and then into collapse, how a bound pushes the refusal upstream, and which drop policy makes refusal cheap.
- May 17, 2025 Measuring What a Component Costs by Taking It Away Ablation measures a component by disabling it and observing the change in a metric, which answers a different question than profiling and is easy to apply incorrectly.
- Apr 15, 2025 NUMA Placement and the Cost of Touching Another Socket's Memory How first-touch page placement decides which socket holds a page, what a remote access costs relative to a local one, and why thread pinning without memory placement leaves the cost in place.
- Apr 2, 2025 Ranking Optimization Candidates by Expected Payoff How to combine a measured cost share, a realistic achievable factor, and the probability that a change survives review into one comparable score per candidate.
- Mar 13, 2025 io_uring Submission and Completion Ring Mechanics The shared-memory rings that carry requests into the kernel and results back out, how batching and polling remove syscalls, and where the cost model replaces transition overhead with memory ordering.
- Feb 22, 2025 Warmup Transients and Detecting Steady State in Timed Loops Why the first iterations of a timed loop measure a different program, which subsystems are still converging, and how to locate the transition into steady state rather than assuming it.
- Jan 29, 2025 Allocation Churn and the Locality of Recycled Memory Why the reuse distance of a freed block, not the speed of the allocator, sets the performance of allocate-and-free loops in long-running programs.
- Dec 25, 2024 Throughput, Latency, and Why Concurrency Is Not Parallelism How the relation between completion rate, response time, and in-flight work constrains every scaling decision, and why overlapping waits and splitting computation buy throughput in different ways.
- Dec 13, 2024 Work Distribution, Join Barriers, and Idle Time at the End of a Stage Why splitting a stage across parallel workers shortens the mean but lengthens the tail, what a join barrier does to a request that has one slow participant, and the arithmetic of straggler cost.
- Nov 23, 2024 Removing Work Before Making It Faster Why eliminating an operation dominates optimizing it, how redundant computation and over-fetching hide in ordinary code, and what changes when work is removed rather than accelerated.
- Nov 22, 2024 Alignment, O_DIRECT, and the Cost of Bypassing the Page Cache The alignment and size rules a direct I/O request must satisfy, which part of the page-cache path disappears and which remains, and the cases where the bypass loses rather than wins.
- Nov 12, 2024 Clock Sources and the Resolution Floor of a Timing Call How monotonic clocks, TSC reads, and syscall-based time differ in cost and granularity, why a measured interval is a difference of two uncertain readings, and how the floor limits what a benchmark can resolve.
- Nov 2, 2024 Feedback Effects That Change Service Demand How retries, timeouts, circuit breakers, and admission control alter the load a system receives, and why a positive feedback loop makes a capacity plan invalid at exactly the moment it is needed.
- Oct 28, 2024 Bytes Fetched per Field: Layout as a Bandwidth Decision Why array-of-structs and struct-of-arrays trade differently against cache line granularity, and how to compute the bytes moved per field actually read.
- Oct 16, 2024 Confidence Intervals for the Difference Between Two Benchmark Runtimes Why two overlapping intervals can still hide a real difference, how the standard error of a difference is computed from paired or independent samples, and what a ratio estimate needs before it is trustworthy.
- Sep 16, 2024 Write Amplification and Garbage Collection in Flash Translation Layers Why a flash device rewrites more bytes than it is given, how the mapping granularity decides the multiplier, and which access patterns turn a modest write rate into sustained internal copying.
- Jun 12, 2024 Recognizing the Point Where Further Optimization Stops Paying When remaining candidates fall inside the measurement noise floor or the untouchable remainder dominates, the correct action changes from optimizing to sizing or redesigning.
- Jun 4, 2024 Little's Law: Concurrency, Arrival Rate, and Time in System Why the identity L = λW holds without any assumption about the arrival distribution, how the choice of system boundary changes all three terms at once, and where the accounting breaks when requests are dropped or retried.
- May 26, 2024 Amdahl's Law as a Ceiling on Optimization Returns How the fraction of time a change addresses bounds its total payoff, why the bound is a filter rather than a forecast, and where the fixed-workload assumption breaks.
- Apr 28, 2024 Quantiles from Finite Samples and Their Confidence Bands What a p99 computed from a few hundred observations actually estimates, how the order statistic maps to a binomial interval, and why tail claims need sample sizes that frequently do not exist.
- Apr 2, 2024 The Universal Scalability Law: Why Throughput Peaks and Then Falls How contention and coherency terms extend Amdahl's bound into a curve that predicts a maximum, what retrograde scaling looks like, and how to fit the two parameters from measurements.
- Apr 1, 2024 External Validity and the Limits of What a Benchmark Shows Which conditions a benchmark result actually holds under, how data scale and load level change the regime being measured, and why optimising against a fixed workload stops predicting its own future.
- Mar 24, 2024 Writeback Scheduling and Merging at the Block Layer How adjacent and overlapping requests become larger ones, what an elevator does with a mixed read and write stream, and why device queue depth changes the picture more than the scheduler name.
- Jan 9, 2024 Distribution-Free Comparison When the Data Is Not Normal What rank tests actually test, how permutation and bootstrap procedures produce intervals on a benchmark difference without assuming a shape, and where each method loses power.
- Nov 26, 2023 Compare-and-Swap Retry Loops Under Contention Why a lock-free read-modify-write loop that is faster than a mutex with two threads is slower with twenty, and how to bound, batch, or replace the retry.
- Oct 12, 2023 Counting Function Calls Without Losing the Call Count to Inlining Entry-point instrumentation gives exact invocation counts and a cost model that sampling cannot; inlining, tail calls, and recursion each break the correspondence between hooks and source functions.
- Sep 19, 2023 Modeling Throughput Growth and Service Demand Drift Why per-request cost rises across releases and with load, how to separate traffic growth from efficiency change in a capacity series, and what a drift budget means for a sizing horizon.
- Aug 30, 2023 Pareto Frontiers When No Single Setting Wins Configuration spaces have several objectives that trade against each other; dominance analysis reduces them to a frontier and explains why the frontier, not a score, is the deliverable.
- Mar 21, 2023 Working Set Size and the Miss-Rate Cliff Why memory performance degrades in a knee rather than a slope, how capacity and associativity produce the knee, and how to find its location empirically.
- Mar 1, 2023 Building a Flame Graph from a Set of Stack Samples Flame graphs are a sorted trie of stack prefixes; the merge, the sort, and the width computation each decide what the picture can and cannot show.
- Feb 28, 2023 Variance Reduction by Pairing, Interleaving, and Blocking How separating between-session drift from within-session noise reduces the number of runs a comparison needs, why alternation cancels slow drift but not carryover state, and how to schedule the two versions.
- Dec 26, 2022 Variance and the Effective Capacity of a Replica Pool How service-time variance and partially correlated demand shrink the throughput a pool can sustain at a latency target, and why replica count, not average load, sets the tail.
- Dec 21, 2022 Dependent Loads and the Cost of Pointer Chasing Why linked structures serialise the memory system, how a dependent load chain differs from independent accesses, and what prefetchers cannot see.
- Aug 17, 2022 Aggregating Percentiles Across a Fleet Without Losing the Tail Why per-host percentiles cannot be combined directly, how cumulative bucketed histograms make merging exact, and what temporal aggregation does to the tail that spatial aggregation does not.
- Jul 27, 2022 The Break-Even Hit Rate for Adding a Cache A cache costs a lookup on every access and pays back only on hits, which gives a hit-rate threshold below which the cache makes the system slower.