interplane.Get Omega
Read in your language

interplane-forge

INTERPLANE Forge

Brought by drakestapleton

branch main Branches Tags History

interplane-forge / docs / PERF.md

115 lines · 8712 bytes Raw Blame History Rendered
1# Forged page time, memory and size
2
3Lane E of L1008 (card t_e5e50a41). Every number here was measured on the Spark with the method below;
4percentiles come from Wolfram. A gain is claimed only when it is larger than the run-to-run spread of
5the same method.
6
7## Method
8
9- Client: `nodes/tests/measure.sh OUTDIR URL` (`curl`, one request at a time, nice 10). Routes: `/`,
10 `/explore`, `/drakestapleton`, `/drakestapleton/cuda-crack` and its `tree/main`, `commits/main`,
11 `blob/main/README.md`, `issues`, `patches`, `releases`, then `/login`, `/search?q=omega` and
12 `/assets/forge.css`. Each route gets one uncounted warmup request and then 32 timed requests with
13 `X-Forge-Base: /`, then the same with `X-Forge-Base: /forge/`. Two full passes per run.
14- Clock: curl `time_total`, seconds, every response code recorded (all 200 in the runs below).
15- Percentiles: Wolfram `Quantile[samples, {1/2, 19/20}]` on each cell of 32 samples: p50 and p95.
16- Memory: `VmRSS` and `VmHWM` from `/proc/<pid>/status` of the measured forged, before the run and
17 after each pass. Size: byte size and sha256 of the binary.
18- Spread: the same cell measured in two passes (live) or two rounds (A/B). A change is a gain only
19 when it is larger than the spread of both variants.
20
21## Live server now
22
23Live forged before this lane (deployed from a427379, 597972 bytes, sha256 `c55fa3b3decfcc5684949f51237ae279d6394c3ca208987d721439f4b68e01a9`),
24on its production cores, measured 2026-11-09T05:55Z through 127.0.0.1:18480. 1664 samples, all 200.
25RSS 21604 kB before, 21620 kB after both passes; high-water 21964 kB.
26
27| Route | p50 / pass 1 | p50 / pass 2 | p50 /forge/ pass 1 | p50 /forge/ pass 2 | p95 range |
28|---|---|---|---|---|---|
29| `/search?q=omega` | 0.6068 s | 0.6482 s | 0.6028 s | 0.6110 s | 0.690 to 0.785 s |
30| repository home | 13.1 ms | 19.1 ms | 19.0 ms | 18.8 ms | 18.4 to 30.0 ms |
31| tree, commits, blob | 11.9 to 13.3 ms | 10.6 to 20.1 ms | 9.9 to 13.0 ms | 10.1 to 20.7 ms | 13.2 to 27.9 ms |
32| issues, patches, releases | 4.1 to 5.2 ms | 4.5 to 5.3 ms | 2.2 to 2.9 ms | 3.3 to 3.7 ms | 3.6 to 18.9 ms |
33| `/`, `/explore`, `/drakestapleton`, `/login`, css | under 0.6 ms | under 0.6 ms | under 0.6 ms | under 0.6 ms | up to 17.5 ms |
34
35Search is the slow page: it runs `git grep` over every public repository, one after another. The
36repository pages spend their time in the git processes they start. The live spread between passes is
37large (repository home 13.1 ms against 19.1 ms), because the live server shares the machine with
38everything else; the A/B below runs both binaries on the same reserved cores, alternating.
39
40## A/B: this lane against its base
41
42`nodes/tests/ab.sh time`: base b413007 (the live code) and this lane, built by the pinned omc,
43running side by side on cores 10-11 against the same storage view (ports 18486 and 18487, empty data
44dirs), rounds in the order base, after, base, after, measured 2026-11-09T06:50Z to 06:57Z. 1664 samples
45per round, all 200; every route returned the same number of bytes from both binaries. Each range below
46is the lowest and highest p50 of four cells (two rounds, two passes), in ms.
47
48| Route | base `/` | after `/` | base `/forge/` | after `/forge/` | p95 base | p95 after |
49|---|---|---|---|---|---|---|
50| `/` | 0.36 to 0.46 | 0.45 to 0.50 | 0.36 to 0.43 | 0.38 to 0.47 | 0.38 to 0.65 | 0.43 to 0.96 |
51| `/explore` | 0.36 to 0.46 | 0.44 to 0.59 | 0.35 to 0.42 | 0.38 to 0.42 | 0.38 to 0.59 | 0.43 to 0.70 |
52| `/drakestapleton` | 0.40 to 0.51 | 0.43 to 0.53 | 0.38 to 0.44 | 0.41 to 0.47 | 0.41 to 0.59 | 0.45 to 0.67 |
53| repository home | 11.9 to 15.3 | 11.1 to 13.0 | 11.9 to 15.1 | 10.8 to 12.2 | 12.7 to 18.5 | 11.9 to 40.3 |
54| `<repo>/tree/main` | 11.0 to 11.6 | 10.8 to 11.8 | 10.4 to 13.7 | 11.3 to 12.8 | 12.1 to 19.0 | 11.8 to 33.1 |
55| `<repo>/commits/main` | 6.2 to 7.4 | 6.6 to 7.5 | 6.6 to 8.9 | 6.8 to 7.9 | 7.2 to 10.6 | 7.5 to 9.1 |
56| `<repo>/blob/main/README.md` | 8.4 to 8.5 | 7.8 to 10.0 | 8.0 to 10.6 | 8.4 to 9.6 | 8.6 to 18.8 | 9.0 to 12.1 |
57| `<repo>/issues` | 2.0 to 2.4 | 2.0 to 2.9 | 2.4 to 3.3 | 2.0 to 2.6 | 2.3 to 6.7 | 2.3 to 4.0 |
58| `<repo>/patches` | 2.0 to 2.7 | 2.3 to 2.5 | 2.4 to 3.4 | 1.9 to 2.3 | 2.3 to 4.4 | 2.3 to 4.1 |
59| `<repo>/releases` | 1.7 to 2.6 | 2.1 to 2.4 | 2.3 to 2.9 | 1.9 to 2.1 | 2.0 to 3.8 | 2.2 to 4.5 |
60| `/login` | 0.25 to 0.45 | 0.29 to 0.34 | 0.32 to 0.49 | 0.30 to 0.34 | 0.27 to 0.61 | 0.34 to 0.88 |
61| `/search?q=omega` | 783 to 799 | 10.0 to 15.5 | 787 to 810 | 11.3 to 14.3 | 1261 to 1319 | 11.8 to 60.7 |
62| `/assets/forge.css` | 0.28 to 0.34 | 0.29 to 0.40 | 0.29 to 0.46 | 0.31 to 0.48 | 0.31 to 0.61 | 0.34 to 0.64 |
63
64Claimed:
65
66- **Search, faster.** p50 783 to 810 ms became 10.0 to 15.5 ms. The spread of p50 is 16.4 ms (base) and
67 5.5 ms (after) under `/`, 23.0 ms and 3.0 ms under `/forge/`; the gap between the slowest after cell and
68 the fastest base cell is 767 ms under `/` and 773 ms under `/forge/`, at least 50 times faster. p95:
69 gap 1214 ms and 1243 ms. Cause: the page shows at most 100 lines, and `omega` fills them from the first
70 repositories; the old code still ran `git grep` to the end in all 30. The new code stops each grep once the
71 page has the lines it can still show, so the page bytes are the same (checked on 14 pages, below).
72 Wolfram: `Max[rb]-Min[rb]` and so on over the four cells, `Min[rb]-Max[ra]` → 767.069 ms (`/`),
73 772.836 ms (`/forge/`), `Min[rb]/Max[ra]` → 50.53, `Min[fb]/Max[fa]` → 54.89.
74- **Memory, smaller.** Peak RSS after a full pass: base 12720 kB in both rounds, after 10176 to 10180 kB:
75 2540 kB less (Wolfram `12720-10180` → 2540). The difference is the git grep output that is no longer read.
76 Starting RSS is the same (base 9948 kB, after 9900 kB).
77
78Not claimed:
79
80- A query with fewer than 100 hits (for example `kanban`, 11 hits) still runs every grep to the end, as
81 before; it was not timed. The added work is a newline count over bytes already read.
82- Repository pages no longer start `git symbolic-ref` for the default branch (`nodes/head.om` reads the
83 HEAD file). Repository home p50 went from 11.9 to 15.3 ms to 10.8 to 13.0 ms: the ranges overlap, so no
84 gain is claimed. `patches` and `releases` under `/forge/` came out faster than every base cell, but not
85 under `/`, so that is not claimed either.
86- Binary size grew: 597988 bytes (base, sha256 `c3b19c94…`) to 612088 bytes (after, sha256 `e9f35ad1…`),
87 14100 bytes more for `/status`, `nodes/head.om` and `nodes/srch.om`; 612840 bytes (sha256 `9a768bfc…`,
88 14852 more than base) after the fix round below.
89
90Dropped first attempt: before the early stop, search ran up to six repositories' greps at once
91(same page bytes, checked the same way). Measured with this method on the same two cores, it was slower:
92p50 base 784 to 811 ms, after 868 to 893 ms; spreads 27 ms and 25 ms, slower by 57 to 109 ms (Wolfram
93`0.867933-0.810881` → 0.057, `0.893065-0.783612` → 0.109). `git grep` already uses every core it is
94given, so six at once only competed, and they also searched repositories the page never needed. It was
95removed. Numbers: `evidence-nodes/attempt1-parallel/` in the hand-off folder.
96
97### Recheck at the fix-round head
98
99The fix round (strict snapshot line shape, `docs/NODES.md`) changed only `/status` parsing and the writer,
100but it changed the binary, so the same `ab.sh time` ran again on 2026-11-09T07:27Z to 07:36Z: same base
101binary, after rebuilt at the fix-round head (612840 bytes, sha256 `9a768bfc…`). 1664 samples per round,
102all 200, the same bytes per route and base in all four rounds.
103
104- Search p50: base 1290 to 1307 ms under `/` and 1292 to 1320 ms under `/forge/`; after 13.3 to 16.1 ms
105 and 13.5 to 15.5 ms. Spreads 16.3 and 2.8 ms (`/`), 28.1 and 2.0 ms (`/forge/`); gap 1274 ms and 1276 ms,
106 at least 80 times faster. p95 gap 4549 ms and 4627 ms. Wolfram over the four cells: `Min[rb]-Max[ra]` →
107 1274.217 ms, `Min[fb]-Max[fa]` → 1276.366 ms, `Min[rb]/Max[ra]` → 80.27, `Min[fb]/Max[fa]` → 83.58.
108- Peak RSS: base 12708 to 12720 kB, after 10216 kB: 2492 to 2504 kB less (Wolfram).
109- Drift between runs: the base search p50 was 783 to 810 ms in the first run and 1290 to 1320 ms here,
110 40 minutes later on the same cores; after went from 10.0 to 15.5 ms to 13.3 to 16.1 ms. Absolute times
111 move between runs, so only the comparison inside one run is claimed; both runs give the same result.
112- Repository home under `/`: base 13.1 to 17.4 ms, after 10.2 to 12.0 ms. The 1.1 ms gap is smaller than
113 the base spread (4.3 ms) and the cells overlap under `/forge/` (Wolfram `Min[hfb]-Max[hfa]` → -2.649 ms),
114 so it is still not claimed.
115- Numbers: `evidence-nodes/ab-fix-round/` in the hand-off folder.