Share an easy-to-use profiler and flamegraph tool: https://github.com/koute/not-perf.git
Record samples:
nperf record -p `pidof compute-node` -o perf.data
Generate flamegraph:
nperf flamegraph --merge-threads perf.data > perf.svg
You can profile remote compute nodes from a local machine by simply type the following command.
./risedev ctl profile cpu --sleep [seconds]
All compute nodes will be profile for a given seconds
time and generated flame graph will be transferred to your local machine .risingwave/profiling/
.
Note: To profile compute nodes remotely, please make sure all remote nodes have a public IP address accessible from your local machine (where you are running risedev
).