Files: measure watcher, name search and upload path at 1M files #589
Open
opened 2026-10-18 18:46:08 +00:00 by kayg
·
31 comments
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#589
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?
Overnight measurement for Files (F1, F3, F10, F11) at public-cloud scale.
Research only, no product code. Results in calternal-research and here.
Started the issue 589 research pass in the research workspace. Branch: none (research-only; no branch will be created). Base SHA:
a0785f1067(calternal-cloud dev, unchanged). I read the 2026-10-17 bench and library reports and the 2026-10-18 library checks. They contain no 1M-file watcher, FTS5 name-search, or upload-stream benchmark; the earlier 1 GiB XFS FIDEDUPERANGE result will be treated as prior evidence and not repeated unless the requested size comparison needs it.Initial perf VM capacity finding:
perf-testis Linux 6.12.111 with 4 vCPUs. Its live/proc/sys/fs/inotify/max_user_watchesis 524288,max_user_instancesis 8192, andmax_queued_eventsis 16384. The planned 100000-directory aggregate tree therefore fits the current watch cap; a 1000000-directory tree would not. The root filesystem is 99% used with 1.9 GiB free, while the separate XFS NVMe has 57 GiB free. I’ll track actual slab/RSS and overflow behavior after registering the watches.Watcher capacity refinement: a scan of
/proc/*/fdinfo/*onperf-testfound 258 existing inotify watches across 13 descriptors for UID 0. Adding the requested 100000 directory watches would put that UID at about 100258 of its 524288 limit, leaving 424030 watches. Linux counts watches per real UID, and recursive trees need a watch on each directory; source: https://man7.org/linux/man-pages/man7/inotify.7.html. This is capacity evidence only; watch-add timing, slab bytes, RSS, overflow, and reconcile scans are still pending.The measurement harness is built. The perf VM lock at /root/perf-vm.lock is still held by another run; a nonblocking check reported it busy, and my queued preflight has not acquired it yet. The VM currently has 1.8 GiB free on root and 57 GiB on the separate NVMe volume. I have not generated the dataset or collected timing numbers. I will resume measurements when the lock releases.
Dataset setup completed on perf-test (Linux 6.12.111, Intel i9-9900K at 3.60 GHz, 4 vCPU). The sparse XFS loop image now contains exactly 100,000 directories and 1,000,000 empty files; treegen reports a 306,876,416 byte SQLite base database with 1,000,000 file rows. Root free space moved from 1.8 GiB to 1,003 MiB; the separate 64 GiB NVMe volume still has 57 GiB free. This was a one time setup step, not a timed benchmark. I am keeping all further database and upload data on NVMe.
Preliminary notify 9.0.0-rc.5 recursive watch result on perf-test (Linux 6.12.111, Intel i9-9900K at 3.60 GHz, 4 vCPU), with 100,000 directories and 1,000,000 empty files on reflink-enabled XFS: 10 runs, watch-add p50 2,113.299 ms and p95 2,973.348 ms; attached watches p50/p95 100,001; process RSS p50 68,752 KiB and p95 69,424 KiB. The fsnotify_mark_connector slab delta was p50 2,395,536 bytes and p95 2,397,120 bytes. The inotify_inode_mark cache did not appear in the process's /proc/slabinfo sample, so connector bytes are not yet a complete kernel watch-memory result. CPU steal stayed at or below 0.52% across these runs, so none needed repeating; one-minute load ranged 0.63 to 1.04. The first five runs had a staging label saying notify 8, but the binary reported notify 9.0.0-rc.5; I grouped every run by its printed runtime version. Burst behavior and a correctly staged notify 8.2.0 comparison are still pending.
Preliminary burst finding: one run (n=1, so p50=p95 for this sample) on perf-test (Linux 6.12.111, Intel i9-9900K at 3.60 GHz, 4 vCPU), notify 9.0.0-rc.5, 100,000 directories and 1,000,000 empty files on reflink-enabled XFS. The harness changed 100,000 file modes while blocking the event callback; it received 5,465 unique paths, estimating 94,535 missed paths, with 16,421 callbacks. One-minute load was 1.03 before and 1.24 after, and CPU steal was 3.51%. The first harness version looked for overflow errors and printed false. Source inspection shows notify converts IN_Q_OVERFLOW into EventKind::Other with Flag::Rescan, not an error: https://docs.rs/crate/notify/9.0.0-rc.5/source/src/inotify.rs . I have added explicit Flag::Rescan counting and will repeat burst runs before reporting overflow handling.
Correction to the preliminary burst result: I am discarding the reported 5,465 paths and 94,535 lost paths. The harness selected files with a recursive walk after watching had begun, and both backends can report directory access events during that walk; the test also changed metadata on existing files instead of creating watched directory entries. Those callbacks polluted the burst result. I am changing the harness to select target directories before installing watches, wait for setup callbacks to drain, then create 100,000 new marker files while the callback is blocked on the first create event. It will count only marker paths and Flag::Rescan. The underlying 16,421 callback count from that preliminary run is not a valid burst measurement.
Another harness audit found an off by one in the synthetic directory count. The generator printed 100,000 directories, but recursive watch runs attached 100,001 watches and the first scan reported 1,100,002 entries. The target folder's two shared path components were counted as one. I am correcting the generated tree to exactly 100,000 directories and 1,000,000 files, while preserving 10,000 file descendants under the folder rename target. I will discard and rerun the scan and watcher results collected on the 100,001 directory tree.
Correction to the preliminary watch-memory note: the inotify mark cache is present under /sys/kernel/slab/inotify_inode_mark, but it is merged into the canonical slab named :A-0000080 and therefore does not appear as an inotify_inode_mark row in /proc/slabinfo. Sysfs reports an 80 byte object size. I have changed the harness to read the cache through its sysfs alias and will report the measured live-object delta alongside fsnotify_mark_connector. The earlier zero mark-cache value was a measurement bug.
Watcher registration finding, interim. On perf-test (Intel i9-9900K 3.60 GHz guest, 4 vCPU, 7.7 GiB RAM, Linux 6.12.111+deb13), the reflink XFS loop held exactly 100,000 directories and 1,000,000 empty files. With notify 8.2.0, four accepted runs each installed 100,000 inotify watches. Every run saw 16,385 setup callbacks and one rescan hint while max_queued_events was 16,384. This harness therefore reached the queue overflow signal during recursive watch registration, before the explicit 100,000 file create burst.
The four accepted install times were 18,186.170, 4,158.808, 3,940.130 and 5,815.294 ms. Using the benchmark's nearest ceiling rank, p50 was 5,815.294 ms and p95 was 18,186.170 ms (n=4). CPU steal for those runs was 1.86%, 0.09%, 0.05% and 0.37%. A 35,523.384 ms attempt at 16.91% steal was excluded and is being retried. These are interim figures until the fifth accepted run.
Final watcher finding for this fixture. Hardware was the perf-test VM, Intel i9-9900K 3.60 GHz guest, 4 vCPU, 7.7 GiB RAM, Linux 6.12.111+deb13. The reflink XFS loop held exactly 100,000 directories and 1,000,000 empty files. Every accepted run had at most 5% CPU steal.
Notify 8.2.0 installed 100,000 watches in five accepted runs: p50 5,534.810 ms, p95 18,186.170 ms. Process RSS was p50 45,176 KiB, p95 45,224 KiB. The measured inotify mark and fsnotify connector slab delta was p50 10,382,552 bytes, p95 10,398,872 bytes. Notify 9.0.0-rc.5 took p50 8,266.877 ms and p95 8,501.528 ms (n=5); RSS was p50 67,552 KiB and p95 68,376 KiB. Its measured slab delta was p50 10,360,232 bytes and p95 10,393,080 bytes (n=5). All five registration runs for each version observed 16,385 setup callbacks and one rescan hint with max_queued_events set to 16,384.
For each version, three accepted burst runs created 100,000 marker files in 100,000 directories. Both versions reported 5,463 unique marker paths and one rescan hint in every run, estimating 94,537 missing path notifications out of 100,000. Notify 8.2.0 end-to-end burst time was p50 28.832 s, p95 30.350 s; notify 9.0.0-rc.5 was p50 16.784 s, p95 20.096 s. There were no callback errors. The measured paths were synthetic and the callback was deliberately paused after its first create event to force queue pressure.
Accepted add-run load averages (1, 5 and 15 minute) and steal were: notify 8 runs 1.32/1.26/1.25 to 1.53/1.31/1.26 at 1.86%; 1.57/1.32/1.27 to 1.52/1.32/1.27 at 0.09%; 1.52/1.32/1.27 to 1.48/1.31/1.27 at 0.05%; 1.48/1.31/1.27 to 1.49/1.32/1.27 at 0.37%; and 1.91/1.71/1.46 to 1.83/1.70/1.46 at 0.67%. Notify 9 runs were 1.83/1.70/1.46 to 1.77/1.69/1.45 at 0.00%; 1.77/1.69/1.45 to 1.87/1.71/1.46 at 0.14%; 1.67/1.68/1.45 to 1.65/1.67/1.45 at 0.20%; 1.55/1.65/1.45 to 1.54/1.64/1.45 at 0.36%; and 1.42/1.61/1.44 to 1.43/1.61/1.44 at 0.46%. Burst-run steal was 0.61%, 0.49%, 0.27% for notify 8 and 0.35%, 1.82%, 2.58% for notify 9; load before and after stayed between 1.28 and 2.78 (1 minute), 1.53 and 1.98 (5 minute), and 1.43 and 1.66 (15 minute).
The VM had max_user_watches=524288 and 258 existing watches for the root UID before this fixture. Five full-size trees fit under that limit with little room left; 100 trees of this size would require about 10,000,258 watches before headroom. The kernel limit is per real UID, and inotify overflow requires a rescan: https://man7.org/linux/man-pages/man7/inotify.7.html. Notify maps overflow to its rescan flag: https://docs.rs/crate/notify/8.2.0/source/src/inotify.rs.
Reconcile scan finding, interim. The corrected XFS loop tree has 100,000 directories, 1,000,000 files and 1,100,000 total entries including the root. All accepted runs returned the same metadata signature. Hardware was the perf-test VM with Intel i9-9900K 3.60 GHz, 4 vCPU and 7.7 GiB RAM; all listed runs had CPU steal below 5%.
With jwalk 0.9.0 and four Rayon threads, cold time was p50 6,926.088 ms and p95 7,098.632 ms (n=3); warm time was p50 1,208.716 ms and p95 1,315.549 ms (n=3). The single-thread walkdir 2.5.0 cold time was p50 17,272.111 ms and p95 19,565.111 ms (n=3); warm time was p50 3,262.318 ms and p95 3,723.560 ms (n=3). Each warm sample ran an untimed scan first while holding the same lock.
Per-run load averages (1/5/15 minutes) and steal were:
jwalk cold: 1.20/1.63/1.59 to 1.94/1.77/1.64 at 1.24%; 1.62/1.71/1.62 to 2.14/1.82/1.66 at 1.78%; 1.58/1.71/1.63 to 1.94/1.79/1.65 at 0.54%.
jwalk warm: 1.52/1.70/1.62 to 2.30/1.86/1.68 at 0.29%; 1.72/1.76/1.65 to 2.14/1.85/1.68 at 0.26%; 2.05/1.83/1.67 to 2.05/1.83/1.67 at 0.10%.
walkdir cold: 1.97/1.82/1.67 to 1.97/1.83/1.68 at 0.12%; 1.89/1.81/1.67 to 1.64/1.76/1.66 at 3.33%; 1.17/1.45/1.55 to 1.21/1.44/1.54 at 1.76%.
walkdir warm: 1.08/1.36/1.51 to 1.05/1.34/1.50 at 0.61%; 1.09/1.24/1.43 to 1.26/1.28/1.43 at 0.20%; 1.26/1.28/1.43 to 1.22/1.27/1.43 at 0.00%.
These are stat-walk timings; the SQLite manifest reconciliation run is still pending.
Completed the stat-walk comparison on the same perf-test VM and exact XFS loop tree. The single-thread std walker returned the same 1,100,000 entries and signature. Its cold time was p50 36,891.740 ms and p95 39,658.770 ms (n=3); warm time was p50 3,482.052 ms and p95 3,728.207 ms (n=3). All accepted runs had CPU steal below 5%.
Per-run load averages (1/5/15 minutes) and steal were:
std cold: 1.20/1.26/1.43 to 1.44/1.32/1.44 at 0.13%; 1.41/1.32/1.44 to 1.78/1.42/1.47 at 2.00%; 1.19/1.33/1.43 to 1.30/1.34/1.43 at 0.70%.
std warm: 3.17/2.03/1.66 to 2.51/2.01/1.66 at 0.20%; 2.23/2.33/1.85 to 1.85/2.22/1.84 at 0.67%; 1.61/1.99/1.79 to 1.72/1.98/1.79 at 0.47%. An earlier warm attempt took 70,670 ms with 7.48% steal and was excluded; its retry was accepted.
Across these stat-only runs, jwalk with four workers led at 6.926 s cold and 1.209 s warm p50; walkdir was 17.272 s cold and 3.262 s warm; std was 36.892 s cold and 3.482 s warm (n=3 for each). These times exclude the SQLite manifest comparison and writes; that scan is being measured separately.
Manifest scan finding. On the perf-test VM (Intel i9-9900K 3.60 GHz guest, 4 vCPU, 7.7 GiB RAM), the reflink XFS tree had 100,000 directories and 1,000,000 files. The manifest held 1,100,000 rows including directories and root. The probe compared device, inode, size, mtime nanoseconds and ctime nanoseconds; SQLite used synchronous=NORMAL and a 128 MiB page cache.
The baseline insert took 22,450.458 ms (n=1, p50=p95). An unchanged full scan took p50 8,733.762 ms and p95 9,103.412 ms (n=3). After changing permissions on 10,000 files, every scan found exactly 10,000 changed rows; changed scan time was p50 9,313.783 ms and p95 9,450.635 ms (n=3). The final restore scan also found 10,000 changes. Process RSS and high water were both 143,804 KiB.
The single locked benchmark invocation covering the baseline and all internal scans had load averages (1/5/15 minutes) of 1.31/1.82/1.75 before and 1.17/1.66/1.70 after, with 1.44% CPU steal. This context applies to the full n=3 phase measurements; the probe did not sample load separately inside each phase.
The probe upserts observed paths but does not sweep rows for paths missing from a scan, so deletion cleanup remains unmeasured. The strategy also needs a real workload test for atomic replacement and same-size rewrites.
FTS finding, first index variant. On the perf-test VM (Intel i9-9900K 3.60 GHz guest, 4 vCPU, 7.7 GiB RAM), the trigram index built over 1,000,000 normalized paths from the exact XFS fixture. Build time inside SQLite was p50 16,719.125 ms and p95 18,701.942 ms (n=3). The resulting database was 511,852,544 bytes, 204,972,032 bytes above the 306,880,512-byte base database. The index build used WAL and synchronous=NORMAL; the reported build timer excludes copying the base database.
The three accepted build runs had load averages (1/5/15 minutes) of 1.90/1.65/1.68 to 1.70/1.61/1.67 at 0.39% steal; 1.45/1.58/1.65 to 1.35/1.55/1.64 at 0.46%; and 1.53/1.63/1.66 to 1.41/1.60/1.65 at 0.55%.
The SQLite FTS5 documentation says trigram LIKE or GLOB searches need a three-character literal run to use the index, so one- and two-character substring queries fall back to a scan: https://www.sqlite.org/fts5.html#the_trigram_tokenizer.
FTS detail=none finding. The tri-lite trigram index over the same 1,000,000 normalized paths produced a 371,769,344-byte database, with 64,888,832 bytes of index growth above the 306,880,512-byte base. Its index build time was p50 9,593.482 ms and p95 14,658.639 ms (n=3). This is about 68% less index growth than the default-detail trigram build; query latency and result behavior are still being measured.
The accepted runs on the perf-test VM had load averages (1/5/15 minutes) of 1.35/1.57/1.63 to 1.30/1.55/1.62 at 0.28% steal; 3.40/1.92/1.74 to 2.87/1.88/1.72 at 2.82%; and 2.07/1.82/1.72 to 1.90/1.79/1.71 at 0.09%.
Status: the prefix FTS build is waiting for /root/perf-vm.lock held by another run. My queued sample has not started, so there are no prefix results to report yet. The NVMe work area was 18% used at the last check, below the 60% limit.
FTS unicode61 prefix finding. Over the same 1,000,000 normalized paths, unicode61 with prefix lengths 1 through 6 produced a 522,465,280-byte database, 215,584,768 bytes above the 306,880,512-byte base. Build time was p50 15,040.826 ms and p95 22,761.864 ms (n=3). This is about 10.6 MB more index growth than the default trigram index and about 3.3 times the tri-lite growth.
Accepted perf-test loads (1/5/15 minutes) and steal were 3.18/3.43/2.49 to 2.70/3.31/2.47 at 0.76%; 1.75/2.92/2.39 to 1.59/2.83/2.37 at 0.50%; and 1.21/2.49/2.28 to 1.15/2.39/2.25 at 1.67%. Prefix query timing and Unicode results are next.
Trigram search finding. On the same 1,000,000-path database, warm-cache substring queries (n=30 each) had p50/p95 latency in ms: f 374.217/448.649; fa 371.376/514.658; fam 254.235/317.498; fami 284.172/307.336; famil 279.798/304.416; family 341.959/402.025. The whole search command ran on the perf-test VM with load averages 1.10/2.13/2.17 before and 1.03/1.89/2.08 after, with 1.44% steal.
The synthetic top-10 relevance check scored 10/10 for family, invoice, cafe, Tokyo, sunrise emoji and mil. The trigram substring path matched the decomposed accent, CJK and emoji samples. Ranking confidence is low because the corpus and relevance labels are generated, and the sort order is based on substring position and path length rather than a user relevance model.
Tri-lite search finding. With detail=none, warm-cache substring queries (n=30 each) had p50/p95 latency in ms: f 488.306/745.112; fa 440.993/568.891; fam 212.231/262.391; fami 204.200/279.023; famil 311.050/423.180; family 257.063/367.361. The synthetic relevance check scored 10/10 for all six ranking queries: family, invoice, cafe, Tokyo, sunrise emoji and mil. Accent, CJK and emoji substring queries returned matches.
The full search command on the perf-test VM had load averages (1/5/15 minutes) of 1.06/1.66/1.98 before and 1.02/1.53/1.91 after, with 0.92% CPU steal.
Unicode61 prefix search finding. Warm-cache queries (n=30 each) had p50/p95 latency in ms: f 115.244/148.506; fa 118.848/145.406; fam 108.625/139.235; fami 137.679/204.818; famil 115.389/159.024; family 125.300/190.093. The whole accepted search command had load averages (1/5/15 minutes) 1.00/1.41/1.84 before and 1.00/1.37/1.81 after, with 0.13% steal.
Synthetic precision at 10 was 10/10 for family, invoice, cafe and Tokyo. The unicode61 path returned no result for sunrise emoji and for mil inside family. This confirms the option is a token-prefix search, not a substring search; it is faster on this fixture, but its behavior differs.
Plain LIKE search finding. On the base database with no path_norm index, warm-cache substring queries (n=30 each) had p50/p95 latency in ms: f 215.275/266.889; fa 181.539/234.793; fam 177.191/265.673; fami 231.071/282.990; famil 212.029/271.635; family 194.416/235.517. The whole accepted search command had load averages (1/5/15 minutes) 1.39/1.48/1.81 before and 1.18/1.41/1.77 after, with 0.27% steal.
The synthetic relevance check scored 10/10 for family, invoice, cafe, Tokyo, sunrise emoji and mil, including the substring inside family and emoji. On this warm-cache fixture, plain LIKE was faster than default trigram for all six queries and faster than tri-lite for four of six, with no FTS index build or index growth. This is a full table scan and used a 512 MiB SQLite page cache; cold-cache and concurrent-user throughput remain unknown.
Rename finding: on the perf VM, updating the 10,000 descendant path rows took 3 runs per layout with SQLite FULL sync. Times are p50/p95: trigram 1,292/2,023 ms; trigram detail=none 312/1,115 ms; unicode61 prefix indexes 633/759 ms; plain normalized LIKE table 48/66 ms. The surrounding run contexts had steal of 4.24%, 0.27%, 0.58%, and 0.00%, respectively; all were below the 5% cutoff. This measures SQLite path/index updates, not the XFS directory rename itself. The fastest result is a reason to include LIKE in follow-up workload evaluation, not a search-quality verdict.
The first dedupe probe is invalid and excluded: it returned EINVAL before producing a timing. Investigation found the harness opened its source file write-only, but FIDEDUPERANGE requires the source descriptor to be readable. The perf volume is XFS with reflink=1. I am correcting the benchmark fixture and will rerun the measurements. The syscall contract is documented at https://man7.org/linux/man-pages/man2/ioctl_fideduperange.2.html.
Corrected FIDEDUPERANGE measurements on the perf VM NVMe XFS volume (reflink=1), n=3 per size; each repetition wrote two identical files, fsynced both before and after dedupe, and used 16 MiB chunks. All bytes deduped. p50/p95 ioctl time: 1 MiB 17.813/21.709 ms (1 call); 100 MiB 3,428.299/3,504.803 ms (7 calls); 5 GiB 135,635.509/194,989.190 ms (320 calls). Outer load before/after and steal: 1 MiB 1.01/1.24/1.32 → 1.01/1.24/1.32, 2.22%; 100 MiB 1.00/1.22/1.30 → 1.00/1.21/1.30, 4.03%; 5 GiB 1.00/1.18/1.29 → 1.02/1.13/1.22, 2.17%. Initial EINVAL attempts were excluded after fixing the benchmark’s write-only source descriptor.
File and directory sync findings on the perf VM NVMe XFS volume, n=3 for 1 MiB and 5 GiB, n=15 for 100 MiB. Numbers are p50/p95; the file sync is fdatasync for “data” and fsync for “all”, followed by rename and parent-directory fsync. 1 MiB data: file 9.565/10.308 ms, directory 4.083/10.552 ms. 1 MiB all: file 10.853/12.254 ms, directory 4.123/4.785 ms. 100 MiB data: file 184.944/391.849 ms, directory 5.592/29.269 ms. 100 MiB all: file 304.895/1,128.030 ms, directory 15.768/29.118 ms. 5 GiB data: file 6,056.500/7,738.557 ms, directory 7.348/15.739 ms. 5 GiB all: file 6,783.785/8,724.897 ms, directory 33.750/39.745 ms. Accepted outer load before/after and steal: 1 MiB data 1.02/1.12/1.21 → same, 0.00%; 1 MiB all 1.01/1.11/1.20 → same, 3.33%; 100 MiB data 1.00/1.09/1.14 → same, 4.02%; 100 MiB all 1.08/1.05/1.07 → 1.06/1.05/1.07, 4.83%; 5 GiB data 1.46/1.21/1.12 → 1.84/1.34/1.17, 4.32%; 5 GiB all 1.40/1.42/1.33 → 2.17/1.59/1.40, 4.22%. Short 100 MiB attempts with over 5% steal were discarded; the accepted 100 MiB samples used 15 repetitions each.
10 GiB streaming upload finding, one accepted run on the perf VM NVMe XFS volume. Stream plus BLAKE3 took 23.799 s (430.27 MiB/s); file fsync took 5.431 s. Process RSS sampled at start, every 256 MiB, and after fsync stayed between 2,952 and 3,004 KiB (52 KiB delta across 42 samples). Load before/after was 1.10/1.32/1.33 → 1.93/1.50/1.39; steal was 3.46%. This is one accepted repetition; two more are in progress for p50/p95.
Upload measurement status: the second planned 10 GiB repetition exhausted 20 attempts, all above the 5% CPU-steal cutoff (7.05%–18.16%), so none count. One clean repetition remains (3.46% steal), with 23.799 s stream+hash, 5.431 s file fsync, and 52 KiB RSS delta. I am attempting the third repetition; p50/p95 will remain single-run or unavailable if the VM does not provide additional clean windows.
Upload retry status: the third planned 10 GiB repetition also exhausted 20 attempts, all above 5% steal (7.87%–22.84%). Across the planned three repetitions, only one clean run is available, so upload p50/p95 cannot be estimated beyond the single run (23.799 s stream+hash, 5.431 s file fsync, 430.27 MiB/s). The clean run RSS was 2,952–3,004 KiB with a 52 KiB delta over 42 readings. Completed high-steal attempts showed the same sampled RSS delta but are excluded from timing results. This part is blocked by perf VM contention; no further clean upload timing is being inferred.
Completed the measurements and wrote the report to /home/kayg/Developer/calternal-research/files-bench-2026-10-19.md. The report includes the requested question/result/verdict/confidence table, source links, accepted and rejected load/steal contexts, and remaining unknowns.
Findings: use watches for recent or active folders with periodic reconciliation; the forced 100k-event burst overflowed in both notify versions. jwalk was fastest in the 1.1M-entry stat walk. FTS5
detail=nonehad the smallest trigram index; unicode61 prefix was fastest in warm search but did not match interior substrings. BLAKE3 mmap+Rayon led the warm-cache hash runs. On XFS, 5 GiB FIDEDUPERANGE took 135.636/194.989 s p50/p95; 5 GiB file sync took 6.057/7.739 s for fdatasync and 6.784/8.725 s for fsync.The 10 GiB upload has one accepted timing run: 23.799 s stream+hash, 5.431 s file fsync, and 52 KiB sampled RSS delta. The other two planned repetitions each exhausted 20 attempts above 5% CPU steal, so upload throughput p50/p95 is low confidence and the report labels the single-run result accordingly.
The Calternal checkout remains at head SHA
a0785f1067; no branch, PR, merge, or deployment was made. Task data, VM image, and temporary evidence files were removed. No tests were run.Build gate command: cargo build --release --bin hashbench -j4 (through the required build slot).
Gate output, verbatim:
kayg referenced this issue2026-11-05 23:21:12 +00:00