<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pardes.git/test/fork_stall.py, branch main</title>
<subtitle>Pardes</subtitle>
<id>https://git.0x4200.cafe/pardes.git/atom?h=main</id>
<link rel='self' href='https://git.0x4200.cafe/pardes.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/'/>
<updated>2026-10-29T22:54:26Z</updated>
<entry>
<title>rollback-bench and fork_stall.py: what a replica's rollback copy is (a walk of ~100 KB once file texts are pinned) and what a fork stalls the authority for, which settle open points 3 and 5</title>
<updated>2026-10-29T22:54:26Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-29T19:55:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=1c87b21d9255d9b0a7af102afd7defec25ac2c8a'/>
<id>urn:sha1:1c87b21d9255d9b0a7af102afd7defec25ac2c8a</id>
<content type='text'>
`zig build rollback-bench -Dplatform=tty -Doptimize=ReleaseFast` (test/rollback_bench.zig) builds a typical session (a shell with 1 MB of scrollback, three 60 KB files and a 3 MB one, 40 edits) and a big one (14 panes, 18 MB, 4x3 MB and 8 small files, 8 MB of scrollback, 200 edits) in process, then measures the state the digest walk visits, the part of it that is a file's text and its undo snapshots (immutable once made: an edit puts a new buffer in place, a snapshot is a copy, so a copy pins them), and the walk again with those taken out, plus a memcpy of what is left. Typical: 36.3 MB walked, 80 KB to copy, about 0.02 ms; big: 282.5 MB, 96 KB, about 0.045 ms. Then a fork of the big session (431 MB RSS: 3.4 to 8.3 ms) and 64 MB written by the parent under the child (~28 ms of copy-on-write).

test/fork_stall.py does the fork alone, on any system with a Python (the FreeBSD box): N MB written, then fork() timed and 64 MB written under the child, with Linux's THP as set and with 4 KiB pages. 1 GB: 13.3 to 19.6 ms here, 20.4 ms on FreeBSD 15.1; the copy-on-write after it ~1.3 us a page on both.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
