No Branch/Tag specified
main
port/tasks-float-2
fix/train-1116-2
fix/train-1116-3
fix/train-1116-1
fix/flake-1134
fix/server-1182
dev
port/notes-float-3c
docs/auto-update-ig
feat/dav-transport
port/tasks-float-1
wip/mail1011-sv-order-1116
fix/flake-1179
fix/flake-1178
fix/guards-1153-fsio-split
fix/guards-1153-notes-split-we
fix/guards-1153-notes-lib
fix/guards-1153-notes-home
fix/guards-1153-ui-primitives
fix/guards-1153-primitives-e2e
fix/guards-1153-visibility-doc
feat/paper-grey-1116
fix/flake-1165
fix/flake-1119
docs/imap-766-plan-v2
fix/e2e-unique-ports
t3/paged-search-reconcile-final
wip/mail1011-final-1115
docs/tasks-float-port
perf/editor-first-paint-1c
feat/imap-notes-fetch
feat/imap-notes-projection
feat/imap-notes-readonly
feat/imap-notes-auth
feat/imap-notes-server-foundation
wip/mail1011-txn-ownvocab-1115
wip/mail1011-txn-novocab-1115
perf/p1117-final-harness
perf/single-shot-repeats
port/tasks-matrix
wip/mail1011-txn-1115
fix/static-gates-1155
feat/files-s1-identity-r7
fix/files-r7-idle-loop
fix/daily-train-1152
port/notes-float
fix/editor-tables-test-types
port/notes-float-listscript
feat/tasks-actions
port/notes-float-phone-preload
perf/sound-comparator
port/notes-float-listscroll
port/notes-float-budgets
port/notes-float-suite-fix-b
port/notes-float-sidebar-fix
port/notes-float-trim
port/notes-float-3-lists
fix/attachments-meta-capability
docs/carddav-writes-v2-plan
feat/contacts-companion-pure
issue/carddav-read-perf-fix-r2
issue/carddav-read-r2
port/notes-float-devsync2
review/calendar-2
review/switcher-a-pills
port/notes-float-switcher-a
port/port-tables-2
review/switcher-ends
wip/whiteboard-s1-1114
port/port-tables
wip/mail1011-perfneutral
review/photo-tint
port/notes-float-shell
wip/local/collections-db
wip/local/mail-p1
wip/local/cold-growth-on-tiering
wip/local/tiering-v3-s1
wip/local/wal1051-cap
wip/local/tiering-v3-s1-resume
wip/local/index-position-startup-scan
port/notes-float-flat
port/notes-float-promote
wip/handover/mail1011-candidate
wip/handover/files-s1-candidate
port/notes-float-shell-only
port/notes-float-perf
feat/whiteboard-s1
feat/tiering-v5
fix/app-switch-hitch
wip/local/files-s1-dev-v4-final
feat/files-s1-dev-v4
fix/c2-glass-shared
feat/flat-lists
wip/handover/whiteboard-s1-resume
wip/att-lazy-861
feat/switcher-browse
wip/att-lazy-860
feat/tasks-float
recovered/flat-backup-candidate
perf/stalls-1054-kc
land/ai-toolbar
feat/collections-db
feat/collections-db-fixes
codex/mail-1011-redesign-20261111
fix/ai-toolbar
backup/macos-vm/st3-head
perf/trim-candidate-phonestack
feat/switcher-three
fix/1051-index-idle-checkpoint
perf/stalls-1054-kb
perf/stalls-1054-k
perf/stalls-1054-r3
fix/c2-contrast-tail
perf/stalls-1054-r3-preview
feat/collections-before
feat/tiering-v4
fix/timelog-caret
wip/local/tasks-actions
docs/tasks-writes-v2-plan
st3-r3
feat/pass8
review/calendar-2-before-1111
wip/tiering-v3-cold4
perf/stalls-1054-r2
fix/suite-A4
fix/suite-A5-probe
fix/suite-A6
fix/suite-A3
fix/suite-A2
fix/suite-A5
fix/suite-A1
wip/local/attachments-861-fix
feat/contrast
wip/local/ports-861
storage/wal-checkpoint-off-save-1051
wip/local/mail-1011-reconcile-20261110
feat/style-sheet-fixes
feat/money-round
perf/stalls-1054
wip/tiering-v3-cold5
t3/mail-1011-liveness
feat/iphone-fixes
feat/notes-approve
wip/local/shrow-work
feat/files-s1-identity
feat/quickfix
wip/tiering-v3-cold
wip/local/shared-row-swipes
backup/macos-vm/pfx-B
backup/macos-vm/pfx-C
backup/macos-vm/pfx-D
feat/contrast-r1
feat/tiering-v3-s2-tags
feat/folder-drop
t3/photos-s1
feat/tiering-v3-s1-namespace
wip/local/photos-s1
t3/photos-plan-slice-one
recovered/backup/p1b-61505
t3/paged-search-reconcile
t3/smooth-pane-transitions
t3/index-position-startup-scan
fix/private-staging-759b-r2
backup/macos-vm/hk/hk1009/pr877
backup/macos-vm/hk/hk1009/pr878
docs/undo-block-ids-plan
fix/undo-768
backup/macos-vm/hk/hk1009/pr875
backup/macos-vm/hk/hk1009/pr904
proto/block-identity-v7d
backup/macos-vm/hk/hk1009/pr846
backup/macos-vm/hk/hk1009/pr860
backup/macos-vm/hk/hk1009/pr861
backup/macos-vm/hk/hk1009/pr849
backup/macos-vm/hk/hk1009/pr848
backup/macos-vm/hk/hk1009/pr853
backup/macos-vm/hk/hk1009/pr957
backup/macos-vm/hk/hk1009/pr893
backup/macos-vm/hk/hk1009/pr889
backup/macos-vm/hk/hk1009/pr902
docs/imap-notes-plan
docs/quota-plan-2
fix/parallel-test-flakes
docs/calendar-backend-v2-plan
feat/calendar-ical-converter
backup/macos-vm/hk/hk1009/pr808
docs/contacts-import-v2-plan
issue/610-pm-midnight
feat/calendar-v2-s1-containment
backup/macos-vm/hk/hk1009/pr854
backup/macos-vm/hk/hk1009/pr845
backup/macos-vm/hk/hk1009/pr917
docs/dav-recorder-v2-plan
plan/previews-865
plan/save-log-durable-entry
backup/macos-vm/hk/hk1009/pr934
fix/e2e-data-on-ram
backup/macos-vm/hk/hk1009/pr888
feat/appwindow3
feat/appwindow2
feat/appwindow
feat/money-p1
feat/keys-sheet
review/calendar-2-themes
feat/smooth-cursor
fix/float-style
review/calendar-2-float
release/2026-11-06-hotfix
archive/port/rows-drop-code
archive/port/rows-actions
archive/port/rows
scratch/tasks-894-ui-gates
review/calendar-2-night-wip
recovered/flaky/toast-reduced
release/2026-11-05
archive/flaky/rows-drop-fixed
archive/flaky/rows-actions
archive/flaky/rows
sim/bm15-final
sim/bm15-bis-932
sim/bm15-bis-909
sim/bm15
sim/bm15-bis-887
perf/tiering-option-b
fix/sw-lazy-precache
archive/plan/save-log-durable-entry
mock/money-fix2
archive/fix/e2e-data-on-ram
mock/appearance-all
mock/pill-press
mock/pill-press-mac
backup/macos-vm/appearance-after
mock/auto-swipes
mock/mail-actions
backup/macos-vm/mock/mail-actions
mock/money-static
archive/review/standards-917
perf/tiering-761-fix
mock/type-audit
mock/third-pane
feat/contacts-import-v2-s1
perf/executor-hot-path
archive/port/hidden-blocks
archive/port/devices
scratch/executor-on-894
scratch/executor-spans2
scratch/executor-spans
archive/port/rows-drop
feat/tiering-761-d-scale
feat/tiering-761-c-index
feat/tiering-761-b-reader
archive/review/sharing-pr3-review-9fec3d1f
perf/ports-lazy-budgets
feat/tiering-761-a-migration
archive/review/sharing-pr3-review
archive/review/sharing-pr3-review-code
archive/plan/previews-865
archive/port/port-attachments-3
archive/port/contacts-merge
fix/motion-audit-859
fix/motion-audit-859-mac
archive/port/port-pickers
archive/port/port-tables-2
archive/port/port-tables
recovered/local/sharing-s1-pr2-room-snapshot-candidate
archive/fix/parallel-test-flakes-code-minipc01
docs/imap-766-readonly-slice
feat/dav-recorder-v3
research/788-diagnosis
archive/fix/parallel-test-flakes
archive/perf/pr792-cold-index-edit
docs/sharing-slice-1
recovered/feat/dav-recorder-v2
recovered/feat/dav-recorder-v2-edd7bbb
spike/imap-766-s0-cases
archive/fix/undo-768
recovered/feat/dav-recorder
recovered/feat/dav-recorder-901acd4
feat/contacts-import
perf/cold-growth-on-764
perf/cold-growth-on-tiering
recovered/feat/tasks-set-status
feat/tasks-move-reorder
feat/tasks-delete-promote-duplicate
feat/carddav-writes
perf/quota-on-tiering
perf/quota-simple
perf/cold-growth-on-quota-stack
recovered/perf/cold-growth-on-tiering
feat/calendar-identity
feat/calendar-event-parser
feat/calendar-props-maps
port/glass-when-ring
recovered/feat/tiering-761-s1-wip-8132a84
recovered/feat/tiering-761-s1-wip-9da4094
recovered/feat/tiering-761-s1-wip-724512c
recovered/feat/tiering-761-s1-wip-66e667e
recovered/feat/tiering-761-s1
wip/6by32-01-tier-761-s1-pause-20261030
spike/imap-766-s0
wip/6by32-02-calternal-pause-20261030
wip/8by64-01-review-688-pause-20261030
wip/6by32-01-verify-744-pause-20261030
wip/6by32-01-verify-742-pause-20261030
fix/private-staging-759b
wip/6by32-01-review-748-pause-20261030
wip/6by32-01-review-733c-pause-20261030
wip/6by32-01-review-733b-pause-20261030
review/calendar-month
wip/local/bm15-trash
plan/759b-staging
review/767b-tests
review/preview-2026-10-29
docs/tiering-731-plan
wip/c6b02-review-733d
wip/c6b02-bm1-full-a
docs/deploy-plan
fix/storage-owner-liveness-642
fix/storage-fix-7
feat/tiering-731
wip/tiering-731-first-attempt
perf/idle-honest-2
fix/storage-private-tmp-642-dev
fix/storage-exact-file-quarantine-642
perf/one-flush-save
review/calendar-static
review/indexing-ring
review/when-field-2
proto/block-identity-2-review
proto/block-identity-review
review/when-field
issue/tasks-create-ids
issue/tasks-create
review/combined
review/task-polish
review/top-buttons
review/q1-q5
archive/integ325-293
archive/integ325-ci
issue/calendar-adr
archive/old/train/2026-10-23bk2
archive/old/train/2026-10-23bk
issue/469-mockup-9a
issue/smart-tasks-mockup
issue/469-menus
issue/652-signout-flake
issue/652-history-fix7
issue/652-history-fix6
archive/old/issue/spring-check-perf
issue/spring-check-perf
issue/659-rename-fast
archive/old/train/2026-10-21ar
issue/search-hardening-3
issue/652-history-fix5
issue/660-port-sheets-glass
issue/652-history-fix4
issue/652-history-fix3
issue/652-history-fix2
issue/652-history-flake
train/2026-10-21an
issue/settings-admin-port
issue/search-port
train/2026-10-20am
issue/storage-split-fix2
issue/storage-split
archive/old/issue/folder-ids-fix
train/2026-10-20al
archive/old/issue/folder-ids
train/2026-10-20ak
issue/tables-mockup
train/2026-10-19aj
train/2026-10-19ai
issue/469-merge-fixes
issue/sidebar-band
archive/old/issue/608-settings-spec
train/2026-10-19ah
issue/swipe-offscreen
train/2026-10-19ag
archive/old/issue/590-nlp-adr
archive/old/issue/587-event-after-write-2
train/2026-10-19af
archive/old/issue/587-event-after-write
issue/469-pill-room-c
issue/469-pill-room
train/2026-10-19ae
issue/469-narrow-handle
issue/397-ios-swipe-2
issue/469-desk-fixes
archive/old/issue/auto-update-adr
issue/469-filter-gap
issue/469-port-1b
issue/442-opacity-flake
issue/327-web-fast-3
archive/old/issue/469-port-1
issue/469-port-1
issue/327-web-fast-2
archive/old/issue/327-web-fast
archive/old/issue/425-stt-bench-vq1
archive/old/issue/445-no-bleed
archive/old/issue/400-swipe-mockup-2
issue/426-client-review
issue/426-client-2
issue/426-client
archive/old/issue/476-safe-area-lab
archive/old/issue/445-top-light
issue/471-blocks-mockup
archive/old/issue/448-links-app-2
archive/old/issue/448-links-app
archive/old/issue/398-cold-links
issue/434-442-small-2
issue/434-442-small
archive/old/issue/398-unload
archive/old/issue/445-bottom-band
issue/445-bottom-band
issue/351-rem-3
issue/351-rem-2
issue/351-rem
archive/old/issue/327-first-note
issue/395-width-phone
archive/old/issue/327-typing
issue/396-ios-edges
issue/397-ios-swipe
archive/old/issue/327-notes-index
issue/345-347-contrast-empty-2
archive/old/issue/44-arenas
issue/44-arenas
archive/integ325
archive/old/issue/327-perf-harness
archive/old/issue/44-thp
issue/44-thp
archive/old/issue/285-sticky-pills
archive/old/issue/44-trim-3
issue/44-trim-3
archive/old/issue/165-cards
archive/old/issue/165-picker-2
archive/old/issue/212-multi-select
No results found.
Labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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
kayg/calternal#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Storage layout benchmark on the perf VM (ADR 0027).
Compare zvol16K+XFS4K, zvol16K+XFS16K, zvol4K+XFS4K (and today's ext4) for many small markdown files and large attachments, on SSD and HDD, with reflink dedupe. Perf VM disks use no host cache. Result decides where text and attachments live.
Storage layout benchmark results
Machine: perf VM, Debian 13, kernel 6.12.111, 4 vCPU, 8 GB RAM. Scripts:
/root/bench/bench.pyon the VM (not in a repo). Caches dropped before each phase. Format below is median / p95 over the runs (n shown). With 3 or 5 runs, p95 is basically the worst run.Disks tested
reflink=1), XFS 16K (-b size=16384 -m reflink=1). The 16K XFS mounts fine on 6.12 (kernel logs "EXPERIMENTAL: Large Block Size"). Everything runs on real block devices.Old v0 leftovers, the loop-backed
calternal-hdd-emutarget and the fstab entries are gone (the dm target was already gone; I removed the fstab line and the old ext4).Run counts: SSD-loop 5 runs everywhere. HDD: 5 runs for large files and the no-background save test; 3 runs for workload a, SQLite FULL/NORMAL and the save-under-copy test (it is slow: one HDD run of (a) takes 5 to 8 minutes, and one run of the save test under copy takes ~10 minutes on ext4). The save-under-copy test used 100 saves per run on HDD (600 on SSD-loop and for the no-copy case).
a) 50k markdown files (0.5 to 30 KB, median ~4 KB, ~295 MB total), atomic write recipe
Create = tmp write, fsync, rename, fsync dir, 32 threads, 256 shard dirs. Rewrite = 5k random files, same recipe. Cold read = 8 threads after drop_caches. Walk = scandir + stat of all 50k. Seconds.
Reading this: a fully fsynced create costs ~6 to 9 ms per file even with 32 threads, because every sync write goes to a zvol with no host cache. That is the dominant cost, not the fs. ext4 beats XFS here by ~1.5x on create and 2x on rewrite and cold read. 16K blocks give no gain for small files (a 4 KB note takes a whole 16K block, so more space and more read IO).
b) Single atomic save latency (ms), one thread, with and without a background
cpof a 1 GB file looping on the same fsMedian / p95 across runs of the per-run p50, p95, p99.
This is the big result. On ext4 with a large copy running, a single note save takes seconds (p50 5.7 s, worst 100 s) because fsync on ext4 has to drag the copy's dirty data through the journal. XFS stays flat (p50 ~26 ms, same as with no copy). The saves under copy on HDD ran only 100 saves per run, so the p99 there is the max.
c) Large files, 5 x 300 MB sequential (fio, bs=1M, psync, end_fsync), plus reflink and hardlink of a 300 MB file
MB/s, median / p95. Reflink and hardlink are the median of 5 copies per run.
Caveat: HDD "cold" read speeds of 800 to 1600 MB/s are not real disk speed. drop_caches clears only the guest cache; the Proxmox host ZFS ARC still holds the data. Write speed (~72 MB/s) is the honest HDD number. Sequential throughput is the same for ext4, XFS 4K and 16K.
cp --reflink=alwaysfails on ext4 as expected, so the CAS needs hardlinks there (or XFS).d) SQLite WAL, 10k single-row transactions (commit each), tx/s median / p95
FULL is ~10 ms per commit on both disks (the zvol sync-write cost), so ~100 commits/s max per DB. NORMAL is 45 to 150x faster and does not fsync per commit. The fs and block size make no real difference. 16K was slightly slower on HDD FULL (79 vs 95 tx/s).
Recommendation
mkfs.xfs -m reflink=1) for everything, text and attachments on the same fs. It is the only option that keeps a note save at ~26 ms while a big file is being copied or uploaded (ext4 stalls for seconds), and it gives real reflinks for the CAS dedupe (3 ms, 0 extra space, vs 315 MB per copy on ext4)..cason a separate XFS filesystem (reflink only works inside one fs, so the CAS and the attachment files that point to it must stay together), and keep the notes plus SQLite DBs on the SSD volume. Notes on SSD cost less than a tenth of the HDD time for read/walk.synchronous=NORMALfor the index/search DBs (can be rebuilt from the markdown files); FULL only if we ever treat the DB as source of truth. Batch writes: the per-commit cost is ~10 ms.Caveats
What cannot be tested from inside the VM, and the disks to add
The zvol
volblocksize(default 16K on current OpenZFS) and the ZFS recordsize are set on the host, and a zvol's volblocksize cannot be changed after creation. The VM disks sda and sdb both share one value now. To compare 4K vs 16K vs 64K volblocksize, please add these disks to the perf VM (allcache=none,discard=on,iothread=1, 40 GB each is enough):hdd-vbs4k: zvol on the HDD pool,volblocksize=4khdd-vbs16k: zvol on the HDD pool,volblocksize=16khdd-vbs64k: zvol on the HDD pool,volblocksize=64kssd-vbs4k: zvol on the NVMe pool,volblocksize=4kssd-vbs16k: zvol on the NVMe pool,volblocksize=16kssd-vbs64k: zvol on the NVMe pool,volblocksize=64kAlso useful: tell me the pool settings that matter (sync=standard/always, compression, SLOG present or not, ashift), and one extra unmounted 40 GB disk on the NVMe pool so the SSD can be tested as a real block device without the loop layer (replaces the loop files). With those I would rerun the same scripts with XFS 4K on each.
Reproduce:
/root/bench/mount.shthenpython3 /root/bench/bench.py <fs> <a|b|c|d> <runs>. Raw results:/root/bench/results/*.jsonlon the VM.Storage on Proxmox for databases: research (2026-10-14), from kayg's question "is CoW good for databases?"
Recommendation: zvols with XFS inside the guest on both pools. Not virtiofs.
page_size=4096; bigger pages multiply the bytes written per tiny commit.synchronous=FULLfor auth and history,NORMALfor the indexes we can rebuild.primarycache=metadataturns every 4K write into a 16K read-modify-write from disk.Host commands:
Not verified:
Benchmark plan to confirm: zvol 16K vs 8K (NVMe) and 16K vs 64K with and without a SLOG (HDD); a history-commit workload, note saves under a copy, fio, reflink and aging. Pass rule: p99 save under 50 ms under load, and p99 history commit under 10 ms. This needs Proxmox host access for the perf VM's disks.
4K vs 16K volblocksize benchmark (2026-10-14)
Perf VM, XFS 4K (
mkfs.xfs -b size=4096 -m reflink=1,crc=1, noatime) on every volume except root. 3 runs each, caches dropped between phases. Medians over the runs. Script:/root/bench/z4.py, driver/root/bench/z4all.sh/z4rest.sh, raw data/root/bench/results/z4.jsonl. Run only after the other agent's perf run (M4) had finished.Volumes
/(sda1). Root is ext4, so this is a filesystem difference as well as a block-size oneSQLite history (WAL, 4 KiB pages, one tx per 200-2000 B blob into a table plus FTS5; 20k rows preloaded; 4 FTS reader processes, each sleeping 5 ms between queries). Commit latency, ms, median of 3 runs
FULL = 2000 commits per run, NORMAL = 4000.
NORMAL p99 of 45-190 ms is the WAL checkpoint (it fsyncs) landing inside a writer commit, with a 4-reader load. tx/s is capped by the Python loop and the readers, not by the disk. Pass rule from the research comment is p99 history commit < 10 ms: nothing passes at p99, not even NORMAL, and only NORMAL p50 passes. So the history writer needs group commit and a checkpoint off the commit path (wal_autocheckpoint off plus a background
PASSIVEcheckpoint thread), regardless of volblocksize.Note save: atomic write (tmp, fsync, rename, fsync dir), 500 B to 30 KB, ms
cp: p50 / p99With n=30 the p99 is the max, so treat it as the worst run. I cut the HDD copy case to 30 saves because 200 saves took over half an hour per run. The ext4 root case with 200 saves reproduced the earlier stall (p99 37 s); at 30 saves the copy had not built up enough dirty data yet.
fio on the volume (psync, buffered, 1 GiB file). 4k randwrite, iodepth=1, fdatasync after every write, 15 s; 1M sequential write 1 GiB with end_fsync
That is ~15 ms per synced 4K write on 4K NVMe, ~21 ms on 4K HDD, vs 34-37 ms on the 16K volumes. Run-to-run spread was large, so the factor-of-2 is suggestive, not proven. (fio's own clat is only the 40 us buffered write; the fsync latency is what the IOPS reflects.)
Reflink:
cp -r --reflink=alwaysof a 1 GB tree (50 x 10 MB files)z4-nvme 0.1 s, z4-hdd 0.1 s, z16-hdd 0.0 s, loop XFS 0.0 s; 0 MB extra space on all. ext4 root does not support it (fails as expected).
Recommendation
zfs list -o used,referafter loading.sync_file_range/fdatasync every few MB, or O_DIRECT for big files) and do note saves on a separate volume from attachments. A separate NVMe volume for notes and DBs, HDD only for attachments, remains the clear way to meet the p99 < 50 ms pass rule.Caveats
cache=none,discard=on,iothread=1,ssd=1, ~40G each) two more zfs-nvme zvols: 16K and 8K (and 64K if that is a candidate), formatted XFS 4K as data disks, so the only difference to z4-nvme is volblocksize. Same for 8K/64K on HDD if the HDD default is in question. Report the pool'ssync, compression, ashift and whether a SLOG exists too; I could not see them from the guest.kayg referenced this issue2026-11-05 23:21:12 +00:00