Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions benchmarks/idle-budget/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,52 @@ Overrides (`GATE_CPU_PERCENT`, `GATE_WAKEUPS_PER_S`,
defaults are the CI contract. If a gate fails, the finding is the point — do
not move the line to make a run pass.

### Calibration update, 2026-09-22 — #1024 tranche 1 (lazy request-cache seen-set)

`6526e8ea` (`perf(#1024): request-cache seen-set allocates on first tracked
search`) removed the eager `RequestCacheSeen::with_capacity(65_536)` at both
`Index` construction sites: the seen-set now starts empty and grows on first
`record()`, so an index that has never served a `request_cache=true` search
holds nothing. Same host, same fixture, `ci-test` binaries, allocator pins
on; before-binary rebuilt from `ed510a61` (the commit's parent, single-file
diff). Result files: `result-p1024-n150-4cpu.json`,
`result-p1024-n450-4cpu.json` (before, 4-vCPU), `result-p1024-after-n150-4cpu.json`,
`result-p1024-after-n450-4cpu.json` (after, 4-vCPU), `result-p1024-before-32cpu-n450.json`
/ `result-p1024-after-32cpu.json` / `result-p1024-after-32cpu-rerun.json`
(32-vCPU N=450 pair — the before arm was added because every earlier 32-vCPU
reading was N=300).

| 4-vCPU (`taskset -c 0-3`) | before | after | Δ |
|---|---|---|---|
| per-index idle RSS, N=150 | 204.9 kB | 63.2 kB | −69 % |
| per-index idle RSS, N=450 | 203.7 kB | 63.3 kB | −69 % |
| N-slope, VmRSS (450−150)/300 | 206.5 kB/idx | 63.7 kB/idx | −69 % |
| N-slope, RssAnon (450−150)/300 | 205.7 kB/idx | 68.8 kB/idx | −67 % |
| idle CPU, N=450 | 0.225 % | 0.192 % | −15 %rel |
| wakeups/s, N=450 | 25.2 | 21.4 | − |
| boot-to-green, N=450 | 6 ms | 6 ms | — |
| WAL replay after clean flush | 0 | 0 | — |

| 32 vCPU (unpinned), N=450 | before | after (2 runs) |
|---|---|---|
| per-index idle RSS | 199.0 kB | 66.3 / 62.6 kB |
| idle CPU | 0.767 % (loadavg 19) | 0.650 / 0.633 % (loadavg 3–4) |
| wakeups/s | 22.6 | 25.9 / 22.2 |
| boot-to-green | 385 ms (loaded window) | 113 / 7 ms |

The subtraction and the N-slope now agree (~64 kB/idx): the curve is flat at
a genuinely O(N)-constant ~0.06 MB/index, and issue #874's 0.2 MB/index
product line is met on both host shapes with >3× margin. The remaining
~64 kB/idx is the next tranche's target (per-index DashMap shard arrays,
WAL/memtable shard structs, parsed settings/mapping copies).

Pre-existing, unchanged by this commit: the unpinned 32-vCPU arm at N=450
reads >0.5 % idle CPU on the **before** binary too (0.767 %) — the gate line
was calibrated on 4-vCPU and quiet-N=300 windows, and both binaries trip it
on that arm on this shared box. The controlled 4-vCPU pair above is the
comparison that matters; wakeups (the timer-churn proxy) are flat on every
arm. The issue stays open for the follow-up tranches.

## Reproduce

```sh
Expand Down
108 changes: 108 additions & 0 deletions benchmarks/idle-budget/results/result-p1024-after-32cpu-rerun.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"label": "p1024-after-32cpu-rerun",
"date_utc": "2026-09-22T04:21:14+00:00",
"binary": {
"version": "xerj v1.0.0-rc.77",
"path": "/root/xerj-1024/engine/target/ci-test/xerj"
},
"corpus": {
"shape": "15x30",
"indices": 450,
"docs_per_index": 3
},
"port": 9610,
"window_s": 120.0,
"settle_target_s": 120.0,
"boot_ms": {
"empty_node": 7,
"baseline_arm": 6,
"n_indices": 7
},
"wal_replay_lines_after_clean_flush": 0,
"doc_probe_hits": 3,
"baseline": {
"pid": 3779830,
"window_s": 120.0,
"clk_tck": 100,
"cpu_ticks": 11,
"cpu_percent_of_one_core": 0.0917,
"wakeups_per_s": 23.7,
"voluntary_per_s": 23.7,
"nonvoluntary_per_s": 0.1,
"rss_kb": 77892,
"hwm_kb": 78860,
"rss_anon_kb": 47404,
"rss_file_kb": 30488,
"anon_hugepages_kb": 0,
"threads": 340,
"fds": 15,
"per_thread_cpu": [
{
"comm": "xerj-mem-sample",
"cpu_ticks": 4,
"threads": 1,
"cpu_percent_of_one_core": 0.033
},
{
"comm": "xerj-rt",
"cpu_ticks": 3,
"threads": 1,
"cpu_percent_of_one_core": 0.025
},
{
"comm": "xerj-memtable-s",
"cpu_ticks": 1,
"threads": 1,
"cpu_percent_of_one_core": 0.008
}
],
"loadavg_start": [
"2.45",
"10.52",
"12.76"
]
},
"measurement": {
"pid": 3781903,
"window_s": 120.0,
"clk_tck": 100,
"cpu_ticks": 76,
"cpu_percent_of_one_core": 0.6333,
"wakeups_per_s": 22.2,
"voluntary_per_s": 21.9,
"nonvoluntary_per_s": 0.4,
"rss_kb": 106084,
"hwm_kb": 106084,
"rss_anon_kb": 73636,
"rss_file_kb": 32448,
"anon_hugepages_kb": 0,
"threads": 336,
"fds": 15,
"per_thread_cpu": [
{
"comm": "xerj-rt",
"cpu_ticks": 64,
"threads": 3,
"cpu_percent_of_one_core": 0.533
},
{
"comm": "xerj-memtable-s",
"cpu_ticks": 8,
"threads": 1,
"cpu_percent_of_one_core": 0.067
},
{
"comm": "xerj-mem-sample",
"cpu_ticks": 4,
"threads": 1,
"cpu_percent_of_one_core": 0.033
}
],
"loadavg_start": [
"3.24",
"7.58",
"11.29"
]
},
"per_index_rss_kb": 62.6
}
108 changes: 108 additions & 0 deletions benchmarks/idle-budget/results/result-p1024-after-32cpu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"label": "p1024-after-32cpu",
"date_utc": "2026-09-22T04:06:02+00:00",
"binary": {
"version": "xerj v1.0.0-rc.77",
"path": "/root/xerj-1024/engine/target/ci-test/xerj"
},
"corpus": {
"shape": "15x30",
"indices": 450,
"docs_per_index": 3
},
"port": 9610,
"window_s": 120.0,
"settle_target_s": 120.0,
"boot_ms": {
"empty_node": 5,
"baseline_arm": 7,
"n_indices": 113
},
"wal_replay_lines_after_clean_flush": 0,
"doc_probe_hits": 3,
"baseline": {
"pid": 3772779,
"window_s": 120.0,
"clk_tck": 100,
"cpu_ticks": 11,
"cpu_percent_of_one_core": 0.0917,
"wakeups_per_s": 23.7,
"voluntary_per_s": 23.5,
"nonvoluntary_per_s": 0.2,
"rss_kb": 76540,
"hwm_kb": 76644,
"rss_anon_kb": 47304,
"rss_file_kb": 29236,
"anon_hugepages_kb": 0,
"threads": 340,
"fds": 15,
"per_thread_cpu": [
{
"comm": "xerj-mem-sample",
"cpu_ticks": 4,
"threads": 1,
"cpu_percent_of_one_core": 0.033
},
{
"comm": "xerj-rt",
"cpu_ticks": 3,
"threads": 1,
"cpu_percent_of_one_core": 0.025
},
{
"comm": "xerj-memtable-s",
"cpu_ticks": 2,
"threads": 1,
"cpu_percent_of_one_core": 0.017
}
],
"loadavg_start": [
"3.34",
"3.76",
"7.98"
]
},
"measurement": {
"pid": 3774882,
"window_s": 120.0,
"clk_tck": 100,
"cpu_ticks": 78,
"cpu_percent_of_one_core": 0.6499,
"wakeups_per_s": 25.9,
"voluntary_per_s": 25.5,
"nonvoluntary_per_s": 0.4,
"rss_kb": 106360,
"hwm_kb": 106360,
"rss_anon_kb": 74008,
"rss_file_kb": 32352,
"anon_hugepages_kb": 0,
"threads": 336,
"fds": 15,
"per_thread_cpu": [
{
"comm": "xerj-rt",
"cpu_ticks": 62,
"threads": 3,
"cpu_percent_of_one_core": 0.517
},
{
"comm": "xerj-memtable-s",
"cpu_ticks": 10,
"threads": 1,
"cpu_percent_of_one_core": 0.083
},
{
"comm": "xerj-mem-sample",
"cpu_ticks": 3,
"threads": 1,
"cpu_percent_of_one_core": 0.025
}
],
"loadavg_start": [
"3.57",
"3.86",
"7.35"
]
},
"per_index_rss_kb": 66.3
}
108 changes: 108 additions & 0 deletions benchmarks/idle-budget/results/result-p1024-after-n150-4cpu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"label": "p1024-after-n150-4cpu",
"date_utc": "2026-09-22T03:59:12+00:00",
"binary": {
"version": "xerj v1.0.0-rc.77",
"path": "/root/xerj-1024/engine/target/ci-test/xerj"
},
"corpus": {
"shape": "5x30",
"indices": 150,
"docs_per_index": 3
},
"port": 9610,
"window_s": 120.0,
"settle_target_s": 120.0,
"boot_ms": {
"empty_node": 5,
"baseline_arm": 5,
"n_indices": 5
},
"wal_replay_lines_after_clean_flush": 0,
"doc_probe_hits": 3,
"baseline": {
"pid": 3771285,
"window_s": 120.0,
"clk_tck": 100,
"cpu_ticks": 7,
"cpu_percent_of_one_core": 0.0583,
"wakeups_per_s": 24.7,
"voluntary_per_s": 24.6,
"nonvoluntary_per_s": 0.1,
"rss_kb": 47140,
"hwm_kb": 47144,
"rss_anon_kb": 16696,
"rss_file_kb": 30444,
"anon_hugepages_kb": 0,
"threads": 82,
"fds": 15,
"per_thread_cpu": [
{
"comm": "xerj-mem-sample",
"cpu_ticks": 3,
"threads": 1,
"cpu_percent_of_one_core": 0.025
},
{
"comm": "xerj-rt",
"cpu_ticks": 1,
"threads": 1,
"cpu_percent_of_one_core": 0.008
},
{
"comm": "xerj-memtable-s",
"cpu_ticks": 1,
"threads": 1,
"cpu_percent_of_one_core": 0.008
}
],
"loadavg_start": [
"4.04",
"5.27",
"10.45"
]
},
"measurement": {
"pid": 3771786,
"window_s": 120.0,
"clk_tck": 100,
"cpu_ticks": 17,
"cpu_percent_of_one_core": 0.1417,
"wakeups_per_s": 24.7,
"voluntary_per_s": 24.6,
"nonvoluntary_per_s": 0.1,
"rss_kb": 56620,
"hwm_kb": 56620,
"rss_anon_kb": 24196,
"rss_file_kb": 32424,
"anon_hugepages_kb": 0,
"threads": 82,
"fds": 15,
"per_thread_cpu": [
{
"comm": "xerj-mem-sample",
"cpu_ticks": 5,
"threads": 1,
"cpu_percent_of_one_core": 0.042
},
{
"comm": "xerj-memtable-s",
"cpu_ticks": 4,
"threads": 1,
"cpu_percent_of_one_core": 0.033
},
{
"comm": "xerj-rt",
"cpu_ticks": 3,
"threads": 2,
"cpu_percent_of_one_core": 0.025
}
],
"loadavg_start": [
"3.59",
"4.70",
"9.48"
]
},
"per_index_rss_kb": 63.2
}
Loading
Loading