Performance Task: Profile current sysbench workload (CPU/Memory/Mutex)
Is there an existing issue for performance?
Environment
- Branch:
main
- Deployment: dev standalone / multi-CN as applicable
Details of Performance
建立一个专用的 sysbench profiling 任务,聚焦当前问题场景下的 CPU、Memory、Mutex 瓶颈:
- 覆盖
go runtime CPU profile、heap、mutex profile;
- 形成可复现、可对比的采集流程;
- 输出 top/火焰图等可定位结论,给出优化方向。
Reproduction Steps (sysbench)
- 以低干扰方式启动 MO(示例):
./mo-service -debug-http=:6060 -block-profile-rate=100 -mutex-profile-fraction=100 -launch ./etc/launch/launch.toml
- 确认实际运行的 sysbench 脚本参数(threads、duration、events、sql)
- 压测时采集 profile(至少持续 30s):
curl -s "http://127.0.0.1:6060/debug/pprof/profile?seconds=30" > cpu.pprof
curl -s http://127.0.0.1:6060/debug/pprof/heap > heap.pprof
curl -s http://127.0.0.1:6060/debug/pprof/mutex > mutex.pprof
curl -s http://127.0.0.1:6060/debug/pprof/block > block.pprof
curl -s http://127.0.0.1:6060/debug/pprof/goroutine > goroutine.pprof
- 多轮采集:压测前、压测中、压测后。
- 分析(示例):
go tool pprof -top cpu.pprof
go tool pprof -web cpu.pprof # 如安装 graphviz
go tool pprof -top heap.pprof
go tool pprof -top mutex.pprof
go tool pprof -top block.pprof
Expected Analysis Output
- CPU: 确认是否存在明显热点算子、锁、序列化/反序列化或调度路径;
- Memory: 定位高分配点,确认是否有持续增长(可疑泄漏)或短时暴涨;
- Mutex: 定位高竞争对象及其调用链,给出是否为代码路径、并发参数或引擎交互导致。
Acceptance
- 采集步骤对同一 workload 可复现
- 形成每类 profile 的结论与可落地优化建议
- 输出下一步修复建议清单(含优先级)
Performance Task: Profile current sysbench workload (CPU/Memory/Mutex)
Is there an existing issue for performance?
Environment
mainDetails of Performance
建立一个专用的 sysbench profiling 任务,聚焦当前问题场景下的 CPU、Memory、Mutex 瓶颈:
goruntime CPU profile、heap、mutex profile;Reproduction Steps (sysbench)
go tool pprof -top cpu.pprof go tool pprof -web cpu.pprof # 如安装 graphviz go tool pprof -top heap.pprof go tool pprof -top mutex.pprof go tool pprof -top block.pprofExpected Analysis Output
Acceptance