Skip to content

[refactor][utils] Use Folly for thread executor - #1109

Merged
chuandew merged 7 commits into
dingodb:mainfrom
chuandew:build/add-folly
Sep 20, 2026
Merged

chuandew merged 7 commits into
dingodb:mainfrom
chuandew:build/add-folly

Conversation

@chuandew

@chuandew chuandew commented Sep 15, 2026

Copy link
Copy Markdown
Member

对比版本

本次分别构建并实际测量下面两个固定 commit,不沿用之前版本的数据:

  • PR 前:上游基线1f247f39c52e66d9b6698ddedfcb0da8ca40a9e4
  • PR 后:包含本 PR 修改的版本ecf98eb4086ca6c2473942e2581aee3205deff5b

两边使用同一份基准源码、相同依赖和编译参数、相同绑核与运行次数。按 AB、BA、AB、BA 交替测试,共 80 次测量进程运行,全部成功

NewHandle 平均耗时

单位:µs/次,越低越好

模式 线程数 PR 前 PR 后
只读 1 1.184 0.107
只读 4 2.458 0.127
只读 8 3.255 0.143
只读 16 10.257 0.363
只读 32 20.093 0.561
可写 1 3.587 0.143
可写 4 6.918 0.165
可写 8 13.823 0.174
可写 16 27.714 0.375
可写 32 56.474 0.610

ReleaseHandler 平均耗时

单位:µs/次,越低越好

模式 线程数 PR 前 PR 后
只读 1 0.087 0.109
只读 4 0.327 0.122
只读 8 0.890 0.144
只读 16 9.555 0.329
只读 32 19.952 0.612
可写 1 0.130 0.179
可写 4 0.857 0.192
可写 8 2.418 0.207
可写 16 12.069 0.363
可写 32 26.914 0.653

结论:本次空句柄微基准中,NewHandle 在全部测试配置下更快;ReleaseHandler 在 4 线程及以上更快,单线程有小幅增加。创建+释放的合计耗时在全部配置下均降低。 这是客户端内部句柄管理函数的耗时,不包含完整 open/close、FUSE 或业务 I/O,不将其换算成文件系统整体吞吐提升。

@chuandew
chuandew force-pushed the build/add-folly branch 7 times, most recently from ab6b0af to 639f418 Compare September 17, 2026 07:19
@chuandew
chuandew marked this pull request as ready for review September 17, 2026 07:23
@chuandew chuandew changed the title [WIP][refactor][utils] Use Folly for thread executor [refactor][utils] Use Folly for thread executor Sep 17, 2026
@rock-git
rock-git added this pull request to the merge queue Sep 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 17, 2026
@chuandew
chuandew added this pull request to the merge queue Sep 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 17, 2026
@chuandew
chuandew added this pull request to the merge queue Sep 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 18, 2026
@chuandew
chuandew added this pull request to the merge queue Sep 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 18, 2026
@chuandew
chuandew added this pull request to the merge queue Sep 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 18, 2026
@chuandew
chuandew added this pull request to the merge queue Sep 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 19, 2026
@chuandew
chuandew added this pull request to the merge queue Sep 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 19, 2026
@chuandew
chuandew added this pull request to the merge queue Sep 20, 2026
Merged via the queue into dingodb:main with commit 0f6bed6 Sep 20, 2026
5 checks passed
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