chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
The bench reaches the PDS over https, and counts connecting
Merged Approved
This puts the bench behind an https front, adds a TCP handshake round trip in the delay proxy, and measures the appview push and the 1/4/16/64 agent swarms. tests/common gains tls_front, and performance.md is remeasured.
I found no bugs. These are the things I checked:
- The delayed first bytes in
pipekeep chunk order, becausemax(open) + delaynever goes backwards. KNOTLESS_CA_CERTSand--indexboth exist in the code.knotless-serveis spawned afterKNOTLESS_SERVICEis set, so it reaches the PDS through the same https proxy.- The swarm branch names don't collide when the agent clones are reused across swarm sizes.
The changes are in an example, test helpers and docs, so no change file is needed. I didn't run the bench, so the numbers in the doc are the author's own measurements, and they say so under Shortcomings. I left README.md's older table alone, as the body says.
All checks have passed
8 passed, 3 skipped
Merged as 1bcffd3
The performance page's times left out what a command spends connecting to a PDS, and what a push asks an appview. The bench now reaches the PDS as one on the network is reached, over https, and the page is measured again: a push at 50 ms is 296 ms, where the page said 205, and 507 ms from a client with an appview, as every installed one has. That last number is the one to read this for.
Claude Fable 5.2
What changes
The bench (
crates/knotless/examples/bench.rs) putsharness/tls-proxy.mjsin front of the PDS, with a certificate it makes for 127.0.0.1, and its delay proxy holds what a client sends first one round trip more, as TCP's handshake would.--plainis the bench as it was: plain http, connecting free, which leaves the requests' round trips alone. It takes--rounds(4) rounds, each on a repository of its own, and counts their samples together, so a p95 is of 60 samples and not 15, and prints the slowest. Three things are new in what it measures: a push of a branch by a client with an appview (knotless-servestarted with an index, behind the same proxy), agents pushing a branch each at 1, 4, 16 and 64 at once with pushes a second, and the cache's mirror warmed before the commits are timed, as the push was already.tests/commongainstls_front, an https front with a certificate and host given;tls_proxyis that with the harness's.docs/reference/performance.mdis measured again with it. Round trips gains two rows, connecting and the appview's two requests. Benchmarks is the https run at 50 ms, and says what is still kinder than a real PDS. Two sections are new: Many branches at once, and Other round-trip times, the bench at 0, 100 and 200 ms with each operation's round trips as the slope, and how many of them are requests.Why
The page's push was 205 ms at 50 ms of round-trip time: two requests and what the machine does. Every command is a process of its own, so over https each also pays TCP's handshake and TLS's, two round trips, before its first request. And a client with
KNOTLESS_APPVIEWset, which is the default, asks the appview two things after a push of a branch, one after the other on a connection of its own, before git hears the push landed: four round trips more. Measured so, a push is 4.0 round trips and with an appview 8.0.Measuring at more than one latency is also what found
repo commitreading the repository twice, fixed in repo commit reads the repository once, a round trip less: its slope was 3 where the page said 2. The page's numbers here are with that fix.How it was checked
Run here, on an M1 Pro, release build: over https at 0, 50, 100 and 200 ms with four rounds each, and
--plainat 0 and 200 ms with two. The slopes from 0 to 200 ms came out whole numbers but one: push 4.03, fetch 3.02, push with an appview 8.01,repo commit4.05, both clones 3.0; of them requests, from--plain, 2.02, 1.01, 4.03, 2.03, 1.0.cargo clippy -p knotless --example bench -- -D warningsandnode harness/docs.mjspass here.check,testanddocsare left to CI: every test binary includestests/common.Shortcomings
README.mdstill has a table older than the one this replaces.