aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-26 23:24:31 +0100
committereunhhu <[email protected]>2026-09-26 23:24:31 +0100
commit2e7ad9f8488d4f02c688ec24d6d0b571b3fa61ec (patch)
tree789183f42e3b68b797e7a09ef2b037e55d34ebfa /README.md
parenta51232af741cb952d7deb72f238c583919ababc0 (diff)
downloadpure-2e7ad9f8488d4f02c688ec24d6d0b571b3fa61ec.tar.gz
pure-2e7ad9f8488d4f02c688ec24d6d0b571b3fa61ec.zip
Write each commit's head just before its bytes: one range per sync (081)
A tree store commit wrote its bytes over the written zeros of the tail and its head into a slot at the start of the file: two ranges, and on the Pi's SD card a sync of two ranges costs about twice one (2.4 ms against 1.2 ms). A commit now writes a 128-byte record (its head) at the published end and its bytes right after it, then syncs once. Every 16 commits the head also goes into the older slot. The newest commit is found from the newer slot's head, or from the newest head this process has seen in the file while its record is still there, along the records whose bytes are whole; a torn record or bytes end the walk at the commit before, which the next writer overwrites. Slots of this format are PURETRE3; files of the earlier one are read and continued. Store commits went from 220-233/s to 371-396/s (p50 2.5 to 1.3 ms), and the scoreboard's durable posts from 13-16k/s to 21-26k/s with 64 connections and from 2.2-2.4k/s to 2.9-3.9k/s with 8, measured alternately with the previous build. The torn head check now tears a slot (the walk goes on from the other) and the newest record (a new process sees the commit before); a new check walks 42 commits from the slots, in a fresh process too, and stops at a damaged record.
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/README.md b/README.md
index 868c403..e9fcc16 100644
--- a/README.md
+++ b/README.md
@@ -5,9 +5,10 @@
in Pure's tree store, every event is a transaction, views are pure functions of state. The same spec becomes a
terminal UI, a CLI, spoken sentences and a web page through [Vega](/srv/git/vega.git), and an HTTP service through
`pure-serve` (views are GETs, inputs are POSTs with JSON bodies; answers are durable; views are read from a snapshot of
-the last save, so reads never wait for a sync). Measurements against axum and drogon on a Raspberry Pi 5 are in
-[075](docs/research/075-http-host-against-axum.md), [077](docs/research/077-apps-as-http-services.md) and
-[080](docs/research/080-snapshot-reads.md); the status table is [CHECKPOINT.md](CHECKPOINT.md). The text below
+the last save, so reads never wait for a sync; a commit is one contiguous write and one sync). Measurements against
+axum and drogon on a Raspberry Pi 5 are in [075](docs/research/075-http-host-against-axum.md),
+[077](docs/research/077-apps-as-http-services.md), [080](docs/research/080-snapshot-reads.md) and
+[081](docs/research/081-tail-records.md); the status table is [CHECKPOINT.md](CHECKPOINT.md). The text below
records the earlier document runtime this grew from.
A standalone native micro runtime being designed as a small operating