OXYGENHUB

Benchmarks: closing summary against Git and tuned Git (refs #41) 87828a0b1f36

Corrects the 1 000-file commit's Git figure, first taken during a build.
Author
Andy McCall @andymccall <[email protected]>
When
· 2026-10-02 03:33 UTC
Signature
✔ signed by Andy McCall
Hash
87828a0b1f36064f63356114a73cc08f1646ed739d37e1a6e5826b06d6087209
Depends on
1d360c91a289 4f264d6f20b6 dd6147dcf9c2
Depended on by
30fc48081b94
In bookmarks
agents-in-readme bare-hashes carried-not-removed carry-identical doctor-trust identical-sides keyless-tags main merge-remote-bookmark only-help-103 paths-for-resolutions-and-amend push-notes show-stat subrepo-pin-state switch-says
In tags
v0.10.0 v0.11.0 v0.3.0 v0.3.1 v0.4.0 v0.4.1 v0.4.2 v0.4.3 v0.4.4 v0.4.5 v0.4.6 v0.5.0 v0.5.1 v0.6.0 v0.7.0 v0.8.0 v0.9.0
Edits
4 atoms, 0 tree operations, 1 file

Browse the tree at this change

modified docs/benchmarks.md +60 −1
…
929 unchanged lines
930 930
| | before | now | Git |
931 931
|---|---:|---:|---:|
932 932
| commit, one file, straight after the edit | 0.55 s | 0.34 to 0.45 s | 0.15 s |
933 -
| commit, 1 000 files | 0.99 s | 0.79 to 0.86 s | 1.1 to 1.2 s |
933 +
| commit, 1 000 files | 0.99 s | 0.79 to 0.86 s | 0.26 to 0.27 s |
934 934
935 +
(The Git figure for 1 000 files was first taken while OxygenFlow was
936 +
building on Earth, as 1.1 to 1.2 s; quiet, Git takes 0.26 s.)
937 +
935 938
Of the one-file commit, about 135 ms is the operation's fsync: on ext4
936 939
with ordered data the first sync also writes the edited file's data.
937 940
Git's default commit does not sync loose objects. Of the 1 000-file
…
33 unchanged lines
971 974
972 975
Under 2 GB needs the texts out of memory once read (stored as the walk
973 976
reads them, the change holding references): the design in the backlog.
977 +
978 +
### Closing summary of backlog 4 (2026-10-02 04:30, Z1)
979 +
980 +
`~/bench/z1.sh` on a quiet Earth (load 0.5 to 1.0, no jobs), the build of
981 +
3d6b6fdd: `vs-git-tuned.sh`, `commit-vs-git.sh`, `commit1000.sh`,
982 +
`checkout-vs-git.sh`, fsck twice each, and `p1.sh` (fresh copies of the
983 +
tip). Git is 2.53; "tuned" is feature.manyFiles, core.untrackedCache and a
984 +
commit-graph.
985 +
986 +
| Operation | oxy, 2026-09-30 | oxy now | Git | Git, tuned |
987 +
|---|---:|---:|---:|---:|
988 +
| init and first commit | 38.5 s, 4.4 GB | **17.4 s**, 2.6 GB | 31.9 s, 41 MB | |
989 +
| status, clean | 0.41 to 0.43 s | 0.10 to 0.12 s | 0.19 to 0.21 s | 0.09 to 0.10 s |
990 +
| status, one file edited | 1.26 to 1.39 s | 0.10 s | 0.19 to 0.20 s | 0.09 to 0.10 s |
991 +
| diff, one file | 1.19 to 1.45 s | 0.15 to 0.16 s | 0.08 to 0.09 s | 0.08 s |
992 +
| commit, one file | about 3.1 s | 0.39 to 0.56 s; 0.29 to 0.35 s after a status | 0.14 to 0.15 s | |
993 +
| commit, 1 000 files | 4.9 s | 0.81 to 0.84 s | 0.26 to 0.27 s | |
994 +
| log -n 100 | 1.39 s | 0.03 s | 0.00 s | 0.00 s |
995 +
| blame MAINTAINERS | 1.18 s | 0.08 s | 0.07 s | 0.07 s |
996 +
| checkout to the first state and back | 2.2 to 2.8 s | 0.74 to 0.78 s | 0.22 to 0.43 s | 0.23 to 0.39 s |
997 +
| fsck | 22.1 s | **7.6 to 10.1 s** | 11.9 to 13.4 s | |
998 +
| gc of a fresh store | 39.7 s | **22.4 s** | 63.3 s | |
999 +
| store after gc | 324 MB | **278 MB** | 296 MB | |
1000 +
1001 +
The first commit's time varies with the page cache: 12.4 s when the tree
1002 +
was read just before, 17.4 s here.
1003 +
1004 +
Where oxy is ahead of Git: the first commit, fsck, gc and the store.
1005 +
Level with tuned Git (and twice as fast as Git as it comes): status, clean
1006 +
and with an edit, by a stat check per directory against the manifest.
1007 +
Close: blame (0.08 against 0.07 s), log (0.03 s, under the 0.05 s target,
1008 +
against Git's 0.00 s).
1009 +
1010 +
Behind, and why:
1011 +
1012 +
- **Diff** (twice Git): the status check costs what Git's whole diff does
1013 +
  (70 ms), and loading the state index adds 40 ms (its tree view 20 ms),
1014 +
  plus about 25 ms of process and manifest reading. A lazily read
1015 +
  (memory-mapped) state index is the next step.
1016 +
- **Commit** (two to three times Git): about 120 ms of a one-file commit
1017 +
  is the operation's fsync, which Git's default commit does not make; on
1018 +
  ext4 it is the journal commit, not the data (starting writeback early
1019 +
  changed nothing). The rest is the stat check (80 ms), the index load
1020 +
  (40 ms) and the manifest written whole (30 to 60 ms). For 1 000 files,
1021 +
  one read of the Linux import's root change for the inline texts of
1022 +
  about 90 of them (110 ms) and rendering (97 ms) add to it.
1023 +
- **Checkout** (three times Git): the fsync again (110 to 145 ms), every
1024 +
  text read verified and decompressed (130 ms), the status check before
1025 +
  it (115 ms), planning (67 ms) and the manifest (72 ms).
1026 +
- **First commit memory**: 2.6 GB resident (2.07 GiB allocated) against
1027 +
  the 2 GB target, because the walk holds every file's text until the
1028 +
  change is stored. Storing texts as the walk reads them, the change
1029 +
  holding references, is the remaining design.
1030 +
1031 +
Not re-measured tonight: status and diff with 1 000 files edited, a local
1032 +
clone.