Model cost and concurrent latency

The released ivygrep 1.3.0 binary ran each model profile 3 times on the same source corpus.

Each run measured enhancement, forced-neural search, and 8 MCP clients during indexing in another workspace.

Released binary

Compared with static-retrieval-v1, enhancement with potion-code-16m-v2 changed elapsed time by +18.4% and peak RSS by -19.4%.

Values show the median across repetitions. Parentheses show the minimum and maximum across repetitions.

ProfileMetricMedian (range)
potion-code-16m-v2Neural enhancement1233.49 ms (1194.36 to 1305.54)
potion-code-16m-v2Enhancement peak RSS144.84 MiB (144.73 to 144.96)
potion-code-16m-v2Enhancement CPU3736.29 ms (3668.74 to 3840.80)
potion-code-16m-v2Enhancement disk writes2.86 MiB (2.86 to 2.88)
potion-code-16m-v2Forced-neural p957.12 ms (6.86 to 7.22)
potion-code-16m-v2Forced-neural p998.09 ms (7.11 to 9.34)
potion-code-16m-v2Concurrent MCP search p95581.53 ms (578.71 to 587.55)
potion-code-16m-v2Concurrent MCP search p99618.71 ms (608.57 to 633.93)
potion-code-16m-v2Concurrent context pack p956039.54 ms (6024.12 to 6261.75)
potion-code-16m-v2Concurrent context pack p996386.99 ms (6285.23 to 6399.24)
potion-code-16m-v2Daemon peak RSS during load362.04 MiB (360.23 to 366.38)
potion-code-16m-v2Daemon RSS after idle pause248.06 MiB (247.53 to 251.63)
potion-code-16m-v2CPU during load388990.00 ms (386430.00 to 389820.00)
potion-code-16m-v2Disk writes during load1383.32 MiB (1373.93 to 1402.31)
potion-code-16m-v2Background indexes completed713.00 runs (710.00 to 720.00)
potion-code-16m-v2Index size, including background workspace14.18 MiB (14.18 to 14.18)
static-retrieval-v1Neural enhancement1042.18 ms (1040.29 to 1070.56)
static-retrieval-v1Enhancement peak RSS179.68 MiB (179.67 to 179.68)
static-retrieval-v1Enhancement CPU3557.71 ms (3551.66 to 3610.98)
static-retrieval-v1Enhancement disk writes2.86 MiB (2.86 to 2.88)
static-retrieval-v1Forced-neural p957.17 ms (6.76 to 7.22)
static-retrieval-v1Forced-neural p998.82 ms (8.63 to 11.24)
static-retrieval-v1Concurrent MCP search p95587.17 ms (574.52 to 607.49)
static-retrieval-v1Concurrent MCP search p99633.57 ms (624.46 to 634.23)
static-retrieval-v1Concurrent context pack p956128.67 ms (5935.99 to 6363.74)
static-retrieval-v1Concurrent context pack p996329.18 ms (6200.01 to 6511.60)
static-retrieval-v1Daemon peak RSS during load309.30 MiB (304.34 to 322.46)
static-retrieval-v1Daemon RSS after idle pause216.66 MiB (205.57 to 230.93)
static-retrieval-v1CPU during load386730.00 ms (380380.00 to 401330.00)
static-retrieval-v1Disk writes during load1387.85 MiB (1373.36 to 1419.13)
static-retrieval-v1Background indexes completed720.00 runs (705.00 to 724.00)
static-retrieval-v1Index size, including background workspace14.17 MiB (14.16 to 14.17)

Local source comparison

Both builds use Linux x86_64 with glibc. The candidate includes the resource changes.

The baseline starts at 89ae90d. The candidate starts at release commit 0e1e393. The intervening commit did not change src.

Candidate implementation: 7906274fc219dc5e97afee8557c0e1a91f0fda96.

These builds are separate from the released musl binary above. Values show the median and range across repetitions.

Search changes include faster MCP index-readiness polling. Context changes reuse readers and parsed input across requests.

ProfileMetricUnchanged sourceCandidateChange
potion-code-16m-v2Hybrid search p95527.83 ms (521.31 to 534.99)90.96 ms (47.33 to 96.72)-82.8%
potion-code-16m-v2Hybrid search p99546.24 ms (544.19 to 548.76)107.49 ms (93.41 to 115.76)-80.3%
potion-code-16m-v2Context pack p951678.51 ms (1677.40 to 1851.72)1139.67 ms (1133.44 to 1250.78)-32.1%
potion-code-16m-v2Context pack p991889.90 ms (1868.09 to 2029.03)1372.18 ms (1306.96 to 1483.03)-27.4%
potion-code-16m-v2Forced-neural p956.52 ms (6.37 to 7.07)6.65 ms (6.59 to 6.70)+1.9%
potion-code-16m-v2Forced-neural p999.32 ms (6.71 to 9.58)7.96 ms (6.88 to 8.73)-14.7%
potion-code-16m-v2Lexical indexing425.06 ms (414.33 to 456.35)426.35 ms (354.04 to 437.03)+0.3%
potion-code-16m-v2Neural enhancement1281.57 ms (1265.28 to 1365.22)1293.16 ms (1271.33 to 1379.00)+0.9%
potion-code-16m-v2Enhancement peak RSS139.29 MiB (139.04 to 139.54)139.29 MiB (139.16 to 139.54)-0.0%
potion-code-16m-v2Daemon peak RSS846.06 MiB (832.80 to 855.30)594.89 MiB (591.44 to 605.48)-29.7%
potion-code-16m-v2Daemon RSS after idle pause818.03 MiB (791.70 to 823.75)562.06 MiB (559.11 to 579.27)-31.3%
potion-code-16m-v2CPU during load135650.00 ms (134430.00 to 136940.00)53970.00 ms (53370.00 to 54630.00)-60.2%
potion-code-16m-v2Disk writes during load612.99 MiB (611.77 to 619.62)240.27 MiB (239.40 to 241.76)-60.8%
potion-code-16m-v2Background index p9562.49 ms (59.79 to 63.54)60.21 ms (59.46 to 67.72)-3.6%
potion-code-16m-v2Background indexes completed314.00 runs (313.00 to 319.00)124.00 runs (121.00 to 125.00)-60.5%

This is a shared-host comparison. It does not prove the same change on every repository or host.

Binary SHA-256: baseline e19f6736a63d030d7eb413a5b6532b81a2dcd2722b839aa4b02cfdefef6eb38f, candidate b68d63f8833b7ffcd02136c20dd15c3a12e0e12406494a7050c44f5bad5b4b27.

Baseline JSON and candidate JSON contain every measured sample.

Candidate stage timings

A separate diagnostic run used 16 samples per latency path and enabled debug logs. Its resource totals are separate from the comparison above.

Stages can be nested. Do not add their percentiles to estimate request p95.

RunStageSamplesp50p95
1background_cpu_wait230.002 ms0.002 ms
1context_anchor_tests168.058 ms14.093 ms
1context_assembly16447.051 ms1297.299 ms
1context_budget161.027 ms1.802 ms
1context_graph1664.896 ms109.997 ms
1context_input1613.028 ms16.445 ms
1context_prepare160.182 ms0.260 ms
1context_retrieval1625.735 ms30.817 ms
1context_seeds1623.189 ms409.032 ms
1context_symbols1643.284 ms785.998 ms
1foreground_cpu_wait560.002 ms0.003 ms
1semantic_ann2040.508 ms0.815 ms

Semantic recoveries: 0. Exact scans: 0. Eligible SQLite keys visited for exact scoring: 0.

This corpus does not measure recovery under heavy candidate rejection. The regression fixture covers eight orphan vectors that displace four visible keys.

In that fixture, overfetch recovers four visible keys without an exact scan. A request for five keys still scans the four eligible SQLite keys.

Diagnostic JSON contains each stage sample and the binary identity.

What these measurements mean

Each latency path has 128 measured samples per run. Concurrent context packs use a 2000-token budget.

The query-result cache is disabled. Forced-neural calls verify that the neural tier ran. MCP searches use normal hybrid routing.

The eight queries repeat. Neural query-vector and file-preview caches keep their default behavior.

MCP clients start fresh. Their first calls include index-readiness polling and watcher setup. These are end-to-end tool latencies.

The corpus starts as a Git repository without a commit. Its files are untracked, so context packs also process current changes.

Peak RSS for enhancement comes from per-child wait4. Daemon RSS is sampled every 20 ms.

Idle RSS follows a 3-second pause. CPU is process CPU time. Disk writes measure filesystem I/O, including index and log writes.

Load resource totals describe the daemon. They exclude MCP client processes. Enhancement totals describe the invoked CLI process.

The background loop completes a variable number of index runs. Load CPU and write totals also reflect that count.

The empirical p99 uses the nearest observed rank. This sample count cannot establish a stable production tail-latency guarantee.

These measurements do not replace retrieval-quality results. The model screening used one repetition.

The source corpus contains 65 files and 3465965 bytes from revision 89ae90d58806dac145b6129bfc68ec450658a37e.

Binary SHA-256: 67442119757c2441d491d6db0d88f1acd0683e2a1ace68b5343f05edf0ff1ffa. Corpus SHA-256: b4e6f6e9f4efda6e259ed0d23d8381a0661df4434167a882bd079604fcaddea8.

Measured at 2026-09-26T19:34:40.963736+00:00. The JSON records the harness hashes and every repetition.

Benchmark runner and reproduction commands.