A larger page size that fits more address space into a smaller TLB.

Huge pages cut TLB misses at the cost of flexibility

Databases and high-throughput servers often win, but they pay by needing contiguous memory and a pool sized in advance, so the trade is architectural, not free. Why 4 KB hurts On most architectures a standard page is 4 KiB, and the TLB can hold only a limited number of translations. A database or high-throughput server that touches gigabytes typically walks a working set of millions of pages, so it keeps missing the TLB, the hardware then has to walk the page table to find each mapping. The cost is not the page itself but the constant page-table walks, and at million-page working sets the misses outrun how fast the TLB can be refilled. Bigger pages mean each entry covers more memory, so the same working set needs far fewer entries, which is exactly the relief a memory-heavy workload feels. ...

December 21, 2027 · 5 min · XB Field Notes
A header that governs whether, how long, and for whom a response may be reused.

Cache-Control is a contract between cache and origin

A cache policy needs a behavioral test, not just a header-presence check. Two responses can both contain max-age yet behave differently because one also requires validation or prohibits storage. The request matters too: a browser can bypass an otherwise reusable copy without changing the origin’s response policy or deleting an older cached entry. ...

December 20, 2027 · 5 min · XB Field Notes
Running a query to inspect each step's actual rows, time, and buffers.

EXPLAIN ANALYZE runs the query to show real cost

EXPLAIN describes a PostgreSQL execution plan; EXPLAIN ANALYZE also executes the statement and measures its work. The useful comparison is between estimated rows and observed rows at the same node. Neither number is a verdict by itself: an estimate is a model, while a measurement describes one execution under particular data, cache, concurrency, and instrumentation conditions. ...

December 16, 2027 · 4 min · XB Field Notes
A Postgres view of cumulative statistics per normalized query.

pg_stat_statements finds the queries that cost the most

Because pg_stat_statements aggregates every execution of one query shape, it turns a vague “the page is slow” into a ranked table. The setup is a config line and a restart; the payoff is knowing which of your query shapes actually owns the clock. ...

December 12, 2027 · 5 min · XB Field Notes
Each endpoint advertises its own scale; SYN window fields remain unscaled.

TCP window scaling enlarges receive-window encoding in each direction

TCP’s header has a 16-bit receive-window field. Window scaling lets established connections interpret that field using a shift negotiated during setup, allowing a receiver to advertise more than 65535 bytes of space. The two directions can use different shifts. The extension enlarges the encoding of receive-window information; it does not directly enlarge every buffer or guarantee that a sender will keep that much data in flight. ...

December 2, 2027 · 6 min · XB Field Notes
A load spike that happens when many cached values expire at the same moment and every client refills at once.

A cache stampede hits when expiry syncs

A cache stampede occurs when concurrent misses cause redundant work against the same dependency. Synchronized expiration is one trigger, but eviction, a cold deployment, or cache unavailability can create the same burst. A single popular key can be enough. The useful question is how many rebuilds reach the source while one result is still being computed. ...

November 22, 2027 · 5 min · XB Field Notes
The server waits for the second request byte while Nagle waits for acknowledgment of the first.

Nagle and delayed ACK can stall the second part of a small request

Nagle’s algorithm reduces small TCP segments by holding additional short data while earlier data remains unacknowledged, unless enough data accumulates for a full segment. Delayed acknowledgment is a separate receiver behavior that can postpone an ACK briefly. The interaction matters when an application sends a request in multiple small writes and the peer needs the later bytes before producing a response. ...

October 31, 2027 · 6 min · XB Field Notes
A database reading every row in order because the table is tiny.

Full table scans win on small tables

An index is a bet: you pay write and storage cost up front so reads can skip most of the table. When a query genuinely needs most of the table, the bet loses: the engine descends a B-tree per row instead of reading the pages once in order. ...

September 16, 2027 · 5 min · XB Field Notes