Skip to content

Commit 7e9acd8

Browse files
shengyfuCopilot
andcommitted
Document bounded managed lifecycle measurements
Co-authored-by: Copilot App <[email protected]>
1 parent 710b9ad commit 7e9acd8

1 file changed

Lines changed: 180 additions & 1 deletion

File tree

‎SHARED_INDEX_BENCHMARKS.md‎

Lines changed: 180 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ new lifecycle without relabeling these baseline results.
1212

1313
[`managed_performance.rs`](tgrep-cli/tests/shared_daemon/managed_performance.rs)
1414
uses real managed daemons and public versioned RPC with independent CLI/scan
15-
parity checks. It measures a bounded representative workload, not a
15+
parity checks. It measures a bounded synthetic fixture, not a
1616
machine-independent latency/storage threshold or a replacement for the historical
1717
ordinary-versus-v1 comparison below.
1818

@@ -81,6 +81,185 @@ progress proof. Fresh means a new managed store, **not** an OS cache purge.
8181
Measure stable final source on a quiet native host and retain exact reports;
8282
do not combine observations from different source hashes or overlapping builds.
8383

84+
### Measured managed lifecycle: 9 October 2026
85+
86+
**These five bounded release runs reused published generations, preserved
87+
shared-v2/scan parity and reclaimed obsolete data while ready views remained
88+
available.** They are bounded synthetic fixtures, one run per environment, not
89+
confidence intervals, production-scale qualification or evidence that managed sharing improves query
90+
latency over ordinary indexing. In particular, the successor attachment in this
91+
fixture rebuilt all tracked blobs; it does not demonstrate incremental-build
92+
savings.
93+
94+
The measured code and harness are
95+
[`87bdd224633ce4044fbbfa0a40c51e340c982c07`](https://github.com/microsoft/tgrep/commit/87bdd224633ce4044fbbfa0a40c51e340c982c07).
96+
All runs used Cargo-selected release executables with `managed-test-hooks`
97+
compiled in but **no injected pauses**. Later documentation-only commits do not
98+
reattribute these executions. These measurements are separate from hook-free
99+
default and normally installed release qualification. The three hosted reports
100+
and their captured executables are artifacts of
101+
[native qualification run 37883761891](https://github.com/microsoft/tgrep/actions/runs/37883761891).
102+
103+
The two local runs used immutable source archives, Windows first and native
104+
WSL2 Linux second, after owned builds/tests and artifact preparation finished.
105+
Original and retained CLI/harness images matched before and after execution;
106+
all 204 archived files remained unchanged. Their reports explicitly mark Git
107+
revision unavailable: enclosing-checkout metadata is not used to label an
108+
archive. Archive/source fingerprints and Cargo capture records establish their
109+
relationship to the measured commit. Raw reports, invocation/environment
110+
records, pre/post image hashes and checked cleanup results were retained.
111+
Unrelated load on the shared local host was not controlled; no OS caches were
112+
purged.
113+
114+
Every run used two repositories, four initial ready worktrees and one successor,
115+
with 256 generated 4096-byte files plus three base fixture files per repository.
116+
The successor changed the first quarter of the generated files. Each namespace
117+
had two work slots, a 16-item queue and 64 MiB staging/private-work budgets.
118+
Requested collection passes allowed 16 examined objects, two removals, 65,536
119+
deleted bytes, one page and 1,000 ms. The 1-byte retention target remained below
120+
protected data; reaching that target was not claimed.
121+
122+
All UTC windows below are on **2026-10-09** and include fixture setup, lifecycle
123+
work, owned-child shutdown and successful checked removal of both fixture trees.
124+
Toolchain, hardware and filesystem differences make cross-row latency rankings
125+
inappropriate. Linux's reported native filesystem type is `0xef53`; local
126+
fixtures were on native ext4, not a Windows-mounted directory.
127+
128+
| Run | Platform / filesystem | Visible CPUs | rustc / Git | UTC window |
129+
| --- | --- | ---: | --- | --- |
130+
| Local Windows | x86_64 / NTFS | 16 | 1.98.0 / 2.53.0.windows.4 | 05:15:35.666-05:17:26.378 |
131+
| Local Linux | WSL2 x86_64 / ext4 | 16 | 1.98.1 / 2.43.0 | 05:18:14.298-05:18:28.355 |
132+
| CI Windows | x86_64 / NTFS | 4 | 1.98.1 / 2.55.0.windows.5 | 04:27:14.003-04:27:48.658 |
133+
| CI Linux | x86_64 / `0xef53` | 4 | 1.99.0 / 2.55.0 | 04:27:05.783-04:27:15.654 |
134+
| CI macOS | aarch64 / APFS | 3 | 1.98.1 / 2.55.0 | 04:26:43.273-04:27:30.274 |
135+
136+
#### Readiness and lifecycle times
137+
138+
Times are **milliseconds**, rounded to one decimal. A/B pairs are the two
139+
repositories, not aggregated samples. First/reuse attachments are measured from
140+
request to reconciled readiness. Routing readiness is separate. Migration 1/2
141+
are sequential advances of existing views to the already published successor;
142+
warm values are routing/attachment after shutdown and restart. These are
143+
observed operation times including polling and observation costs, not pure
144+
builder or filesystem timers.
145+
146+
| Run | Fresh routing A/B | First attach A/B | Reuse attach A/B | Successor attach | Migration 1/2 | Warm routing/attach |
147+
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
148+
| Local Windows | 589.4 / 589.7 | 5331.7 / 4823.4 | 3350.2 / 3679.9 | 7909.5 | 4254.6 / 3173.2 | 590.6 / 4132.8 |
149+
| Local Linux | 128.6 / 75.5 | 595.0 / 532.6 | 329.7 / 475.9 | 818.5 | 162.4 / 365.8 | 71.8 / 191.3 |
150+
| CI Windows | 157.7 / 162.1 | 1664.0 / 1844.7 | 1006.7 / 1241.1 | 2372.8 | 1177.4 / 1141.3 | 127.2 / 1040.7 |
151+
| CI Linux | 36.8 / 44.2 | 278.7 / 271.1 | 126.8 / 117.3 | 277.4 | 151.2 / 151.2 | 37.4 / 130.6 |
152+
| CI macOS | 176.4 / 148.5 | 717.2 / 521.0 | 391.7 / 437.4 | 810.9 | 649.2 / 681.4 | 216.5 / 375.0 |
153+
154+
In every run, the first repository's initial generation read/extracted 259 blobs
155+
(1,048,664 bytes). The successor read/extracted 259 blobs (1,049,102 bytes), with
156+
zero predecessor postings reused. Reuse attachments, both migrations and warm
157+
attachment instead reported existing-generation reuse and zero generation blob
158+
reads. That does **not** eliminate worktree verification: each migration/restart
159+
read 259 or 260 files and approximately 1 MiB of current worktree contents.
160+
161+
The following are sealed logical publication sizes for repository A, in bytes,
162+
not physical device writes, sort spill or repeated-write totals.
163+
164+
| Run | Initial/successor generation | Initial/successor checkpoint |
165+
| --- | ---: | ---: |
166+
| Local Windows | 313013 / 281926 | 1669 / 3169 |
167+
| Local Linux | 312938 / 281843 | 1530 / 2277 |
168+
| CI Windows | 313009 / 281921 | 1671 / 3261 |
169+
| CI Linux | 312937 / 281848 | 1533 / 2286 |
170+
| CI macOS | 312991 / 281910 | 1649 / 3245 |
171+
172+
#### Queries during work
173+
174+
Each cell below is **sample count; p50 / p95 milliseconds** for the first
175+
unaffected ready view surveyed in repository A during that phase. These are
176+
separate series, never pooled across views, phases or runs. Each query measures
177+
fresh-connection lookup plus search JSON-RPC, excluding CLI process startup.
178+
Other surveyed views and collection-phase series remain in the raw reports.
179+
With one sample, p50 and p95 are the same observation; these very small samples
180+
do not establish robust tail latency.
181+
182+
The final column counts whole query/status batches bracketed by `preparing`
183+
operation states. Zero means that the sampler did not prove such overlap,
184+
not that queries were blocked or that no preparation occurred. Separate
185+
deterministic barrier tests establish progress during preparation/retirement.
186+
187+
| Run | Successor | Migration 1 | Migration 2 | Preparing batches: successor/1/2 |
188+
| --- | ---: | ---: | ---: | ---: |
189+
| Local Windows | 7; 225.372 / 236.967 | 4; 201.140 / 238.741 | 3; 280.632 / 340.220 | 5 / 2 / 1 |
190+
| Local Linux | 5; 30.750 / 34.832 | 1; 30.505 / 30.505 | 2; 34.888 / 38.913 | 3 / 0 / 0 |
191+
| CI Windows | 6; 79.289 / 122.596 | 3; 88.346 / 111.254 | 3; 76.562 / 81.561 | 4 / 1 / 1 |
192+
| CI Linux | 2; 30.008 / 30.018 | 1; 33.562 / 33.562 | 1; 32.039 / 32.039 | 0 / 0 / 0 |
193+
| CI macOS | 1; 139.991 / 139.991 | 1; 56.801 / 56.801 | 1; 126.557 / 126.557 | 0 / 0 / 0 |
194+
195+
#### Collection and resource observations
196+
197+
Collection sums cover distinct sequential requested passes, not concurrent
198+
work or quantiles. Observed call time includes ready-view queries, status
199+
sampling and transport/polling; worker time is the sum of the core's recorded
200+
elapsed counters. All passes honored their count/byte/page bounds and reported
201+
no errors or elapsed-budget overruns. Each run's complete collection sequence
202+
physically removed the original generation. Reclaimed bytes below are the calls'
203+
actual logical-byte receipts, not an estimate of physical disk space returned.
204+
205+
| Run | Passes | Observed call total ms | Worker total ms | Reclaimed logical bytes |
206+
| --- | ---: | ---: | ---: | ---: |
207+
| Local Windows | 28 | 27555.0 | 2935.9 | 317,856 |
208+
| Local Linux | 28 | 4448.1 | 438.4 | 316,743 |
209+
| CI Windows | 28 | 9964.7 | 1170.6 | 317,939 |
210+
| CI Linux | 28 | 3760.1 | 120.5 | 316,761 |
211+
| CI macOS | 33 | 21869.3 | 292.7 | 317,891 |
212+
213+
Authentication used 13 verification pages and no proof restarts in each
214+
Windows/Linux run. macOS used 21 pages and three proof restarts, verifying
215+
489,923 bytes for 317,891 reclaimed logical bytes. Verification work and
216+
reclamation are different quantities.
217+
218+
The following **MiB** values are each field's largest sampled value for
219+
namespace A during successor attachment, migrations and collection; cold/warm
220+
samples remain separately available in the reports. Paired maxima need not
221+
occur together and must not be summed into a global peak. Storage includes
222+
known logical catalog/control/object data; charged overlap additionally
223+
includes outstanding reservations. Mapped and retained-private values are
224+
namespace accounting, while the final pair is native **daemon-process**
225+
resident/private memory, not namespace-attributed physical usage.
226+
227+
| Run | Known/charged logical | Mapped/retained-private estimate | Reserved staging/private work | Daemon resident/private |
228+
| --- | ---: | ---: | ---: | ---: |
229+
| Local Windows | 4.84 / 36.55 | 0.45 / 1.75 | 32.00 / 34.00 | 24.93 / 7.33 |
230+
| Local Linux | 4.83 / 36.26 | 0.45 / 1.70 | 32.00 / 32.00 | 20.25 / 7.37 |
231+
| CI Windows | 4.96 / 36.45 | 0.45 / 1.75 | 32.00 / 34.00 | 17.05 / 6.42 |
232+
| CI Linux | 4.80 / 35.17 | 0.45 / 1.49 | 32.00 / 32.00 | 20.50 / 7.89 |
233+
| CI macOS | 4.97 / 4.97 | 0.45 / 1.52 | 0.00 / 0.00 | 19.80 / unavailable |
234+
235+
The macOS reservation zeros mean no reservation was caught at these selected
236+
sample points, not zero actual allocation. All sample maxima are lower bounds;
237+
Windows private committed bytes and Linux anonymous-resident bytes have
238+
different meanings. macOS private memory, Git-child peak memory and physical
239+
device I/O are explicitly unavailable. These observations do not establish a
240+
process-tree RSS cap or an unsampled global peak.
241+
242+
<details>
243+
<summary>Exact report, CLI and harness SHA-256 identities</summary>
244+
245+
| Run | Report | CLI | Harness |
246+
| --- | --- | --- | --- |
247+
| Local Windows | `ffafc6576e667a9447062b4b41f69ea0c877a1b24d0c1559ebaf084b017aa083` | `e7e613a6ec31f10071457f805d01bf7504f1e50da6ad433cd369a293f932eca1` | `b5d99673b91c0ba815744417d89a50af0b66c985a2b7034c4d6ed0740bfd990b` |
248+
| Local Linux | `956c1f23becb878ecd89ba5dc2c23d56249239ff4775c7355332b1bacd2267ab` | `864755756a192bf7d38e4287cda19ddc2bdd4e3188c4e311aa826fe729964e8a` | `dfc3956a11b69b7a7739697267d9876c083552601e01017624f3bb846efc7d4a` |
249+
| CI Windows | `42562ecbd793034c0f9c759a06922d67f7e0aa2f8ee2463aa5530ea2388cb482` | `70a3b1b4e7eeeaa2633b3b4ca5ac910eebb8071436865898a5e88a7cad970c8f` | `e7c2264332fab6e5c22a616803778ecafea22445fa54db29e61632469d400360` |
250+
| CI Linux | `26fed0b524f99181adee68bfc731f521bd8bc70050fdb32ad10781aabd0fc9dc` | `76724fdfd6a68ef6083f998f8a0518d11500bc23d4cf26872911ebff975253c3` | `62063b9b0f93e096241e5f9741b2a3c94e6edac8d2406bb25a5c0cd556d2374d` |
251+
| CI macOS | `1d0fa3e8a7589355c599e8b0eea3b70cbad064e79a0fc2ea78598471c493f615` | `708b8b4a34f5c2fb30c520e0b393b982aa4f52e9467d5f9d1426ff25fa39f9ae` | `5daadbb0f05c9edaf7766e1b5a852b54131e93558fc6f13e1a0d623bbecef9e8` |
252+
253+
The report-defined fingerprint covers 98 source inputs. Both local archives
254+
and hosted Windows have BLAKE3
255+
`038440b19d78ca4bb11943675e8151e99822d80a963c2f396ed20e439c29a418`
256+
(3,615,370 bytes); hosted Linux/macOS use LF checkout bytes with BLAKE3
257+
`d14d68dbc26b1ad47ef69f3b84a403974bc11f93e5038e04c1bfea95f16f74cb`
258+
(3,524,761 bytes). These distinct byte fingerprints were checked against their
259+
matching source archives rather than treated as interchangeable.
260+
261+
</details>
262+
84263
## Measured baseline: 6 October 2026
85264

86265
**Sharing saves substantial LF memory/storage in this fixture, but is not a

0 commit comments

Comments
 (0)