oprobe OpenDAL operator 性能剖析器
找出 OpenDAL 的修复,再证明它有效
oprobe 按阶段记录 OpenDAL operator 发出的每个请求,为每条发现指出一个改动,并在上线之前用 A/B 测试证明它。
未经公证:首次打开方法
- macOS 15 及以上:第一次打开时,到“系统设置 → 隐私与安全性”点“仍要打开”。
- Windows:如果 SmartScreen 拦下,点“更多信息”,再点“仍要运行”。
oprobe demo -
oprobe prove 20261130-102347-bb72 tail_stragglers
- 3 个平台:macOS、Windows、Linux
- 按需 只在你要求时联网
- Apache-2.0 开源许可
从一次运行到已证明的改动
-
逐阶段看每个请求
每个操作下列出它的后端请求,分成排队、建连、发送、首字节、传输和重试退避。
-
每条发现只给一个补救
发现写明原因和一个 OpenDAL 补救措施,用
op.toml路径表示,比如layers.tail_cut。单次运行不给数字。 -
上线之前先证明
oprobe prove交错运行当前的 operator 和改动后的 operator(A B A B),只有改动更好时才给出 layer diff。 -
剖析生产环境
给你自己的 operator 加上
oprobe-trace这一层,它存下的.oprobe文件可以像其他运行一样打开。 -
原生窗口或终端
不带命令运行
oprobe就打开应用:有显示器时是原生窗口,否则在终端里打开同一个应用,SSH 下也行。 -
并排对比运行
两次运行,或一次运行里的多个 operator,分列对照;差异只用中性色显示,因为只有
prove才能衡量改动。
开始使用
安装脚本会装上应用和命令行。GitHub Releases 页面还有 Windows 的 .msi 和 PowerShell 脚本、.deb 和 .rpm 软件包,以及给服务器和 CI 用的纯命令行版。
-
安装(macOS、Linux)
curl -fsSL https://github.com/hxddh/oprobe/releases/latest/download/install.sh | sh -
在本机剖析一个“行为不良”的 S3 实验室,无需任何账号
oprobe demo查看实际输出
[Attention] 2.6% of GetObject, 2.4% of PutObject and 2.3% of HeadObject requests wait far longer for the server's first byte than their peers (stragglers). lab://demo · small-files · 8.0 s · run 20261130-102347-bb72 ▲ 1 tail_stragglers (high confidence) 123 GetObject stragglers wait ~261ms for the first byte against ~9.57ms for a typical GetObject; 59 PutObject stragglers wait ~261ms for the first byte against ~9.52ms for a typical PutObject; 18 HeadObject stragglers wait ~260ms for the first byte against ~9.52ms for a typical HeadObject; operation p50 9.71ms · p99 261ms remedy: layers.tail_cut + layers.retry.min_delay — re-issue requests far slower than their peers, after a short retry backoff (TailCutLayer + RetryLayer::with_min_delay) note: each cut request is sent again: more requests per operation, and more bytes when the cut one had started its body next: oprobe prove 20261130-102347-bb72 tail_stragglers 1001.7 ops/s · 56.4 MiB/s · p50 9.71ms · p99 261ms · errors 0.00% full profile: oprobe show 20261130-102347-bb72 --detail · terms: https://github.com/hxddh/oprobe/blob/v9.10.0/docs/concepts.md#glossary -
对首要发现的补救措施做 A/B 测试
oprobe prove last
常见问题
支持哪些存储服务?
常见的都已内置:S3、GCS、Azure Blob、OSS、COS、OBS、B2 和 WebDAV,还有本地文件系统、内存和实验室。从源码构建时加 --features all-services 就包含其余的服务。
可以直接对真实存储运行吗?
一次运行只写在新的 oprobe-run-<id>/ 前缀下,结束时删除;被强行终止的运行可能留下它。
-
--dry-run只打印计划,不发出任何请求。 -
--read-only拒绝一切写入。 -
--max-requests、--max-bytes和--max-duration是硬性预算。
能把它当作 CI 关卡吗?
要谨慎:oprobe 是性能剖析器,不是 CI 关卡,共享存储上的剖析结果每次运行都会有出入。
-
-o json输出一份 JSON 文档,退出码是稳定的。 - 改动让 operator 变差时,
oprobe prove以退出码 3 结束。