Performance

jolt bench runs ApacheBench (ab) against plumeria and two minimal JVM Ring servers, Undertow and Jetty, all on the same bare handler, and optionally against ring-chez-adapter, the other HTTP server on Jolt. benchmark/README.md has the method, the caveats and every run so far.

Latest run

2026-11-29, jolt 0.8.31, one M-series Mac with ab on the same machine, ab -n 10000, one run at host load 6 to 13, req/s:

serverplain c=10keep-alive c=10plain c=100keep-alive c=100
undertow24.3k65.7k24.0k90.9k
jetty19.6k40.6k23.7k74.5k
plumeria16.9k35.5k16.0k32.1k
ring-chez-adapter :threads20.2k82.7k22.1k3.7k

Rows compare only within one run on one machine. That Mac caps new connections at a few thousand a second for every server, so the plain cells mostly measure the host. Read the keep-alive cells for the servers.

Where plumeria's time goes

The keep-alive gap to the JVM servers isn't fibers. A bare jolt.socket loop costs about the same server CPU per request with a fiber per connection as with a thread per connection, and fewer fiber carriers didn't help.

Two rounds of work cut plumeria's own request path. On jolt 0.8.32 (2026-11-30, load 7.5-9.4) plumeria used 88 µs of server CPU per keep-alive request with one client and about 140 µs with ten. A bare loop that reads a head and writes a fixed response used 39 and 75-80 µs in the same runs, and undertow used 26-28 µs with one client in an earlier run on 0.8.31. When plumeria's steps were stubbed out one at a time (on 0.8.31), parsing the head cost about 11 µs and rendering the response about 6. Every other step came in under 5 µs, inside the run-to-run noise, and the head parser has been cut since.

With one client, plumeria spends about 60 µs more per request than undertow. About 12 µs of that is the runtime's socket work, which the bare loop pays too. The other ~50 µs is plumeria's request path, spread over many steps of a few µs or less each. That code also runs two to three times slower inside the server than it does in a tight loop.

Other cells

  • HTTPS (TLS 1.2, an ECDSA P-256 certificate): keep-alive at 0.75 of the same run's plaintext with 10 clients and 0.56 with 100, though host load climbed during those cells (an earlier, quieter run gave 0.85 and 0.76). A new connection costs about 0.86 ms of server CPU, handshake and request together. Ten parallel openssl s_time clients opened 3,812 new connections a second. ab alone tops out near 400 a second because its single client is the limit. A browser reuses its connection, so most traffic rides the keep-alive numbers.
  • gzip: a 12.8 KB JSON page ran at 23.0k / 23.9k req/s bare and 10.9k / 15.8k compressed to 1,317 bytes. Over loopback the bytes cost almost nothing, so that gap is compression's CPU price. A client that doesn't ask for gzip pays nothing measurable.
  • Large bodies: a 32 MB GET takes 0.02-0.03 s over loopback, a streamed 32 MB POST about 0.03 s, and a buffered one 0.05-0.07 s.
  • Static files (2026-11-06): a cached 12 KB stylesheet at 22-27k req/s, and a 64 MiB file at about 3.3 GB/s; see static-files.md.
  • Handler pools: about 8 µs per request run on a pool; see handlers.md.
  • Handler deadlines (:handler-ms, 2026-12-01, jolt 0.8.32): with the option on, each handler runs on its own fiber and the connection fiber joins it. examples/bench_server.clj took HANDLER_MS=30000, and ab -k -n 20000 against /plaintext on two servers started side by side gave, over three rotated rounds at host load 7, req/s with the option off then on: 13.3k and 10.3k at c=1 (median; off ranged 10.7k to 14.4k), 40.6k and 30.7k at c=10. That reads as roughly 20 µs more per request with one client and 8 µs with ten, in the same range as the 8 µs a handler pool costs. The off runs varied by 30% at c=1, so treat the c=1 figure as an upper bound. With the option off a request pays a nil check and a map lookup.

jolt bench-micro times the request parser and renderer on their own, in microseconds per call.