Dataset Viewer
Auto-converted to Parquet Duplicate
experiment
stringclasses
6 values
title
stringclasses
6 values
verdict
stringclasses
1 value
headline
stringclasses
6 values
ran
stringdate
2026-10-03 14:11:26
2026-10-03 15:28:14
01-system-calls
The same system calls in Go and in Rust
pass
same order of calls in both languages
2026-10-03T14:11:26Z
02-copy-under-a-writer
Copying a database while it is being written
pass
backup API: 50 of 50 whole, 0 rows missing; plain file copy: median 60,000 committed rows missing
2026-10-03T15:28:14Z
03-kill-during-replace
Killing a file replacement at a random moment
pass
0 broken files in 500 kills for each language; in-place control: 493 of 500 broken
2026-10-03T14:44:03Z
04-durable-job
A job that runs until it succeeds
pass
failed once, retried and finished in 126 s, then disabled; a stopped job stays enabled
2026-10-03T14:46:15Z
05-drain-and-checkpoint
Before power-off: wait for requests, empty the log
pass
waits until idle, gives up at the limit, empties the log
2026-10-03T14:11:44Z
06-consistent-sqlite-copy
A consistent copy for the backup
pass
only committed rows, checked, no half copy left
2026-10-03T14:11:44Z

yserver durability experiments

Six small experiments from one day (3 October 2026) on a home server that is switched off most days: what survives when a process is killed in the middle of a write, when a database is copied while it is being written, and when work has to continue after the machine restarts. Each experiment has a pass bar written before it ran, a result.json, and the raw output it was judged on. One experiment was designed wrongly at first, and the experiments found a bug in one tool and one prototype; that is published too.

The first three compare the same durability core written twice, in Go and in Rust (about 110 to 180 lines each): append a line durably, replace a file atomically, copy a live SQLite database, checkpoint it.

Experiments

experiment what verdict result
01-system-calls The same system calls in Go and in Rust pass same order of calls in both languages
02-copy-under-a-writer Copying a database while it is being written pass backup API: 50 of 50 whole, 0 rows missing; plain file copy: median 60,000 committed rows missing
03-kill-during-replace Killing a file replacement at a random moment pass 0 broken files in 500 kills for each language; in-place control: 493 of 500 broken
04-durable-job A job that runs until it succeeds pass failed once, retried and finished in 126 s, then disabled; a stopped job stays enabled
05-drain-and-checkpoint Before power-off: wait for requests, empty the log pass waits until idle, gives up at the limit, empties the log
06-consistent-sqlite-copy A consistent copy for the backup pass only committed rows, checked, no half copy left

What was learned

  • A plain file copy of a live SQLite database looks fine and is missing data. 49 of 50 such copies opened and passed the integrity check; the median one lacked 60,000 rows that were already committed. SQLite's backup API lost none in 100 copies.
  • Syncing is not atomicity. A writer that synced every block in place left a half file in 493 of 500 kills. Write-to-temporary, sync, rename, sync-the-directory left none in 1000.
  • Nothing cleans up after a kill. Both prototypes left temporary files behind (109 and 87 in 500 kills). A tool using this pattern has to sweep them itself.
  • Go and Rust came out equal on correctness. The same system calls in the same order, the same results in both tests. The differences were elsewhere (below).
  • systemd alone can hold a job across restarts: an enabled unit that disables itself only on exit 0. A real power-off was not part of the run.

Go and Rust: what was measured beside correctness

Go 1.23 Rust 1.97
lines of code 177 110
SQLite modernc.org/sqlite: SQLite translated to Go, no C rusqlite, bundled: SQLite's own C code
build for Linux x86-64 from a Mac CGO_ENABLED=0 go build: worked at once, 37 s with downloads plain cargo build --target x86_64-unknown-linux-musl failed (the C code needs a cross-compiler); with cargo-zigbuild: 86 s the first time
static binary, stripped 5.9 MB 2.0 MB
append syncs with fsync fdatasync
mistakes found at run time none one: the first version panicked on an argument its SQLite wrapper refuses

Build times and line counts were taken once, by hand, on one laptop. They are observations, not benchmarks.

Limits, stated plainly

  • Killing a process is not cutting the power. After SIGKILL the kernel still holds what was written. What survives a power cut depends on the file system and the drive as well, and none of these experiments measure that. A tool such as LazyFS, which drops unsynced writes, would be the next step.
  • One machine, one file system (ext4), one kernel (7.0.0-31-generic), SQLite 3.45.1 for the checks.
  • The prototypes are small. They measure the core of a durability tool, not a whole one.
  • The pass bars of experiments 01 to 03 were written after a first exploratory run earlier the same day; the published results are from the run after the bars were fixed.

Files

summary.csv                      one row an experiment
environment.json                 kernel, CPU, file system, versions, binary sizes
experiments/NN-name/README.md    the question, the bar, the result, the reading
experiments/NN-name/result.json  the numbers, as the runner wrote them
experiments/NN-name/*.txt        raw traces and journal lines
code/go, code/rust               the two prototypes
code/run_experiments.py          the runner: it holds the bars and writes the results
code/tools/                      yjob and its unit, sqlite-stage.py, quiesce-steps.sh

Run it yourself

On Linux with systemd, Python 3.10 or newer and strace:

(cd code/go && CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o ../../dspike-go .)
(cd code/rust && cargo build --release && cp target/release/dspike ../../dspike-rust)
python3 code/run_experiments.py --go ./dspike-go --rust ./dspike-rust --tools code/tools --out results --only 01,02,03,05,06

Experiment 04 also needs code/tools/yjob at ~/runbook/tools/yjob and code/tools/yjob@.service in ~/.config/systemd/user/. Everything runs in a scratch directory under ~/.cache and removes it afterwards.

The machine

A mini PC with an AMD RYZEN AI MAX+ 395 w/ Radeon 8060S processor and one NVMe drive, running Ubuntu with kernel 7.0.0-31-generic and systemd 255. It serves open language models at home: yserver-local-llm-system.

Licence

The results and text: CC BY 4.0. The code in code/: Apache-2.0.

Downloads last month
-