Skip to content

[Bug]: main PITR 100M COS LOAD DATA slows 12–18x for basic and indexed tables #30613

Closed

Description

@Ariznawlll

Description

The SYS RESTORE SYS lane of the main PITR TKE regression shows a severe slowdown in three 100M-row LOAD DATA URL S3OPTION cases on official MatrixOne main. The no-index table is affected too. This is an observed S-1 performance anomaly; the product-versus-COS/cluster root cause is not yet established.

Environment

Steps to reproduce

Run .github/workflows/pitr-backup-restore-regression-main.yml against official main, then inspect the SYS RESTORE SYS job's three LOAD DATA URL S3OPTION cases under tools/mo-regression-test/cases/big_data_test/02_LOAD_DATA/:

  1. 01_load_basic_for_100M.sql — no-index table, 100M rows.
  2. 07_load_com_pk_index_100M.sql — composite PK/index table, 100M rows.
  3. 05_load_pk_index_100M.sql — PK/index table, 100M rows.

All use the configured Guangzhou COS input and parallel 'true'. Do not change the data size or source when comparing.

Actual behavior

Case Prior main e8b3ed7f Prior main b24d1b31 Current main b111224b
TPCC 10W load (non-COS control) 42 s 42 s 39 s
Basic 100M 94 s 95 s 1,176 s (19m36s; ~12.4x)
Composite PK/index 100M 128 s 132 s 2,343 s (39m03s; ~17.8x)
PK/index 100M 121 s 123 s Still running after 38m as of 2026-10-19 21:23 CST

The first two slow steps reported success, not SQL failure. The current job was still running when this issue was filed, so its final SQL-level output and row verification were not yet available.

Expected behavior

With the same 100M fixtures and comparable TKE topology, each of these loads previously finished in roughly 1.5–2.2 minutes, without a 12–18x increase.

Stability and controls

  • Reproducer: severe slowdown observed in one current main run; independent 3/3 reproduction has not been done.
  • Historical controls: main run 38787656121 and main run 38884188249.
  • In-run control: TPCC load duration is unchanged (39 s versus 42 s), but it does not use the same COS 100M path.
  • CN Pyroscope CPU samples during current composite-PK load (12:20–12:25 UTC) were near idle relative to the prior main load (10:23–10:28 UTC on Oct 16). This points to a wait/IO/coordination path rather than CPU saturation, but does not identify which layer is responsible.
  • DN logs include a Log pod DNS lookup error, and one CN log shows an RC transaction retry. Neither is established as the cause.

Investigation requested

Reproduce the same three COS loads on an isolated current-main environment; compare COS request latency/throughput, CN load spans and wait profiles, network/DNS, and Log/DN health. Preserve SQL timing and loaded-row correctness. Distinguish MO loader regression from COS or cluster contention before assigning a code root cause.

Related

Activity

  1. added this to the MO-202610 milestone on Oct 19, 2026
  2. added theissue type on Oct 19, 2026
  3. Ariznawlll commented on Oct 20, 2026

    @Ariznawlll
    CollaboratorAuthor

    二分结论:Basic 100M COS LOAD 的性能回归边界在 MatrixOne merge commit 7387b96afd3f996379e2ff48faeace9e1790fc35,对应 PR #30364(作者 @iamlinjunhong)。 其直接父提交 e44d8f9bef62615237ec3618c04457e49bac6e7c 正常;两者之间没有其他提交。

    版本 Basic 100M LOAD 结果 证据
    e44d8f9(最后 good) 96.19 秒完成,独立校验 100,000,000 行,环境清理成功 run 39369823664
    7387b96(首个 bad,PR #30364) MO 连接成功、LOAD SQL 实际发出;运行 600 秒后被测试超时终止(exit 124),环境清理成功 run 39391683872 / LOAD job
    18d5335(后继提交,PR #30212) 同一个 LOAD 再次运行 600 秒超时,环境清理成功 run 39386996323

    二分使用同一份 Basic 100M COS CSV、parallel 'true' 和单 case TKE 流程,以 600 秒为超阈值界线。因此可以定位第一个超阈值提交,但 bad 轮的 SQL 未完成、1 亿行校验被跳过,不能把 600 秒当作 SQL 完成耗时。此轮只二分了无索引 Basic 100M;原 issue 中两个带索引 LOAD 仍需单独验证。

    PR #30364 修改了并行 LOAD 的文件切分逻辑,和本 case 的 parallel 'true' 路径相关。请结合该提交排查具体等待/IO 路径;二分定位提交边界,不等于已证明代码层根因。Issue 已分配给 PR 作者 @iamlinjunhong。

  4. iamlinjunhong commented on Oct 20, 2026

    @iamlinjunhong
    Contributor

    已在#30519 中修复

  5. Ariznawlll commented on Oct 20, 2026

    @Ariznawlll
    CollaboratorAuthor

    复测版本与场景

    • MatrixOne 官方 main:21966565287edf9f7d7f519af60d269711608945,已包含 修复 PR #30519 的 merge commit 799523418e9f941afd65cd440d24e7fa0003a35e。
    • 回归仓库 commit:3ca64578e5f26687b6343a8362f53bebfadecf6d(与 MatrixOne commit 不同)。
    • 2026-10-20 的 PITR TKE 分布式回归,SYS RESTORE SYS lane;仍用原来的三个 100M 行广州 COS LOAD DATA URL S3OPTION 用例及 parallel 'true'。

    性能复测结果

    下表比较的是日志中 LOAD SQL 本身 的执行时间,不是整个 job 的耗时。正常基线来自原 issue 所列两轮相同用例的 main 回归。

    用例 正常基线 报问题时 b111224b 本轮 21966565 本轮相对基线
    无索引 Basic 100M 94–95 秒 1,176.5 秒 269.5 秒(4分29秒) 约 2.8–2.9 倍
    复合主键/索引 100M 128–132 秒 2,342.3 秒 1,233.5 秒(20分34秒) 约 9.3–9.6 倍
    主键/索引 100M 121–123 秒 2,359.7 秒 1,097.2 秒(18分17秒) 约 8.9–9.1 倍

    三个 SQL 均成功完成,耗时较报问题时缩短,但都没有恢复到原有性能;两个带索引场景仍需约 18–21 分钟。本轮 SYS RESTORE SYS job 成功只证明 LOAD 能执行完,不代表性能问题已经修好。本轮 TPCC 10W 非 COS 对照步骤约 48 秒,正常基线约 42 秒,没有出现同等级退化;但它不走相同的 COS 路径,不能据此锁定根因。

    PR #30519 解决的是关闭 COS response 时额外读取剩余对象数据的问题,与并行 COS LOAD 路径相关;其 PR 描述并未声称 TKE/nightly 吞吐已恢复。现有修复后性能证据只有这一轮,不能直接断定剩余退化仍是同一代码原因,也不能排除 COS 或集群因素。请继续结合 COS 请求与吞吐、CN 等待/IO profile、网络及负载分析,并在可比环境重复跑这三个用例。

    本次仅核对现有回归的执行日志与提交包含关系,没有额外独立做导入后 100M 行数或逐行一致性校验,也没有新增测试脚本。

    证据

    结论

    测试不通过。修复后性能有所改善,但 #30613 描述的三个 COS LOAD 场景仍明显慢于正常基线。

  6. LeftHandCold commented on Oct 21, 2026

    @LeftHandCold
    Collaborator

    补充 2026-10-20 晚启动的 1B BigData 实测,供本 issue 继续定位修复后的残留 LOAD 性能问题;这里记录相近症状,不预设与 PITR 100M 的残留慢点具有相同根因。

    • 当前 run 39450417086,attempt 2:MO main 76e152a1dd02b7875829027117a6f6344d1f8d33,已确认包含 fix(fileservice): avoid draining COS responses on close #30519 的 merge commit 799523418e9f941afd65cd440d24e7fa0003a35e。不是 workflow 仓库的 SHA。
    • 资产 2c0b46570aef2c351acf62d4050896c1f76731f4,runner f65333537ae226af628082b0f7b6a53a44097e5f。3 CN / 1 TN,经 proxy;namespace mo-bigdata-pilot-39450417086-2。
    • 对照:main run 38762357515,MO e8b3ed7f21c2b1966d74814adaa2bcd96d8c129f。逐项核对五个 LOAD 的 source_sha256 相同。
    • 以下是 artifact native-summary.json 中 LOAD SQL 的 execute_time_ms,不含 GitHub 排队、Pod 调度和 Python 安装:
    LOAD 对照 main 秒 当前 main 秒 比值
    L1 Basic 895.95 889.63 0.99x
    L2 PK 1008.76 2579.10 2.56x
    L3 PK Index 1102.03 3031.43 2.75x
    L4 Com PK Index 1197.68 3769.79 3.15x
    L5 Sortkey 1007.55 1012.03 1.00x

    五项 SQL 均成功,LOAD 后 count 校验均通过:L1–L4 各 1,000,000,000 行,L5 999,999,999 行(原用例预期)。三项带 PK 的 LOAD 合计增加约 101 分钟;Basic/Sortkey 已回到这轮历史基线附近。本轮尚未结束,这不是完整 BigData 验收通过的声明。

    可复核的 job:L2、L3、L4。

    定位证据(UTC):

    • L3 SQL 于 2026-10-20T18:12:08.358Z 开始,CN msslx 的两个 compileExternScan cost 分别为 4.570 s、3.917 s(18:12:13 / 18:12:17);statement 01a15a83-7a27-7687-96f1-54ac04149c0c。
    • L4 SQL 于 19:04:28.394Z 开始,CN l2nds 两个对应 compile cost 为 4.483 s、3.285 s(19:04:33 / 19:04:36);statement 01a15ab3-63ec-733b-9ff5-3b237f77387a。
    • 因此当前这两项的几十分钟耗时不能归因于之前数小时的 COS close-drain 规划卡顿;慢点主要在执行阶段。
    • L4 的 19:15–19:20 UTC CPU profile 中,两个 CN t2bln / msslx 约 79.5% / 81.2% inclusive CPU samples 位于 external 读取/CSV 转换调用路径;协调 CN l2nds 同时有 CSV 转换、UnionOne、压缩/写入负担。这是一个五分钟窗口的 CPU 样本,不等于全程 wall time,也不能据此排除 IO 等待或锁定哪个 PR。
    • 当前截至 03:00 UTC 的 Prometheus 5 分钟采样中,全部九个 Pod restart counter 为 0,CN working-set 采样最大约 40.22 GiB;没有此轮 OOM/restart 的证据。第一轮 attempt 在 SQL 启动前因 LogService Pending / Insufficient cpu+memory 失败,不能混入上述 SQL 耗时。

    建议继续围绕带 PK LOAD 的执行计划、输入扫描次数/分发和写入阶段做可控对照;#30421 新增 PK 冲突检查值得核对执行路径,但现有证据没有完成该 PR 的因果验证,不应去掉正确性校验来恢复吞吐,也不应把这份证据当作 #30519 无效或 #29571 复发。

  7. iamlinjunhong commented on Oct 21, 2026

    @iamlinjunhong
    Contributor

    补充 2026-10-21 在 129 上实际执行的原始用例复测,测试版本为 PR #30697 的 579e0a1fad124ac4cafd77a88b018919d80dd21f,运行时确认 mo_pk_check_by_cn=OFF(默认值,未执行 SET),mo_pk_check_by_dn=OFF。

    复用原始输入、冻结的测试脚本,fresh MO 串行执行;Slot A / NUMA0 / 28 CPU,MO 内存 84 GiB、GOMEMLIMIT=76GiB、GOGC=150。每项新旧成功样本的性能指纹仅 mo_commit 不同。

    原始用例 本轮结果
    #30520 TPCC 1000W / 1000 terminals / 5 分钟:12,440.77 tpmC,达到旧 good 中位数 12,893.76 的 96.49%;事务错误为 0,一致性检查通过
    #30544 TPCH 1T LOAD 52 分 55 秒完成八表 LOAD,八表行数全部符合预期;lineitem 5,999,989,709 行,耗时 41 分 23.405 秒,旧 good 为 41 分 19.025 秒

    两项工作流均成功,无 OOM、重启,清理完成。TPCH 的 109 次采样中 CN spill_disk reserve/release/reject/reconcile amount 均为 0,未复现原 LOAD spill budget 错误。

    结果支持默认 OFF 下 TPCC 恢复到旧基线附近、TPCH 1T 原始 LOAD 成功。这是单轮实测,不代表统计等价或同 SHA 的 ON/OFF 因果证明。TPCH 启动前清理了获准删除的旧数据库目录,可用空间高于原失败现场;未执行 TPCH 查询。

    这两项是 129 上的关联回归验证,不是本 issue 的 TKE/COS 100M 原始三场景验收,不能据此宣称 #30613 的 COS 性能已恢复或关闭本 issue。修复与开关实现见 #30697。

  8. XuPeng-SH commented on Oct 22, 2026

    @XuPeng-SH
    Contributor

    2026-10-21 targeted TKE rerun did not reach the LOAD cases

    The dispatched run 39540728649 resolved the MatrixOne target to 579e0a1fad124ac4cafd77a88b018919d80dd21f, but SETUP MO TEST ENV / Create MO Cluster failed before SYS RESTORE SYS started. The SQL readiness probe returned ERROR 20508: all CN servers are busy, possibly due to too many active transactions on 23 attempts and then timed out. The three 100M COS LOAD cases were skipped.

    This run provides no performance result for the fix and does not change the open acceptance status. The 129 TPCC/TPC-H measurements in the previous comment remain related regressions, not the required TKE/COS 100M validation.

  9. added
    severity/s0
    and removed on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/performancekind/bugseverity/s0

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions