Skip to content

perf(server): 独立拆分 NoDecode permit,未压缩请求不创建或获取解码资源锁 - #642

Merged
SunSi12138 merged 1 commit into
devfrom
perf/nodecode-only-20260909
Sep 9, 2026
Merged

SunSi12138 merged 1 commit into
devfrom
perf/nodecode-only-20260909

Conversation

@SunSi12138

Copy link
Copy Markdown
Owner

范围:从 #605 单独拆出 NoDecode,不包含唤醒调度

用户要求先单独推进 NoDecode;本 PR 基于固定 dev 7acfac26d4fb65d5ee9fe8be9517161c61a6de5c,head d8af9f1a8b79cc0500eaedf58aa001f47126b741。

仅四个 Server 生产文件与 ServerRequestPermitTests,共五个文件。直接提取 #605 固定 head 4da2c231 中的对应补丁,原样应用到新 dev。WakeupSignal.cs 与新 dev blob 完全相同。没有混入全局队列偏好、预取消连接、局部 owner、完成链融合、SDK 覆盖或历史计时测试修正;没有修改 #605 的分支,不自动合并。

改动与所有权约束

由请求的 Compressed wire flag 在创建前确定不可变 mayDecode 能力。未压缩请求不创建、不获取 decode resource Lock;压缩请求继续使用原资源锁路径。NoDecode 的 Activate 与 release claim 使用原子状态转移,保持 reserved/active 可见性、exactly-once release 以及 local-before-global 的排空顺序。NoDecode 不能在之后升级或挂接 decode resources。permit 对象本身仍每请求分配,不把本项描述为消除 heap permit。

已有拆分性能证据(历史基线,不冒充本次新基线验收)

Actions 34364647466 在旧 base 2adbcd58 上的独立二因素对照:原实现 807.93 B/RPC,NoDecode-only 767.96 B/RPC,NoDecode+wake 767.93 B/RPC;约40B的顺序整RPC节省由NoDecode单独实现。不是c128或服务端单边分配。

NoDecode-only 的两块 c128 QPS分别 +3.30%、+1.05%;对应p99分别 −1.67%、+4.57%。独立multi-4xc8组 QPS −2.13%、p99 +3.99%。负结果完整保留,不能把拆分视为已经证明所有负载非劣;多客户端大幅恢复主要来自另一项唤醒策略,不算给本PR。

本PR源码重新基于较新dev,以上不是7acfac26的新端到端性能报告。后续重大性能验收继续保留v1.1.1主对照及当前base增量对照。

本次实际验证

Actions 34369007376:以本PR精确源码执行 Unit项目 Release 构建(0警告、0错误),ServerRequestPermitTests定向6/6、连续两次通过,跳过0。没有声称全套单测或全仓CI已运行;工作流只在这两轮通过后发布新分支。源码bundle及完整构建/测试日志在artifact nodecode-split-34369007376(id10111131529),下载ZIP SHA256 f53d424379c8ab6446c92350f59a4e41d8e5fb0c704523a6d2c5b9414c792f96 已复核。

本次拆分只移植五个明确文件,未强推、未修改dev/main。#605保留用于后续唤醒研究,待本项合并后再独立restack调度改动,避免重复计算收益。

@SunSi12138 SunSi12138 closed this Sep 9, 2026
@SunSi12138
SunSi12138 deleted the perf/nodecode-only-20260909 branch September 9, 2026 15:42
@SunSi12138
SunSi12138 restored the perf/nodecode-only-20260909 branch September 9, 2026 15:51
@SunSi12138 SunSi12138 reopened this Sep 9, 2026
@SunSi12138
SunSi12138 marked this pull request as ready for review September 9, 2026 16:00
@SunSi12138
SunSi12138 merged commit 424fb4a into dev Sep 9, 2026
30 checks passed
@SunSi12138
SunSi12138 deleted the perf/nodecode-only-20260909 branch September 9, 2026 16:06
SunSi12138 added a commit that referenced this pull request Sep 9, 2026
…n PR 605

Bring dev@424fb4a2f4e56744ac50620383afcf52497b6186 into the existing PR branch without rewriting history. NoDecode is already supplied by merged PR #642 and is not reverted or reintroduced.

Relative to dev the complete tree changes only WakeupSignal.cs and WakeupSignalTests.cs, using the unchanged blobs previously reviewed in 4da2c23. No new scheduling experiments or performance claims are introduced.

The user temporarily accepts the documented c128 trade-off and requested no further benchmark repetition. Historical negative evidence remains applicable; this commit is scope reconciliation, not proof that all workloads are non-regressing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant