Skip to content

[Bug]: Main Wiki IVF 10M drops to ~2 QPS with S3 read amplification and RPC failures (suspected #32697 regression) #32760

Todo

Description

@LeftHandCold

Summary

Main Wiki IVF 10M has a severe new throughput/latency cliff in the November 15 nightly report: only/POST first-round QPS falls from 33.22 to 2.23 (-93.3%), P99 rises from 6.46 s to 202.09 s, and 124 requests fail. The server is repeatedly loading IVF objects through the newly introduced index-file-cache path, with approximately 759/702 MB/s of S3 reads on the two AP CNs, versus approximately 0.67/0.75 MB/s in the preceding run's selected POST window.

Confirmed: the performance loss, query failures, high S3-read traffic, an actual 8 GiB index-file-cache budget, and execution stacks in the new whole-object loading path.

Strongly suspected introducing change: #32697, merged as b465f86824151a6d596bb67ca2211302fad4e368 on November 14, 2026 at 12:05:28 UTC. It is present in the affected image and absent from the comparison image. A single-change revert/path-disabled A/B has not yet been performed; this report does not claim that every timeout or RPC error has been exclusively attributed to that PR.

Severity severity/s-1 is explicitly requested by the reporter for this severe Main regression. The observed impact is in nightly testing; production impact and data corruption are not established.

Related issues / duplicate check

Open/closed issue searches and the relevant issue discussions were checked before filing; no dedicated issue for this run and new amplification signature was found.

Versions and reproducible evidence

Dates below are Beijing report dates (UTC+8). Runtime timestamps later in this report are explicitly UTC.

Item November 14 report November 15 report
Run 43449052910 43607872311
Wiki Job 132086970484 132557994316
MO SHA 5009da9d29cad96ea4a8ad120af061aa1bc539e2 bc9b822cd1f5d742b550f8366516fd836936ba70
Workflow SHA 95966ba0246710d83970c1502c4c2cd1eda87f3d 23f36e49fdab3f5ebb8b3aab897cb201fd09c26d
Namespace mo-main-family-43449052910-1 mo-main-family-43607872311-1

Artifacts on the linked Runs:

  • tke-family-weekly-shadow-1x2-weekly-ivf-<run_id>-1: l2_only-pre.log, l2_only-post.log, other available mode logs and reports.
  • tke-family-weekly-shadow-1x2-kubernetes-<run_id>-1: cluster configuration.
  • tke-family-weekly-shadow-1x2-resource-<run_id>-1: Pod identity and restart evidence.
  • Image-build receipt identifies the tested MO SHA; the Workflow SHA is not the product SHA.

Topology is 1 TP + 2 AP CNs. Both runs have 14 CPU / 55 GiB per AP, a 16 GiB shared memory cache, and a 1800 GiB shared disk-cache budget. The separate index-file disk cache is actually initialized with 8 GiB on both affected APs.

Workload: Wiki 10M, L2 IVF, K=10, 10,000 queries per round, concurrency 100. The only-mode query, GT and mapping hashes match across both runs:

query   a8bb817dbd126c6a376ca4dc091e121139787d35ae51021c9c61c75f85835c4c
GT      33d48f9eda552cd26ae9da67d306b93c11fd4a46bbac895d1a9f095d65c0fe90
mapping e3c1c92843d255df3a42e1ade20c373bb393f6c5c3d1c97d36fe84e5fd9d0d2d

Matching inputs do not prove identical physical object layouts or independently validated GT. Physical nodes differ, and the newer Workflow enables AUTO_ID_CACHE; this is not a controlled code-only A/B.

Actual behavior

1. Compare the same mode and first round

Metric Previous run Affected run
only/PRE QPS 22.73 2.58
only/PRE failed requests 31 5
only/POST QPS 33.22 2.23
only/POST P50 3.225 s 31.525 s
only/POST P99 6.462 s 202.088 s
only/POST failed requests 0 124, including 11 connection errors
only/POST mean recall 0.7566 0.7557

The affected PRE first round takes approximately 3,874 seconds; POST takes approximately 4,432 seconds. Neither reaches its second formal round. The subsequent filter/PRE mode is incomplete when the Job is cancelled; later modes are not measured. These are missing measurements, not passes.

Important limitations:

  • The previous PRE round already had 31 deadline errors. We are not claiming all timeout symptoms began with perf(fileservice): keep IVF-Flat entries objects in the index-file cache #32697.
  • Previous POST round 2 reaches 50.60 QPS, but this is deliberately not used as the direct first-round comparator.
  • Affected QPS includes failed requests and their waiting time; it is an observed execution outcome, not a healthy performance-baseline sample.
  • Similar average recall does not establish complete correctness when requests fail.

2. New cache budget and S3-read signature

Affected APs:

  • nightly-regression-dis-ap-cn-72vcv
  • nightly-regression-dis-ap-cn-qw4jg

Both startup logs explicitly report:

fileservice: index file cache initialized
path=/var/lib/matrixone/disk-cache-index-file
capacity=8589934592
idle-ttl=0s
check-on-startup=false

This is 8 GiB of index-file disk cache, not 8 GiB of CN RAM and not the 1800 GiB shared disk cache.

Time-bounded Prometheus observations:

Measurement/window (UTC) AP1 AP2
Previous POST S3 reads, Nov 13 18:42–18:50 0.673 MB/s 0.746 MB/s
Affected POST S3 reads, Nov 14 20:25–20:33 758.7 MB/s 702.1 MB/s
Affected PRE S3 reads, Nov 14 19:40–19:50 496.0 MB/s 596.0 MB/s
Index-file-cache in-use average, Nov 14 19:20–20:20 16.6 GiB 17.4 GiB
Index-file-cache in-use maximum in that window 20.0 GiB 22.4 GiB

These are sampled window averages, not exact per-query byte counters or whole-suite averages. The in-use metric exceeds the logical budget because held entries can defer eviction; that fact is not evidence of a process-memory leak.

Disk-cache eviction counters increase during the affected window. These counters are not isolated to a single index-cache tier, so they are corroborating rather than per-object proof. A bounded Loki query for one specific obj/... cache entry returns 200 miss records across about five minutes, hitting the query limit. fileservice/index_cache.go emits these misses; they do not prove that the remote data object is missing/corrupt.

3. Observed stacks match the new mandatory preload

The affected AP goroutine profiles for Nov 14 19:44:30–19:49:30 UTC contain:

ivfflat.openIndexObjects
ivfflat.openIndexObjects.func1
indexfile.OpenObject
indexfile.(*keyedLocks).lock
indexfile.readObject
indexfile.readObjectRange

These are merged goroutine samples, not CPU percentages or measured wall-clock wait shares. CN CPU profiles were unavailable in the checked windows; no CPU-profile conclusion is claimed.

The tested code provides the matching mechanism:

  1. ScanRelation calls openIndexObjects before BuildReaders. The arguments of the deferred close are evaluated immediately: query execution waits for the object loading first.
  2. openIndexObjects loads the objects referenced by selected persisted blocks, with eight loaders per scan, then waits for all of them. This is not a global eight-download limit across concurrent queries.
  3. OpenObject / readObjectRange downloads a missing object whole using SkipAllCache, rather than filling from the existing shared caches. Same-object rebuilds use a keyed lock.
  4. The later scan reads through the index-object-cache lookup. The returned preload handles primarily keep entries held; they are not a substitute reader passed into BuildReaders.

Working diagnosis: the new always-on preload moves relevant IVF object reads into a separate, undersized cache and makes full-object fetching a prerequisite for execution. Under capacity pressure, repeated misses/fills and object-load serialization create substantial I/O amplification and waiting. The code path, actual cache budget, live stacks and S3 metrics support this strongly, but the exact contribution of every component still needs a fixed-data A/B.

#32697 itself documents the over-capacity limitation and validates a single-CN 1M workload with approximately 2.9 GB of entries objects fitting the default 8 GB index cache. That does not cover the present 10M, multi-CN, 100-worker capacity-pressure case. The 1800 GiB shared cache does not automatically enlarge the index-file cache.

4. Query failures have a server-side RPC/IO chain

First client backend connection closed: Nov 14 19:46:56 UTC / Nov 15 03:46:56 Beijing.

Narrow-window server evidence, with the destination IP redacted:

19:46:52.158761 morpc/backend.go:1284
  init remote connection failed, retry later
  dial tcp4 <AP2>:6002: i/o timeout
19:46:54.163940 morpc/backend.go:1284
  dial tcp4 <AP2>:6002: i/o timeout
19:46:56.156623 process/process.go:767
  Failed to newMessageSenderOnClient [Wiki only/PRE SELECT]
19:46:56.158373 frontend/session.go:4912
  backend connection closed
19:47:34.179028 ivfflat/plan_reader.go:1359
  ivfflat: read object into the index-file cache
  internal error: fileservice: no bytes from the source within the idle timeout

POST starts around 20:21:54 UTC. At 20:21:56/58 the same AP destination has RPC connection timeouts; around 20:22:00 a group of queries fails with deadline/connection errors. There are also HAKeeper connection timeouts in this window.

This establishes real server-side failures, not a Test Control parser or artifact-upload error. It does not yet prove that download amplification caused all network failures: node packet-drop/limit evidence and a controlled comparison are still missing.

Final resource evidence shows unchanged Pod identities and zero container restarts; no corresponding CN OOM/restart is demonstrated. AP SSB/TPCH completed before Wiki began. TP work shares infrastructure, but ANLI began after the initial slowdown and cannot explain its onset.

Expected behavior

An enabled cache optimization should degrade safely when its working set exceeds its cache budget. It should not require repeated whole-object downloads before queries can execute when an existing range-reading path/cache can serve them more economically.

Restore useful throughput and bounded latency without increasing timeouts to hide the problem, relaxing correctness checks, or recording these failed rounds as healthy baselines. Handle concurrent queries and cache pressure explicitly.

Focused reproduction / acceptance plan

The linked nightly runs are the observed reproduction. The following controlled experiment is proposed, not already executed:

  1. Reuse a fixed Wiki 10M physical dataset/index snapshot, query files and topology. Do not independently reload/rebuild for each image and call it a code-only A/B.
  2. Keep nodes/resources, concurrent TP activity, index parameters and cold/warm cache state comparable. Run only/PRE and only/POST, not the entire nightly suite.
  3. Compare the new whole-object-preload path enabled versus disabled/reverted in otherwise equivalent, version-compatible test images. Account for other FileService changes included in the perf(fileservice): keep IVF-Flat entries objects in the index-file cache #32697 merge; do not blindly infer attribution from the previous nightly SHA alone.
  4. Record completed/failed queries, QPS/P50/P99, S3 bytes, cache occupancy/misses/evictions, object identities and RPC failures. Observe whether removing the preload eliminates the sustained downloads and restores throughput.
  5. Test both fitting and over-budget working sets and multiple concurrent queries. Increasing index-cache capacity can be an auxiliary diagnostic, but must not substitute for establishing safe over-capacity behavior.
  6. Preserve existing result/recall checks. No correctness regression, unbounded download fan-out or leaked holds on cancellation should be introduced by the fix.

Evidence retrieval

Raw Runner evidence is in the linked Actions artifacts. For CI Grafana, use the exact namespaces, Pods and UTC windows above:

sum by (pod) (
  rate(mo_fs_s3_io_bytes_sum{
    namespace="mo-main-family-43607872311-1",
    pod=~".*ap-cn.*",type="read"
  }[2m])
)

mo_fs_cache_bytes{
  namespace="mo-main-family-43607872311-1",
  component="SHARED-index-file-disk",type=~"cap|inuse"
}

rate(mo_fs_disk_cache_evict_total{
  namespace="mo-main-family-43607872311-1",pod=~".*ap-cn.*"
}[2m])
{namespace="mo-main-family-43607872311-1",pod=~".*ap-cn.*"}
  |~ "init remote connection failed|auto-create backend timed out|ivfflat: read object into the index-file cache"

Read-only evidence and request windows are retained on host 50 under /home/mo/wiki-main-20261115.Hor8No/. No new cluster, benchmark rerun, cache clearing or live-cluster change was performed during this investigation. No 4.2 impact is asserted by this Main-specific report.

Activity

  1. cpegeric commented on Nov 16, 2026

    @cpegeric
    Contributor

    Confirmed: the index does not fit the index-file cache.

    • How big the index is. perf(fileservice): keep IVF-Flat entries objects in the index-file cache #32697 measured 2.9 GB of entries objects for wiki_all 1M (768-D float32, about 3 KB of raw vector per row). Wiki 10M is therefore about 29–31 GB.
    • How big the cache is. The index-file cache on each AP CN defaults to 8 GiB. Queries go to both APs, so over a run each one needs the whole index, and 8 GiB holds about a quarter of it.
    • What follows. Searches keep evicting entries objects and downloading them whole again. That matches the ~700–760 MB/s of S3 reads.
    • Why in-use goes past capacity. The 16–22 GiB in-use is above the 8 GiB cap because an entry a running search holds is never evicted.

    This over-capacity case is the documented limit of #32697: the index-file cache is assumed to be sized for the indexes it serves, the same assumption HNSW and fulltext already make. The 1800 GiB shared disk cache does not enlarge the index-file cache, which has its own setting.

    Config change for both AP CNs (index ≈ 31 GB, plus room for other indexes and for objects being replaced):

    [[fileservice]]
    name = "SHARED"
    [fileservice.cache]
    index-file-disk-capacity = "48GB"

    The fileservice: no bytes from the source within the idle timeout errors in this run are a separate fileservice bug, tracked in #32792. The cause and a fix are described there.

  2. cpegeric commented on Nov 16, 2026

    @cpegeric
    Contributor

    Reproduced at 1M on 2 CNs, and the config change for the nightly.

    Reproduction

    • Setup:
      • wiki_all 1M IVF-Flat (lists = 1000, entries ≈ 2.9 GB) on 2 CN processes sharing local MinIO.
      • 16 sessions, 8 per CN, probe_limit = 8, 1000 queries per round. Each run is a cold restart with every cache emptied.
    • Scaling: the 10M index (~30 GB) against the 8 GB default is about 3.9× the cache. The 1M equivalent is a 768 MB index-file cache.
    build / index-file cache round QPS p50 p95 p99 object-storage reads cn1 / cn2
    fix, 768 MB unfiltered, cold 8.0 707 ms 8.2 s 14.9 s 502 / 1130
    unfiltered, warm 14.2 579 ms 3.5 s 6.9 s 352 / 862
    filtered 10.9 692 ms 5.3 s 8.8 s 459 / 997
    fix, 8 GB (fits) unfiltered, cold 263 21 ms 60 ms 1.75 s 51 / 89
    unfiltered, warm 603 21 ms 50 ms 72 ms 0 / 0
    filtered 504 23 ms 65 ms 95 ms 64 / 71
    main 3399778, 768 MB unfiltered, cold 11.9 538 ms 5.7 s 10.3 s 401 / 876
    unfiltered, warm 13.2 552 ms 4.1 s 6.2 s 409 / 959
    filtered 13.2 570 ms 4.5 s 8.2 s 388 / 874

    Config change for mo-bench-tke.yaml (CN)

    The index-file cache is separate from sharedStorageCache.diskCacheSize and stays at its 8 GB default however large the disk cache is.

    • Size: set it to 200Gi. Suites may combine IVF-Flat, HNSW and fulltext indexes on one CN.
    • Volume: it lives on the same cache volume (<disk-path>-index-file). Keep the volume's headroom: either raise the volume to 2200Gi, or lower the disk cache to 1600Gi.
         cacheVolume:
    -      size: 2000Gi
    +      size: 2200Gi
           storageClassName: directpv-min-io
         sharedStorageCache:
           memoryCacheSize: CN_MEMORY_CACHE_SIZE
           diskCacheSize: 1800Gi
         config: |
           [cn.Engine]
           type = "distributed-tae"
    +      [[fileservice]]
    +      name = "SHARED"
    +      [fileservice.cache]
    +      index-file-disk-capacity = "200GiB"
    • Operator version: the operator merges this [[fileservice]] entry into the SHARED entry it generates, by name. That needs matrixone-operator add storage scheduler cfg #578 (2026-03-19) or later. An older operator replaces the list instead.
    • After deploying, the CN startup log should read index file cache initialized ... capacity=214748364800 instead of capacity=8589934592.
  3. added
    severity/s0
    and removed on Nov 29, 2026
  4. Ariznawlll commented on Dec 2, 2026

    @Ariznawlll
    Collaborator

    结论

    未完成验收。main 已通过回退 #32697 避开本 issue 当时观察到的严重回归;但索引工作集大于 index-file cache 时,后续方案的预期行为和性能尚未确认。请 @cpegeric 帮忙确认下面的处理范围和验收方式。

    关键证据

    • 原始 TKE Wiki IVF 10M 运行 43607872311 / IVF job,MatrixOne bc9b822cd1f5d742b550f8366516fd836936ba70:only/POST 首轮 QPS 2.23、P99 约 202 秒、124 个请求失败;两个 AP CN 的 index-file cache 启动容量为 8 GiB。所选 POST 窗口对象存储读取速率分别约 759 和 702 MB/s。与前一轮对比存在节点及工作流差异,这些观测不构成单变量 A/B,也不能把所有 RPC 超时都归因于缓存。
    • 研发此前的分析和本地复现:Wiki 10M entries 约 29–31 GB,8 GiB 缓存装不下;按相同比例缩放的 1M / 双 CN 实验中,小缓存会反复下载并出现吞吐骤降。该评论将此描述为 perf(fileservice): keep IVF-Flat entries objects in the index-file cache #32697 的容量假设,而非证明所有其他错误都是同一根因。
    • #32809 已合入并回退 perf(fileservice): keep IVF-Flat entries objects in the index-file cache #32697;回退后的 run 46446317144 / IVF job 六模式 job 成功,l2_only PRE/POST 步骤成功。这说明当前回退路径下该次回归用例通过,不等于已经验证重新启用优化后的超容量表现。
    • mo-nightly-regression #1952 提议将 CN index-file cache 配置为 100 GiB,截至本次核对仍 open、未合入;它是配置容量的方案,不能单独证明工作集再次超过容量时也能稳定退化。
    • #33543 和 #33544 在进行 FileService cache v2 的范围填充重构;后者截至本次核对 open、未合入,head b51e39a2c5dc73af995e42e5454b2ec9ed35da80。目前没有足够证据确认它已覆盖本 issue 的超容量 IVF 场景。

    待解决点

    请研发确认:

    1. [Tech Request]: File-service cache v2: one range-fill model for the disk and index-file caches #33543 / fileservice: cache v2, one range-fill model for the disk and index-file caches #33544 是否计划覆盖 IVF entries 工作集大于 index-file cache 的多 CN 并发查询?它与本 issue 记录的反复整对象下载、缓存抖动分别有什么关系?
    2. 如果覆盖,预期行为是限制下载放大或使用其他读取路径,还是仍要求用户把缓存配置到容纳全部工作集?能否给出相应的实现位置、支持边界和验收标准?
    3. 如果不覆盖,是否应保留本 issue 作为超容量风险跟踪,还是请提供新的、明确负责该场景的 issue?[Feature Request]: Workflow Change requests #1952 配置扩容与产品侧处理之间如何分工?
    4. 建议验收在同一物理 Wiki 10M 数据/索引、查询集、节点资源及 1TP+2AP 拓扑下,对比缓存能容纳与不足两种情况,分别记录冷/热轮、成功/失败请求、QPS、P50/P99、对象存储读取量、缓存命中/驱逐和召回正确性。若实际方案只承诺配置扩容,也请说明生产配置、磁盘余量和超容量时的预期行为。以上为建议,尚未执行。

    请研发回复后再确定本 issue 应继续跟踪、转交新单还是关闭;现阶段不把回退后的通过结果表述为超容量问题已修复。

    最终结论:未完成验收。已通过子项:回退后的上述 TKE Wiki 六模式 job;未验收项:新方案在索引超过缓存容量时的多 CN 并发性能、错误与正确性。等待研发确认处理范围和验收标准。

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