Performance
-
A Heisenbug in a Go channel close that took me two weeks
The bug went away when I added logging. I know. Here is what was going on.
-
Tuning pgvector HNSW without giving up
Defaults are fine for toys. Here is what I changed to make pgvector work on a real dataset.
-
When GIN on JSONB is wrong
The default JSONB index in Postgres is GIN, and there's a very common case where that's the wrong choice.
-
Postgres 12 changed my CTEs and nobody told me
In Postgres 12 the optimization fence around CTEs came down. For us, that was mostly bad.
-
Flamegraphs in production without the fear
I used to be scared of perf record in prod. Then I wasn't.
-
The bitmap heap scan that ate our p99
A query that should have been a boring index scan turned into a full-table shuffle because the planner guessed wrong.
-
Switching to TCP BBR on the edge
We flipped our edge servers from CUBIC to BBR and measured the actual win for our traffic, which was smaller than the marketing suggests
-
Shaving 40W off my homelab rack
A weekend of measuring, swapping, and tuning reduced my rack's idle draw from 220W to 180W, with surprises
-
io_uring surprised me in a benchmark
Replacing an epoll loop with io_uring gave a 1.8x throughput boost in a naive benchmark, and a 0.9x loss in a realistic one
-
The OOM killer picked postgres. Here's why.
A staging VM's OOM killer reliably picked postgres over a misbehaving test process, and the fix was understanding oom_score_adj
-
ndots:5 and the DNS tax in Kubernetes
Every non-cluster DNS lookup in our pods was paying for five failed attempts first, and lowering ndots cut tail latency significantly
-
Tuning ZFS ARC on my Proxmox box
My Proxmox host kept ballooning to 60 GB of ARC and starving VMs, and the fix was not what I expected
-
A compiler optimization I didn't know existed until it broke
Tail call optimization, manual trampolines, and a crash that took me three days to trace to the optimizer
-
SIMD in Rust without losing my mind
Portable SIMD is real and it's good; a walkthrough of a checksum I vectorized and what surprised me
-
PLT and GOT: the indirection I never noticed
Dynamic linking on ELF is a two-step dance through the PLT and the GOT, and once you see it you cannot unsee it