Language

Measured Performance: Method and Data

The method, the three-round medians and variance ranges, the real req/s on the dynamic tier, and the structural reasons such as "no database write per request" and the derivative-image slots.

"Is it fast?" cannot be answered until someone says clearly what is being measured, under which conditions, and how much it varies. This page gives the method, gives the numbers, and also says what those numbers may not be used for.

The method (reproducible, the script is in the repository)

The harness warms up each page for 10 seconds, then runs 3 rounds of wrk -t4 -c20 -d10s --latency, and reports the median throughput of the three rounds together with the range; HTTP/1.1 keep-alive, no request compression, no conditional GET. Two details decide how the result should be read: first, cache-control in the response headers does not mean the load generator is hitting a cache — which is why "dynamic" and "front cache" are separate tiers in the matrix and cannot be compared inside one table; second, P50/P99 are the median of each window's percentiles, not a recomputation over the three rounds merged, so they represent "the percentiles of a typical round", not global tail latency.

What this machine measured on the dynamic tier (2026-10-18, an exploratory baseline)

Page HTML bytes median req/s three-round range P50 P99
Home 24,130 1,693.76 1,686.79–1,699.46 11.58ms 18.95ms
Detail 33,264 748.75 464.83–798.85 25.78ms 49.29ms

The same round also measured several other systems, each on its home and detail pages (same machine, same harness, same tier). No ranking is published here, because this matrix is exploratory: the runtimes have different warm-up histories (PHP restarts its own separate FPM pool before each tier, while the resident processes are not restarted), page byte sizes differ, and the themes are not equally complex. Reading it as a "minimum configuration requirement" or as "who is how many times faster than whom" goes beyond the evidence.

The detail row's three-round range 464–799 is obvious variance, so the correct reading is "this order of magnitude, unstable", not "about 750". The home page's three rounds nearly coincide (1686–1699); that is a number you may quote.

Why these numbers look like this (the structural reasons)

A single process terminating TLS directly, with no caching layer in front, so every request really does walk the whole path "read snapshot → render → emit bytes". The cache policy on public pages is public, max-age=60, must-revalidate — within that minute the browser answers, and the server is asked once. So the server load of a real site is far below the benchmark numbers, and the price is "right after you edit the body, refreshing yourself within that minute may still show the old one".

One rule already paid for in tuition: a request path that visitors hit performs not a single database write. In the parent project, "a synchronous INSERT per request plus a single SQLite connection" pinned public-page throughput at about 43 req/s — not because queries were slow, but because the write lock serialised concurrency into one queue. So the current design is: view counts first go into an in-memory counter and a worker merges them into the database in one transaction per minute; request guards only count and never write; and a derivative image is skipped rather than queued when it cannot get a processing slot.

Measured numbers on the upload and image side

Decoding one 12MP phone photo measured 64MB of heap + 1.16 seconds, and Go puts no cap on concurrent requests — one drag of 20 files by operations means a dozen-plus 64MB allocations. So derivative generation has a concurrency slot (2 at a time) and a 16M pixel ceiling, and if it cannot get a slot or exceeds the ceiling, it skips, with the page falling back to the original image. The cost is written in the documentation: phone photos above 16M pixels get no derivative tier, and the traffic that tier would have saved was traded for memory safety. Rolling back a successful upload into a 500 in order to gain a pure optimisation is the worst failure shape.

Measured numbers on the queue and batch side

Site-wide translation runs one item at a time (the next starts only when the previous finishes), with a 120-second ceiling per model call; time spent queued does not consume that budget. One round of 146 translation groups measured 18.2 minutes end to end — numbers like "how long until everything is translated" only exist after a real run, and anything estimated will come out optimistically.

How to reproduce it yourself

python3 scripts/bench-cms-matrix.py <targets.json> <output-dir>, with the raw data and configuration (including the nginx/FPM setups used as controls) left in docs/bench-2026-10-18/. What you change is the addresses and pages in targets, not the number of rounds or the concurrency — that would make your numbers incomparable with this set. Any claim of the form "we are N times faster than X" should not be quoted if it cannot supply the method and the variance range from this section, including claims we wrote ourselves.