cost: measure what a read pays to place a row #167

Merged
PerishFire merged 1 commit from land/cost/reach into main 2026-08-19 08:14:22 +00:00
Owner

Deciding whether liveness may be derived from a row's containment chain needed
a number for what walking that chain costs. The number turned out to be about
something larger, because the walk is not hypothetical: every operator read
already makes it.

sift asks see of each row it returns, weigh builds the row's anchor chain
before it consults a single grant, and anchors loads each ancestor with its
own point query. So a read of two hundred rows costs two hundred extra queries
per hop, always, whatever the grants say.

Flat    depth 0  sudo 0.36ms  operator 1.83ms  walk 1.47ms
Deep    depth 1  sudo 0.44ms  operator 18.10ms  walk 17.66ms
Deeper  depth 2  sudo 0.36ms  operator 33.24ms  walk 32.88ms

Two hundred rows, ten reads each, in memory — so this is the floor, not the
disk case. A hop costs about eighty microseconds a row and the depths add up
linearly. At depth two an operator pays ninety times what the same read costs
without authority.

The grant seeded here is all over the unit, the widest there is, and it still
pays: weigh computes the chain first and reads the deeds second. Nothing in
the walk is used when a wide grant answers, which is the case this estate's
seeds mostly are.

The immediate question is answered — deriving liveness from the chain is free
for an operator read, because the ancestor rows are loaded already and their
expiry travels with them. What the measurement found instead is that the thing
it would ride on is expensive on its own terms, and unmeasured until now.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

Deciding whether liveness may be derived from a row's containment chain needed a number for what walking that chain costs. The number turned out to be about something larger, because the walk is not hypothetical: every operator read already makes it. `sift` asks `see` of each row it returns, `weigh` builds the row's anchor chain before it consults a single grant, and `anchors` loads each ancestor with its own point query. So a read of two hundred rows costs two hundred extra queries per hop, always, whatever the grants say. Flat depth 0 sudo 0.36ms operator 1.83ms walk 1.47ms Deep depth 1 sudo 0.44ms operator 18.10ms walk 17.66ms Deeper depth 2 sudo 0.36ms operator 33.24ms walk 32.88ms Two hundred rows, ten reads each, in memory — so this is the floor, not the disk case. A hop costs about eighty microseconds a row and the depths add up linearly. At depth two an operator pays ninety times what the same read costs without authority. The grant seeded here is `all` over the unit, the widest there is, and it still pays: `weigh` computes the chain first and reads the deeds second. Nothing in the walk is used when a wide grant answers, which is the case this estate's seeds mostly are. The immediate question is answered — deriving liveness from the chain is free for an operator read, because the ancestor rows are loaded already and their expiry travels with them. What the measurement found instead is that the thing it would ride on is expensive on its own terms, and unmeasured until now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
cost: measure what a read pays to place a row
Some checks failed
guard / guard (pull_request) Failing after 1m34s
f2d24eade0
Deciding whether liveness may be derived from a row's containment chain needed
a number for what walking that chain costs. The number turned out to be about
something larger, because the walk is not hypothetical: every operator read
already makes it.

`sift` asks `see` of each row it returns, `weigh` builds the row's anchor chain
before it consults a single grant, and `anchors` loads each ancestor with its
own point query. So a read of two hundred rows costs two hundred extra queries
per hop, always, whatever the grants say.

    Flat    depth 0  sudo 0.36ms  operator 1.83ms  walk 1.47ms
    Deep    depth 1  sudo 0.44ms  operator 18.10ms  walk 17.66ms
    Deeper  depth 2  sudo 0.36ms  operator 33.24ms  walk 32.88ms

Two hundred rows, ten reads each, in memory — so this is the floor, not the
disk case. A hop costs about eighty microseconds a row and the depths add up
linearly. At depth two an operator pays ninety times what the same read costs
without authority.

The grant seeded here is `all` over the unit, the widest there is, and it still
pays: `weigh` computes the chain first and reads the deeds second. Nothing in
the walk is used when a wide grant answers, which is the case this estate's
seeds mostly are.

The immediate question is answered — deriving liveness from the chain is free
for an operator read, because the ancestor rows are loaded already and their
expiry travels with them. What the measurement found instead is that the thing
it would ride on is expensive on its own terms, and unmeasured until now.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Land-Source: cost/reach@3cf7e5db86
PerishFire force-pushed land/cost/reach from f2d24eade0
Some checks failed
guard / guard (pull_request) Failing after 1m34s
to 894cf324d9
All checks were successful
guard / guard (pull_request) Successful in 1m54s
guard / guard (push) Successful in 1m55s
2026-08-19 08:12:17 +00:00
Compare
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PerishLab/keel!167
No description provided.