Skip to content

[Bug]: Main Wiki IVF throughput drops across Oct 9-11 (only/POST 970 -> 432 -> 160 QPS); regression attribution pending #29868

Closed

Description

@LeftHandCold

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Related: #28627 (IVF object-column read/decompression amplification), #28898 (concurrent same-key cache misses). This issue separately tracks the Oct 9-11 Main performance decline and its regression attribution/acceptance criteria. It does not assert that these are distinct proven root causes, or that the fixes associated with those issues have failed. The initial observations were also recorded in this #28627 follow-up; this report adds the important AP cancellation/Q15 confounder and a focused PR audit.

Branch Name

main

Commit ID

  • Oct 9 fast observation: 83d82b8ee0cd694e0c6a7146902d74ae4dfb415a
  • Oct 10: 72d4a49db7d750520e1a1654cb6091fc7169882b
  • Oct 11: 8cc9167cb0a04479cd4c2f083aece5130f8c1946

These are deployed MO image commits, not workflow commits. Dates refer to Beijing report dates (UTC+8). No claim is made about a newer, untested Main HEAD.

Other Environment Information

  • TKE Family, 1 TP + 2 AP CNs; each CN 14 CPU / 55Gi, Memory Cache 16Gi, GOMEMLIMIT=25000MiB. DN 32Gi with 5Gi Memory Cache.
  • Wiki 10M, 768-dimensional float32; IVF lists=3162, L2, float32 quantization, training percent=2, max iterations=20.
  • Two formal rounds, 10,000 queries/round, 100 workers, K=10, probe=5, ivf_preload_entries=0.
  • Requests go through Proxy with AP workload binding, not a single fixed AP. Routing checks pass; only-mode diagnostics show two readers on all three runs.
  • Vector benchmark heni02/vector_benchmark@0bae04528673d7756c4ee2478ac8e4e41f54df1b; load tool pin ba1e1977ee5d9ea657631cceb656e5fe3f9ef7bf; inspected query/GT/mapping identities unchanged. This verifies input identity, not independent GT provenance.
  • The AP Pods run on different nodes across runs. The physical IVF objects and prior workload state are not identical.
  • All three runs are workflow_dispatch executions with different workflow branches. Inspected formal Wiki settings are unchanged; this does not make their actual workload overlap identical.
Date Run / Wiki job Workflow commit
Oct 9 37874777871 / 113746044720 41bea3ae54a215e0d3652a882988ac1b1775d0fe
Oct 10 37959361150 / 114001182737 c5033b21c2477f8d6b3c6c5e3d4b871a7bf6b1e3
Oct 11 38064357583 / 114292239222 a6a539de9baadd3518221df99cdcaf6509fb9f91

Actual Behavior

Confirmed: sustained measured throughput decline, including both formal only/POST rounds; current server evidence shows substantial cache/read/decode work and fresh-object cache fills during the second round.

Not yet proven: a newly introduced MO code regression, a particular introducing PR, or a quantitative attribution of the whole decline to Merge/cache behavior. This is a regression investigation, not a first-bad-commit result.

1. Formal second-round performance

Mode Oct 9 QPS Oct 10 QPS Oct 11 QPS Oct 11 vs Oct 10
only/PRE 978.77 not executed 171.41 not comparable
only/POST 970.41 432.52 160.37 -62.9%
filter/PRE 142.77 104.92 64.98 -38.1%
filter/POST 662.96 385.54 210.38 -45.4%
threshold/PRE 142.52 103.31 101.84 -1.4%
threshold/POST 632.31 396.15 366.85 -7.4%

Only/POST declined 83.5% across the observations. Its first/second-round QPS pairs are 927.76/970.41, 434.14/432.52, 159.88/160.37. Its second-round P99 rises 237.03ms -> 806.02ms -> 2578.40ms.

Both only/POST rounds in every run completed 10,000 requests with zero query/connection errors. Recall remains close: 0.7567 / 0.7526 / 0.7553. This is not an error-count penalty or an obvious recall-for-throughput tradeoff. The current second round did not recover after the first.

The Oct 10 only/PRE first round had one query error; the second round and its valid plan diagnostic are unavailable. Do not describe that entire suite as error-free or identically warmed up.

4.2 provides a limited control: only/POST second-round QPS increased 475.93 -> 538.06 in 37948959228 and 38062137649. This is not a controlled cross-branch A/B; physical objects, nodes, and some filtered-mode recall values differ.

2. Important baseline caveat: the fastest run had broken/cancelled TPCH coverage

The fast reference is a genuine IVF measurement, but not an otherwise healthy identical whole-suite baseline.

In its AP job 113646869598:

  • TPCH 10G Q15 took 2569.012, 2597.623, 2569.358 and 2586.475 seconds, approximately 43 minutes each.
  • The TPCH 100G step was cancelled after a Q15 that started at 06:22:09 UTC; the step ended at 08:55:13 UTC.
  • TPCH 1T was skipped, not completed.
  • The AP job ran 02:54:11-08:55:42 UTC and concluded cancelled.

In contrast, Oct 10 AP and Oct 11 AP both completed TPCH 1T successfully. Their 1T steps ran 17:34:08-19:59:12 UTC on Oct 9 and 16:51:38-19:15:39 UTC on Oct 10, respectively.

Report date IVF prepare completion (UTC) IVF query job start (UTC) Gap TP special workload at IVF start
Oct 9 Oct 9 05:35:16 Oct 9 08:56:04 3h 20m 48s already finished at 07:27:42
Oct 10 Oct 9 19:32:11 Oct 9 19:59:54 27m 43s running until 21:21:18
Oct 11 Oct 10 18:54:01 Oct 10 19:16:33 22m 32s running until 20:43:06

CREATE INDEX itself took approximately 1269/1275/1203 seconds. Completion does not establish physical Merge convergence.

The long gap and different preceding workload can change object layout, cache contents and TN background work. They are real confounders, not proof that all of the decline is expected. In particular, both later AP jobs completed similar coverage, yet only/POST still fell 432.52 -> 160.37; the cancelled first reference alone cannot explain that further drop.

3. SQL/plans are stable, physical storage work is not

A local artifact-validation harness compared the recorded input JSON, SQL and plain EXPLAIN for each mode:

  • All five comparable modes use identical diagnostic input and SQL.
  • Only/POST, filter/POST and threshold/POST have identical normalized plain plans.
  • Filter/PRE and threshold/PRE differ only in the displayed estimated object count (211/204/205), after normalizing generated binding tags. Operators, predicates and planned DOP are unchanged.
  • Only/PRE is not a valid three-run plan comparison because the Oct 10 diagnostic failed.

For example, the only/POST diagnostic SQL is:

SELECT file_id, id
FROM tke_family_weekly_ivf_10m.historical_file_blocks_wiki_ivfflat10m
ORDER BY l2_distance(embedding, ?) ASC
LIMIT ? BY RANK WITH OPTION 'mode=post';

The plan retains a Vector Index Scan, K=10/NProbe=5, base-table lookup via an INNER JOIN/runtime filter, and final sorting. There is no observed fallback to a full-table vector scan in these captured plans.

The same only-mode query 0 has vector SHA256 2b32d6e7d651da0371972292dab7eb129b368872a9fd66c326fb1af2e3a3092a. Its post-suite diagnostic, not the timed query's physical I/O, reports:

Date Readers Entries blocks read Storage-filter rows before -> after Logical decoded vector bytes
Oct 9 2 17 139264 -> 18642 431161990
Oct 10 2 258 2113536 -> 17484 2579266378
Oct 11 2 146 1196032 -> 16223 1513098604

Similar candidate counts can require very different block/column work. These byte counters are not physical PVC read bytes. Oct 11 reads fewer diagnostic blocks than Oct 10 while having lower QPS, so block count alone is not a complete explanation.

4. Object-level evidence inside the current second round

Namespace: mo-main-family-38064357583-1.

Only/POST R2: 2026-10-10 19:21:40.14-19:22:43.44 UTC, i.e. Oct 11 03:21:40.14-03:22:43.44 Beijing time.

UTC time Evidence
19:21:43.288969 Base table 273266 Merge [MT-11425] ends, producing objects ending 628d323c1fd4_0/1/2, 494.7MiB total.
19:21:44.384819 AP nightly-regression-dis-ap-cn-vhkct reads exact newly created object 01a12743-42eb-7719-a410-628d323c1fd4_00000, offset 98611, size 32842 bytes. The slow FileService event shows memory/disk misses, IOMerger ownership, full-object cache fill and a return after 811.674ms.
19:21:49.969552 Base-table Merge [MT-11424] ends, producing objects ending ae260d1eed8e_0..4, 773.2MiB total.
19:22:10.492551 / 19:22:13.677797 IVF entries table 273275 Merge ends, 296MiB / 426.1MiB outputs, followed by prepare-commit records.

Sibling base objects _00002 and _00001 also show slow initial reads, approximately 662ms and 672ms.

The observed path matches the running version:

  • MemCache.Read uses file path, offset and size in the cache key. A new merged object's path cannot reuse an old object's cache entry by identity.
  • FileService full-object fill opens an offset-zero/unbounded object reader for the fill owner. Thus a small requested range can wait for a much larger cache fill.

This proves fresh-object refills during R2, not that every query downloads an object, not that unchanged objects are erroneously evicted, and not that duplicate-read coalescing stopped working. Pinning requests to a CN would not make a new object have the old cache key.

5. Current cost is concentrated in read/cache/decode work

Pyroscope over 19:20:40-19:22:40 UTC, covering most of both current only/POST rounds:

  • AP vhkct: cumulative DiskCache.Read 50.99%, LZ4 decode 25.22%, memmove 24.72%, L2 distance 7.28%.
  • AP cd6gl: cumulative DiskCache.Read 1.23%.

These are CPU-stack proportions with nested frames, not additive percentages or measurements of disk I/O wait.

Over the 60-second Prometheus window 19:21:40-19:22:40, the mo_fs_read_total{type="hit-disk"} increase is 33,798 on vhkct versus 373 on cd6gl. These are cache-entry counts, not query counts or physical bytes. The imbalance establishes different cache-path work, not necessarily incorrect SQL routing.

Both Memory Caches are near 16Gi. Inspected pressure counters are zero, which does not exclude normal capacity eviction. DiskCache occupancy is below its configured limit. Resource snapshots show no CN restarts. There is insufficient physical PVC/node evidence to prove disk bandwidth saturation or exclude node-local I/O contention.

Expected Behavior

The large, repeatable-within-run throughput loss should receive a controlled explanation rather than be dismissed as small random variation or hidden by a fresh performance-series baseline.

For matched physical objects, topology, workload and warm-up, an image change should not cause a comparable throughput/latency cliff without a justified tradeoff. If the dominant cause is active Merge/physical layout/cache residency, quantify that sensitivity separately and define a reproducible benchmark readiness condition; do not blindly revert a correct planner fix or merely hard-code a longer sleep.

Steps to Reproduce

The existing runs are the observed reproduction; a controlled image A/B has not been performed.

  1. Use the pinned Wiki 10M data and tool versions above, 1TP+2AP, 55Gi CNs and 16Gi Memory Caches.
  2. Run the existing Family prepare stage and six-mode sequence with 100 workers, 10000 queries, K=10 and probe=5. Preserve the exact query set, both rounds, actual workload timeline and routing evidence.
  3. Capture layout/Merge state for both the base and hidden entries tables, not only CREATE INDEX completion. Record per-CN cache reads, profiles, resource usage and node/PVC I/O through the measured window.
  4. To discriminate causes without another full Weekly, run short only/POST and filter/PRE tests on a reproducible same physical data snapshot, first with a bounded stable-object condition, then in a separately reported active-Merge phase. Keep nodes/topology and actual competing workload fixed.
  5. Compare 83d82b8ee0cd, 72d4a49db7d7, and 8cc9167cb0a0 against the same snapshot and equivalent cache state. If necessary rebuild version-isolated instances from that snapshot after verifying compatibility; do not point two writers at one live storage prefix or casually downgrade a live cluster.
  6. Bisect only the interval that still reproduces under controlled conditions. Preserve query plans, candidates/blocks, logical and physical bytes, per-CN cache state and latency, rather than QPS alone.

Additional information

PR audit and attribution boundaries

The fast-to-current interval contains 49 commits: 27 through 72d4a49db7d7, then 22 through 8cc9167cb0a0. The interval is not yet a validated good/bad bisection range.

Complete, non-truncated Git trees were compared. FileService MemCache/DiskCache/S3-read, IVF search/Top-N column implementation, and the inspected core Merge implementation have unchanged blobs between endpoints. This does not exclude shared planner/ObjectIO/readutil or indirect workload effects.

PR Relevant change and current assessment
#29793, dfd77560340d Fixes #29783, the independent-CTE/Q15 Cartesian-join regression. Merged Oct 9 15:29:53 UTC, absent from the fastest reference and present in both slower versions. Leading indirect scheduling hypothesis: fixing the long AP Q15 allowed the suite to finish earlier and reach IVF with much less Merge-settling time, while also completing the previously skipped 1T workload. The changed timelines are observed; its contribution to IVF QPS is not controlled proof. The formal only/POST SQL has no CTE. Do not label the necessary Q15 fix an IVF regression or revert it on this evidence. It also cannot by itself explain the entire Oct 10-to-11 decline because both versions contain it.
#29779, d2a0055ebe1a Changes ObjectIO shared metadata-load cancellation/generation handling. This is a real shared read-path candidate in the initial decline interval. Available profiles do not show metadata-load work as the dominant CPU consumer, but CPU samples cannot exclude blocking/wait effects. Retain for controlled validation, not a proven culprit.
#29767, a04c6fbfc9c5 Adds IVF Top-K under ordinary equi INNER JOINs. The new eligibility guard explicitly rejects explicit POST mode; the inspected formal POST SQL and captured plans do not show this rewrite. Not a supported direct explanation for the only/POST cliff.
#29769, 72d4a49db7d7 Clone metadata/checkpoint replay work and lock isolation. It touches shared logtail/read behavior, not the inspected TN Merge scheduling implementation. No runtime evidence currently ties it to the throughput drop.
#29353, 4942f889ef08 Per-pool on-heap ownership accounting. Introduced only after the first 970 -> 432 decline, so cannot be its original introducing commit. Available accounting CPU frames are not a dominant current cost; this does not fully exclude an incremental effect.
#29601, 6aa617392e54 Unicode collation semantics/pruning. Also only in the second interval, not an explanation for the first decline. Captured plans retain index access; no full-scan regression is established.
#29792, d5faee3681a4 IVF residual-distance predicate guard. The only/POST SQL has no residual WHERE distance predicate, and the captured plan still uses IVF. No evidence that the guard changed this primary affected query's access path.
#29820, fe7e01d90148 Replayable COS PUT EOF retries, not a direct change to DiskCache-hit read/decode code. No evidence that this new retry branch was responsible for the measured decline.

The defensible conclusion is confirmed performance decline + observed physical-layout/cache-refill cost; introducing PR unproven. Neither "definitely a newly broken eviction algorithm" nor "only runner noise, no product problem" follows from the current evidence.

Why no REGRESSION verdict was published

Overall tool fingerprints changed (73011728b90e / 226ea12cae74 / 628bbfd23ab2) while the inspected Vector/Load pins stayed unchanged. The current publisher is BASELINE_BUILDING, history 0/3, performance_verified=false. This is not a PASS. Baseline rebuilding can delay detection, but is not the execution-time cause.

Evidence preserved and validation performed

  • Original Actions logs/artifacts: metrics.tsv, six mode logs, wiki_plan_diagnostics/*.log, prepare logs, resource Pod snapshots, job/step timestamps and conclusions.
  • Narrow-window Loki: TN base/entries Merge events and AP exact-object FileService events above.
  • Prometheus cache counters and per-AP CPU profiles over the matching only/POST windows.
  • Offline harness successfully recomputed metrics/context, compared input/SQL/plan identity, and checked complete Git-tree blobs. It explicitly rejects the unavailable Oct 10 only/PRE diagnostic as a comparable plan sample.
  • PR diffs and ancestry/chronology reviewed. No 10M load rerun, no host-50 reproduction, no introducing-commit bisection, and no production-code or cluster changes in this investigation.

Acceptance: a reproducible decomposition of the loss into image/code effects versus physical-layout/background/cache effects; a verified introducing commit if a code regression survives the controlled A/B; and measured recovery without changing result quality or silently removing workload coverage.

Activity

  1. added
    kind/bug
    on Oct 11, 2026
  2. LeftHandCold commented on Oct 11, 2026

    @LeftHandCold
    CollaboratorAuthor

    Runtime follow-up: Merge is confirmed; sustained DiskCache/decode work is more important than S3 download time

    This follow-up re-queries the historical Loki and Prometheus data and recomputes the saved CPU profiles. It strengthens the runtime attribution, but does not claim a controlled introducing-commit result.

    1. Exact Merge events inside the slower second round

    Only/POST R2 in run 38064357583: runner markers 2026-10-10 19:21:40.139-19:22:43.440 UTC, or Oct 11 03:21:40.139-03:22:43.440 Beijing time. The reported timed workload itself is 62.36 seconds; the runner marker interval includes about one second of setup/reporting. All events below are also inside the inferred timed workload, not just setup.

    UTC Table Task Merge output
    19:21:43.288969 base 273266 MT-11425 494.7MiB
    19:21:49.969552 base 273266 MT-11424 773.2MiB
    19:22:10.492551 IVF entries 273275 MT-12004 296.0MiB
    19:22:13.677797 IVF entries 273275 MT-12005 426.1MiB
    19:22:22.448539 base 273266 MT-12002 804.0MiB

    These are actual [MERGE-END] records with task/object identities, paired with [MERGE-START] and [MERGE-PREPARE-COMMIT], not merely periodic MergeExecutorEvent scheduler statistics. Total output is 2794MiB, approximately 2.73GiB, during R2. These are TN output-size log values, not measured AP network/physical-disk bytes.

    The first round also overlaps six completed merges (two base, four entries), producing about 2666.5MiB. Both rounds measured roughly 160 QPS while object rewriting continued.

    2. The high-QPS reference really was in a different state

    Bounded Loki checks found no base/entries Merge records during the fast run's query window. Extending the preceding search identified the last observed entries Merge:

    2026-10-09 07:02:11.292791 UTC [MERGE-END]
    [MT-48134]-273256-__mo_index_secondary_01a11f14-acd8-75f7-8bbb-3d0fc4f46b25
    to-size: 444MiB
    07:02:11.311977 UTC [MERGE-PREPARE-COMMIT]
    

    Only/POST started at 08:58:31 UTC, roughly 116 minutes later. No subsequent merge for the checked base/entries identities was found through the relevant query window. This is stronger evidence than simply assuming that a 3h20m prepare-to-query gap meant Merge had settled.

    The intermediate 432-QPS run also had active Merge: entries MT-13100 completed during R1 (444MiB), and MT-13099 during R2 (592MiB). Two base merges started during R2 but completed afterward. Therefore Merge presence alone cannot distinguish 432 from 160 QPS; its overlap, object layout and resulting cache workload matter.

    3. New objects are demonstrably reached by foreground reads

    • Base MT-11425 produces suffix 628d323c1fd4_0 at 19:21:43.288969. At 19:21:44.384819, AP vhkct logs a read of full path 01a12743-42eb-7719-a410-628d323c1fd4_00000, offset 98611/size 32842, with a full-object cache fill and 811.674ms total time.
    • Entries MT-12004 produces e857c123e027_0 at 19:22:10.492551. At 19:22:12.184027, the same AP reads 01a12743-bb11-7513-9b5c-e857c123e027_00000, offset 126743259/size 25305920. It waits for cache/update and IOMerger work, then performs a range fetch and conversion; total 1.005 seconds. This request is not another full-object-fill owner.
    • Of the 34 FileService slow-read records ending within current R2, 29 refer to outputs of the base/entries merges completed in that same round. The join uses task output suffix/object number and checks event order. These are thresholded slow records, not all requests or a causal percentage of total latency.

    This closes the chain Merge output -> foreground access -> cache miss/refill/wait. TN is not serving every read; the CN reads object storage/DiskCache itself. TN Merge affects it by changing the physical object identities and layout.

    The running-version source explains this transition: MemCache.Read keys decoded data by Path + Offset + Sz. A newly written Merge object is a different key even when it represents the same logical rows. This is required cache identity, not evidence that Merge explicitly cleared the entire cache. S3FS.Read checks memory first, coordinates eligible fills, then reads DiskCache before falling back to object storage.

    4. Correction: use native Prometheus scrape timestamps, not graph evaluation points

    The earlier 33,798 hit-disk delta was obtained from /query_range values held at evaluation timestamps. It must not be presented as the exact R2 count. Native range-vector samples show the last large increment was omitted at that graph boundary.

    For AP vhkct, the actual samples are:

    19:21:40.055 UTC hit-disk = 124438894
    19:22:40.055 UTC hit-disk = 124532990
    delta = 94096 entries over 60 seconds
    

    The first timestamp is about 84ms before the R2 runner marker and about one second before its inferred timed start; the last is inside R2. This is a near-R2 telemetry window, not an exact per-query count.

    Over those same native sample endpoints on vhkct:

    Counter delta Value
    DiskCache entry hits 94,096
    S3-served entry count 117
    read-disk-cache duration sum / calls 1324.878 seconds / 83,299 calls
    s3fs-read-s3 duration sum 14.277 seconds
    S3 read bytes sum 1,152,414,465 bytes, about 1.073GiB

    Duration sums accumulate concurrent operations and are not wall-clock elapsed time. Disk-cache entry hits are not physical PVC I/O operations or SQL requests. These metrics are process-wide. Still, the large gap supports persistent local cache read/decode/wait work, not predominantly waiting for S3 downloads, as the current cost center.

    The other AP has only hundreds of DiskCache hits over its nearby native scrape window; its scrapes are offset by several seconds, so do not label this an exactly synchronized per-CN R2 ratio.

    Importantly, the mean observed disk-cache call in that window is 15.905ms, not seconds. The cost is a very large volume of cache-path work; these data do not demonstrate that every disk operation became slower or that the PVC reached its bandwidth limit.

    5. A concrete old-object read proves that S3 is not needed for a slow read

    At 19:22:22.141967 UTC, vhkct reads:

    object: 01a1272c-b938-784c-9be0-419daccf36b0_00002
    offset: 101438873
    size:   25305987 bytes
    total:  514.373ms
    

    The event stages show:

    • Memory-cache miss, then DiskCache file access.
    • io.ReadFull: approximately 99.753ms.
    • ToCacheData: approximately 386.533ms.
    • No object-storage getReader, no full-object fill.

    This is an existing roughly 25MB column-range read with substantial conversion/decompression elapsed time. Elapsed stage time can include scheduling; it is not pure CPU time or proof of physical-device throughput. It nevertheless disproves the interpretation that all current slow reads are S3 cold downloads.

    6. Native CPU metrics confirm saturation on the decode-heavy AP

    Each AP's container has a 14-core limit. Using only the main container, actual native sample endpoints wholly within R2, with no interpolation or parent-cgroup double counting:

    AP UTC sample interval CPU seconds / wall seconds Mean cores Throttled CFS periods / total periods
    vhkct 19:21:56.055-19:22:30.142 466.293 / 34.087 13.68 / 14 286 / 341 (83.87%)
    cd6gl 19:22:13.439-19:22:40.349 134.337 / 26.910 4.99 / 14 1 / 269 (0.37%)

    These are different native subwindows inside the same round, not synchronized per-query samples. The throttled-period fraction is not a fraction of lost CPU time or throughput. It nevertheless independently confirms CPU saturation/throttling on the AP with the large DiskCache/decode workload, while the other AP was not using its full CPU allowance in its measured subwindow. Previous-run CPU scrape coverage is insufficient for a precise R2-only CPU/query comparison.

    7. Profile cross-check and proof boundaries

    Saved only/POST-window profiles show an important change:

    CPU stack share, both APs weighted together Oct 10 / 432 QPS Oct 11 / 160 QPS
    DiskCache.Read, inclusive 0.64% 37.48%
    LZ4 decode, inclusive union 0.47% 18.58%
    memmove, self 1.55% 18.39%
    Metadata loaders, inclusive union 1.45% 1.07%
    Query-planning family, inclusive union 2.04% 1.18%

    On the slow AP alone, DiskCache.Read accounts for about 50.99% of returned CPU sample weight; almost all its LZ4 and memmove samples sit under the read path. Categories overlap and must not be added. The offline harness reconstructs flamebearer ancestry, validates weight conservation, and counts each self-weighted stack once per category to avoid nested/recursive double counting. Six harness tests pass.

    Profile windows cover different durations and are process-wide. There is also an unresolved profile aggregation discrepancy: dividing the current slow AP's raw root weight by its nominal 120-second timeline would imply 22.22 cores, above its 14-core limit. Do not treat raw profile weights as absolute CPU seconds, per-query costs, or certified unbiased wall-window proportions. The table describes returned weights; native container CPU metrics and individual read events provide independent corroboration of the bottleneck.

    What is now established: this was not merely an inactive scheduler log, a reporting error, or only a slow initial S3 fetch. Relevant base and entries Merge ran during both slow rounds; fresh objects were accessed; the worse run shifted heavily toward DiskCache/large-column conversion work on one AP, which reached its CPU quota.

    What remains unproven: the percentage of the 432->160 decline caused by Merge versus cache-capacity/residency/layout or node effects, why one AP retains less useful decoded data under this workload, and a particular newly introducing PR. The interval did not change the core MemCache/DiskCache read implementations, and no controlled stable-object A/B was run. Do not infer a new eviction bug or revert #29793 solely from these observations.

    Next discriminator remains a short matched-physical-data run with recorded Merge/object-state and cache telemetry, rather than another full Weekly or an arbitrary sleep. A stable-object phase and an active-Merge phase should be reported separately; both are legitimate product workloads.

  3. added
    severity/s0
    and removed on Oct 11, 2026
  4. LeftHandCold commented on Oct 11, 2026

    @LeftHandCold
    CollaboratorAuthor

    Cross-check against 4.2: preparation time alone is insufficient; both branches still Merge

    Compared the Oct 11 report runs:

    Important boundary on the earlier Merge hypothesis: 4.2 did NOT finish all Merge work before starting IVF. Its base and entries tables continued merging during the suite. It did, however, encounter a different sequence of object rewrites and cache accesses. This comparison does not support attributing the full Main slowdown simply to the presence of Merge.

    1. Exact workflow timing

    All timestamps below are UTC on Oct 10 (add eight hours for Beijing time).

    Timing 4.2 Main
    TP job 15:39:00-17:28:14 (1h49m14s) 16:14:04-18:04:03 (1h49m59s)
    AP job 15:39:34-18:46:51 (3h07m17s) 16:09:36-19:16:20 (3h06m44s)
    TP start relative to AP 34s earlier 4m28s later
    IVF prepare job 17:28:28-18:15:10 18:04:22-18:54:01
    IVF query job starts 18:47:06 19:16:33
    Prepare job end -> query job start 31m56s 22m32s

    The 9m24s gap difference is not principally an AP runtime difference: AP runtimes differ by only 33 seconds. Its largest contributors are the 5m02s relative TP/AP start skew and the 2m57s longer Main prepare job, followed by small runtime/handoff differences. The reason the Main TP runner started later was not investigated here; job timestamps establish the skew, not its scheduling cause.

    The setup logs separately report actual operation times:

    Setup operation 4.2 Main
    LOAD DATA 1541.59s 1721.61s
    CREATE INDEX step 1213.99s 1202.77s
    Setup total 2756.61s 2925.42s

    Main LOAD takes about three minutes longer; index creation is not slower. Both use the same 10M/768d CSV, lists=3162, probe_limit=5, ivf_preload_entries=0, float32 and the same benchmark commit. Job duration includes steps beyond the setup tool, so it must not be substituted for the setup total.

    2. Another material difference: ingress mode

    • 4.2: IVF_Fixed_Ingress=true, IVF_RECALL_INGRESS=fixed-ap.
    • Main: IVF_Fixed_Ingress=false, IVF_RECALL_INGRESS=proxy.
    • 4.2 only/POST R2 has a PASS ingress receipt, 100 workers, chosen CN UUID 38643537-3864-3436-3765-666533363965, mapped by Prometheus labels to AP x25ww.

    The fixed-ingress pool implementation keeps the sampled connections, selects worker connections belonging to the chosen coordinator, and parks the others. The before/after receipt maps include parked connections on both APs; those maps must not be mistaken for measured query distribution. Connections still pass through Proxy, and internal execution can still use both APs.

    This is a cross-branch comparison confounder, not a newly changed setting within the three Main runs: all three Main runs used proxy, including the 970-QPS reference. It cannot, alone, explain Main's Oct 9-11 decline.

    3. 4.2 also overlaps base and entries Merge

    Bounded, untruncated TN Loki queries cover 18:12-19:04 UTC, using exact table identities:

    • Base: table 273246, historical_file_blocks_wiki_ivfflat10m.
    • Entries: table 273249, __mo_index_secondary_01a126f3-b0bc-78e0-aabf-1e941f5ab1a7; the identity is also present in the saved EXPLAIN ANALYZE.

    4.2 only/PRE R2 runs between markers 18:49:23.153 and 18:49:47.129. Three entries merges complete inside that round:

    UTC Task Output
    18:49:30.119374 MT-19138 296MiB
    18:49:35.291635 MT-19137 444MiB
    18:49:42.271701 MT-19136 592MiB

    That round still reports 470.58 QPS. Merge completion by itself therefore does not imply Main-like sustained low QPS. Whether those rewritten objects are selected by concurrent queries and remain cached matters.

    For the subsequent 4.2 only/POST window, 18:49:47.351-18:50:28.778:

    • No entries MERGE-END appears inside either measured round. The preceding entries merge ends at 18:49:42.272; the next entries merge starts at 18:50:28.616, near R2's end, and finishes later.
    • A base merge MT-20385 ends at 18:50:26.602, near R2's end, producing 309.2MiB. AP slow-read records at 18:50:27-28 reference its output suffix a397943cda7f_0/1.
    • Entries Merge continues afterward, including during filtered modes and until 19:03:48 in the checked window. This is not a fully settled suite.

    Both Main only/POST rounds have entries output rewrites within their much longer measured windows, as detailed in the preceding comment. Do not compare raw merge-event counts without accounting for different query durations, or turn event overlap into proof of its full causal contribution.

    4. The actual difference includes cache reuse, not just preparation time

    QPS 4.2 R1 4.2 R2 Main R1 Main R2
    only/PRE 90.43 470.58 63.46 171.41
    only/POST 567.77 538.06 159.88 160.37

    4.2 has a slow first only/PRE round too; it is not unaffected by startup/cache/object-state effects. It then recovers to a much faster measured state. Zero query errors were reported in these four rounds on each branch.

    Native FileService scrape intervals bracketing both 4.2 only/POST rounds (including a little adjacent work, not exact query-only accounting):

    AP / native UTC interval Mem probes / hits Disk hits S3-served entries
    rlmfs, 18:49:44.104-18:50:44.104 13,700,571 / 13,700,571 0 0
    x25ww, 18:49:42.210-18:50:42.210 14,269,274 / 14,267,942 539 230

    Each is 60 seconds and includes all of the approximately 41-second two-round marker interval. Samples were queried as native range vectors, with no interpolation or graph sample-hold arithmetic. These are process-wide entry counters, not unique objects, vector-only accesses, disk IOPS or SQL counts.

    By contrast, the preceding Main evidence shows 94,096 DiskCache hits on vhkct in a 60-second near-R2 interval and CPU close to its quota with large-column decode/copy work. These differently phased windows cannot yield an exact cross-branch per-query ratio, but they demonstrate very different runtime cache-read workloads.

    4.2's actual SHARED MemCache cap is also 16GiB on both APs, and its observed usage is close to that cap (about 15.98-16GiB). Thus a full 16GiB cache alone is not proof of the cause; the useful working set, placement, object turnover and admission/eviction behavior must be distinguished.

    The branches also execute different IVF implementations: the 4.2 analyzed plan contains Table Function on ivf_search plus an internal entries SQL plan, consistent with Search calling runSql; Main's saved plan uses Vector Index Scan and its direct-reader diagnostics. Same visible SQL and resources do not establish identical reader placement/cache behavior. This is not evidence that every Main direct-reader query is slower: the earlier 970-QPS Main run is a counterexample.

    Conclusion

    Confirmed differences: relative TP/AP start skew, slightly slower Main loading, shorter post-prepare window, different ingress mode, different exact Merge overlap, and substantially different cache-read work. The stronger claim that Main is slow simply because it has not finished Merge while 4.2 has finished is contradicted.

    Keep the Main performance issue open. A Merge-state gate may improve measurement consistency, but cannot yet be claimed as a complete fix. To attribute an MO change, compare the same Main image and physical dataset with fixed versus normal ingress, record per-CN object/block ownership/cache work, and separate stable-object from active-Merge windows. No benchmark or product change was made during this investigation.

  5. LeftHandCold commented on Oct 12, 2026

    @LeftHandCold
    CollaboratorAuthor

    Oct 12: unchanged 4.2 image also enters a repeated DiskCache read/decode regime

    Compared 4.2 Oct 11 report with 4.2 Oct 12 report. This is additional evidence for this investigation, and concrete runtime evidence for the 4.2 side of #28898. It is not a newly bisected MO regression.

    1. Version and input controls

    Both runs report:

    • MO 276938065e831d66e01027a2290f18780563571b.
    • Image digest sha256:e1bfd75523c72ad0d18c55500885b956f70d1b91039d7187f19c91de60bbe130. The current resource artifact's actual AP image IDs agree with it.
    • vector-benchmark 0bae04528673d7756c4ee2478ac8e4e41f54df1b, mo-load ba1e1977ee5d9ea657631cceb656e5fe3f9ef7bf.
    • Performance manifest sha256:d7c8a3951f73ae2685c34de0cb4a35109070ef7850b0e433070608bc6d2ae381.
    • 1TP+2AP, each AP 14 CPU/55Gi memory, SHARED MemCache 16Gi, TN 14 CPU/32Gi memory.
    • Fixed AP coordinator through Proxy, 100 workers, 10,000 requests/round, probe=5, preload=0, same CSV and query inputs.

    Current ingress receipts all PASS and select UUID 33663533-6362-6365-3434-386165386461, mapped by metrics to nightly-regression-dis-ap-cn-dtl5s, node 10.128.0.39. The other AP is dqx4l, node 10.128.0.52. Fixed coordinator does not imply only one CN can execute internal SQL.

    Second-round QPS Prior Current
    only/PRE 470.58 82.81
    only/POST 538.06 81.19
    filter/PRE 66.96 59.35
    filter/POST 492.63 252.35
    threshold/PRE 65.73 46.19
    threshold/POST 404.85 127.69

    Current only/PRE R1 is 78.27 QPS; only/POST R1 is 95.82 QPS. All twelve measured rounds complete 10,000 requests with zero reported query/connection errors. Existing sampled audits PASS; this is not a claim of exhaustive correctness.

    2. Preparation was faster, and the post-prepare gap was longer

    Timing Prior Current
    LOAD DATA 1541.59s 1419.06s
    CREATE INDEX step 1213.99s 1243.99s
    Setup total 2756.61s 2663.95s
    Prepare job end -> query job start 31m56s 37m58s

    Current prepare finishes at Oct 11 18:06:25 UTC; query job starts at 18:44:23 UTC. The slower run did not get less waiting time. An arbitrary longer sleep is not established as the remedy.

    ANLI, Full Concurrent and MOTR start later. TP's No-PK bulk preparation overlaps the current IVF at 18:30:36-19:00:25 UTC, but it also overlapped the previous fast run at 18:39:27-19:07:32 UTC on the previous day. Presence of that parallel job alone cannot discriminate fast from slow.

    3. Native metrics locate the cost on one AP

    Current only/POST R2 markers are Oct 11 18:50:47.177-18:52:53.102 UTC, or Oct 12 02:50:47.177-02:52:53.102 Beijing time; measured time is 123.17s.

    Native FileService endpoints wholly inside R2 (same 90-second length but offset between APs):

    AP Native UTC endpoints DiskCache entry hits S3-served entries Disk-read duration sum conversion duration sum
    dtl5s 18:51:15.799-18:52:45.799 22,682 166 5298.79s 2464.40s
    dqx4l 18:51:02.665-18:52:32.665 81 111 66.50s 1.64s

    The slow AP's S3-read duration sum is 52.01s. Duration sums include concurrent work and nested conversion; do not add them or equate them with wall time. Cache entry hits are not unique objects or physical IOPS. These are process-wide counters, not SQL-scoped counts.

    Native container counters also inside R2, main container only, with no parent-cgroup double counting:

    • dtl5s, 18:51:19.297-18:52:20.037: 13.80 CPU cores / 14 limit, 575/608 throttled periods (94.57% of periods, not percent lost CPU time). /dev/vdb reads 58,066,657,280 bytes in 60.740s, about 54.08GiB or 912MiB/s.
    • dqx4l, 18:50:55.222-18:52:15.828: 1.61 cores, 0/806 throttled periods; /dev/vdb reads 52,744,192 bytes in 80.606s.

    Thus there is real block-device activity, not just a large logical read counter. It does not establish the PVC's advertised bandwidth limit or exclude all host effects.

    Both AP caches are around their configured 16GiB capacity. RSS-pressure trigger, pressure eviction, and pressure admission-skip counters remain zero throughout the retrieved 18:43-19:14 window. This excludes evidence of the instrumented RSS-pressure cache-shrinking path, not normal FIFO/capacity eviction.

    In the previous run's 60-second bracket around both only/POST rounds, the two APs had only 0 and 539 DiskCache entry hits and nearly complete MemCache hits (see preceding comment). Windows have different workload phases, so they must not be divided into an exact per-query regression ratio.

    4. Actual same-key independent reads/conversions are proven

    Four bounded one-minute Loki queries cover 18:49-18:53 UTC. Each is below its 3000-record limit; exact boundary duplicates are removed. There are 5284 slow-read records across the window. These are thresholded records, not all requests.

    One example, all on dtl5s:

    object: 01a12c1e-126c-79a6-a575-6eb6d5c07968_00000
    offset: 126753969
    size:   25305920 bytes
    

    27 independent slow-read events finish between 18:49:32.729226 and 18:49:33.048859 UTC. Every one records its own io.ReadFull and ToCacheData; none records an object-store getReader or IOMerger wait. Reconstructing intervals from the event's relative timestamps gives a peak of 26 overlapping ReadFull operations, with an overall request envelope of approximately 18:49:32.185-18:49:33.049 UTC.

    The logical reads for this one extent alone sum to 683,259,840 bytes, about 651.6MiB, rather than one 24.13MiB read. This is not a physical-device-byte estimate; that is measured separately above.

    For example, the event ending at 18:49:32.729226 has approximately:

    • ReadFull: 241.33ms;
    • ToCacheData: 156.21ms;
    • total: 541.06ms.

    A separate identical extent (...5c1cc12af6bb_00000, offset 225378, size 25305920) appears 65 times in the complete retrieved four-minute window. Repeated same-key work is not just an isolated new object being fetched once.

    5. CPU profile corroborates decode/copy work

    Requested the slow AP's CPU profile for 18:50:50-18:52:50 UTC via Pyroscope SelectMergeStacktraces. Offline reconstruction validates the tree/weight conservation and counts each self-weighted stack once per category:

    Returned sample-weight share Value
    DiskCache.Read, inclusive 68.74%
    LZ4 decode family, inclusive 47.36%
    runtime.memmove, self 47.33%
    vector distance family 4.91%
    query planning family 2.63%

    Categories overlap and must not be added. These are shares of returned profile weights, not measured latency fractions. The profile total divided by the requested 120s would imply 17.47 cores, exceeding the 14-core quota, so aggregation/boundary semantics preclude treating its weights as calibrated CPU seconds. Native container metrics independently establish CPU saturation, and individual events independently establish read/conversion work.

    6. Exact 4.2 code explains why disk warmth does not eliminate duplicate work

    At the tested SHA:

    1. S3FS.Read checks MemCache, then DiskCache. A complete disk hit returns before the later IOMerger path.
    2. DiskCache.Read independently invokes ReadFromOSFile for the missing entry; ReadFromOSFile performs ReadFull and then conversion.
    3. cacheCapacityGuardedAllocator calls EnsureNBytes before allocation, without a cache key. EnsureNBytes can evict for capacity. Only later does deferred MemCache.Update insert by path/offset/size; FIFO detects existing values then.

    This provides the concrete opportunity for concurrent misses to multiply disk I/O and decoding before publication/deduplication. The observed 27-request wave proves that opportunity is actually reached. A full online key-by-key eviction feedback trace was not collected, so the exact fraction caused by duplicate allocation versus a legitimately oversized working set remains unknown.

    This is the known mechanism family of #28898, not a new independent bug. Main PR #28918 coordinates eligible warm disk fills before I/O; this 4.2 path lacks that coordination. It is not a proof that blindly cherry-picking #28918 is safe or sufficient: the PR depends on Main's scoped decode-sharing/eligibility machinery and has bounded bypasses. No full-4.2 fix validation is claimed.

    7. TN pressure is real, but not the complete explanation

    Exact Merge scheduler guard pauses new scheduling below 500MiB available. Its specialized Available calculation is max(0, limit - RSS - reserved).

    Current TN examples:

    • 18:50:03 UTC: limit 24GiB, RSS 20.26GiB, pinned/reserved 3.617GiB, available 123.7MiB.
    • 18:51:03 UTC: limit 24GiB, RSS 21.01GiB, pinned/reserved 3.404GiB, available 0.

    This is a resource-protection pause, not proof of OOMKilled or a stuck scheduler. Final pod restart counts are zero.

    The entries table is 273249 / __mo_index_secondary_01a12c11-7669-76a2-8f62-5564f1ff27fd; base is 273246. Entries pointDepth selection notes near the current query window are 181/179, versus 159/155 around the prior only/POST window. This is a less converged overlap signal, not a per-query scanned-block measurement or a formula for the 6.6x latency difference.

    Crucially, only/POST R1 has no base/entries MERGE-END in its 18:49:00-18:50:47 window and is still only 95.82 QPS. R2 has three entries merges complete at 18:51:51-56, plus two base merges at 18:52:13/24. Active rewrites can worsen cache reuse, but continual new-object production cannot be the sole explanation for both rounds.

    Decision and remaining causal boundary

    Established: a same-image performance cliff, a decode/read-heavy saturated AP, severe actual device reads, and concurrent independent read/conversion of identical disk-cached keys. This is not explained by query errors, a shorter prepare gap, changed ingress mode, a new MO PR between runs, or OOMKilled.

    Not established: the unique initial trigger for the low-reuse state, how much of the total decline comes from physical layout/working-set size/host effects versus duplicate fills, or an introducing commit for the broader Main trend. Pressure-paused Merge and No-PK preparation are real context, but prior fast runs also had both parallel preparation and unfinished Merge.

    Keep #29868 for the comparative trend and #28898 for the concrete uncoalesced-fill mechanism; do not file a duplicate or close either on one fast run. Next discriminating validation should preserve the same physical objects/coordinator and measure duplicate fills/cache reuse under a narrow concurrency or candidate-fix control, with stable versus active-Merge phases recorded separately. Do not silently lower formal benchmark concurrency or bypass TN's memory guard just to recover QPS.

    This investigation only read historical Actions artifacts, Loki, Prometheus, Pyroscope and exact-SHA source. No production code, workflow, image or cluster state was changed, and no new load job was started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions