Question
MultiThreadedExecutor vs. tracing-first: which lever reduces callback-chain latency when MutuallyExclusiveCallbackGroup serializes work?
Neel Dey
0 reputation · 13 Jul 2020, 15:44 UTC
23.6K views
0 reputation · 13 Jul 2020, 15:44 UTC
A ROS 2 node runs several callbacks registered in a MutuallyExclusiveCallbackGroup under a SingleThreadedExecutor. End-to-end latency exceeds the target. The team is debating whether to switch to a MultiThreadedExecutor or first instrument the pipeline with ros2_tracing (tracetools/LTTng) to locate the bottleneck.
MutuallyExclusiveCallbackGroup prevents concurrent execution of its callbacks even under a MultiThreadedExecutor, so adding threads may not help a serialized chain.ros2_tracing exposes callback start/end, executor wait, and RMW publish/subscribe tracepoints, but tracepoint names and availability vary by distribution (Humble, Jazzy, Rolling).ros2_tracing callback-start/end and executor-wait tracepoints reliably distinguish scheduler latency from middleware queuing on Jazzy?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.