You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve scheduling configuration of examples_rclcpp_cbg_executor package (#331)
* Reduced the OS-specific priority of the high prio Executor thread on Linux and QNX. Chose the configuration to be below typical threaded interrupt handlers.
Signed-off-by: Ralph Lange <[email protected]>
Copy file name to clipboardExpand all lines: rclcpp/executors/cbg_executor/README.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,15 +29,18 @@ ros2 run examples_rclcpp_cbg_executor ping_pong
29
29
Example of a typical output - note the zero pongs received on the low prio path:
30
30
31
31
```
32
-
[INFO] [..] [pong_node]: Running experiment from now on for 10s ...
33
-
[INFO] [..] [ping_node]: Both paths: Sent out 982 of configured 1000 pings, i.e. 98%.
34
-
[INFO] [..] [ping_node]: High prio path: Received 980 pongs, i.e. for 99% of the pings.
35
-
[INFO] [..] [ping_node]: High prio path: Average RTT is 17.2ms.
32
+
[INFO] [..] [pong_node]: Running experiment from now on for 10 seconds ...
33
+
[INFO] [..] [ping_node]: Both paths: Sent out 953 of configured 1000 pings, i.e. 95%.
34
+
[INFO] [..] [ping_node]: High prio path: Received 951 pongs, i.e. for 99% of the pings.
35
+
[INFO] [..] [ping_node]: High prio path: Average RTT is 14.0ms.
36
+
[INFO] [..] [ping_node]: High prio path: Jitter of RTT is 7.460ms.
36
37
[INFO] [..] [ping_node]: Low prio path: Received 0 pongs, i.e. for 0% of the pings.
37
-
[INFO] [..] [pong_node]: High priority executor thread ran for 9995ms.
38
+
[INFO] [..] [pong_node]: High priority executor thread ran for 9542ms.
38
39
[INFO] [..] [pong_node]: Low priority executor thread ran for 0ms.
39
40
```
40
41
42
+
Note: On Linux, the two Executor threads, which are both scheduled under `SCHED_FIFO`, can consume only 95% of the CPU time due to [RT throttling](https://wiki.linuxfoundation.org/realtime/documentation/technical_basics/sched_rt_throttling).
43
+
41
44
Running the two nodes in separate processes:
42
45
43
46
```bash
@@ -74,11 +77,13 @@ With these values, about (0.033s - 0.025s) / 0.010s = 80% of the ping messages o
74
77
75
78
```
76
79
...
77
-
[INFO] [..] [ping_node]: Both paths: Sent out 303 of configured 303 pings, i.e. 100%.
78
-
[INFO] [..] [ping_node]: High prio path: Received 302 pongs, i.e. for 99% of the pings.
79
-
[INFO] [..] [ping_node]: High prio path: Average RTT is 25.2ms.
80
-
[INFO] [..] [ping_node]: Low prio path: Received 231 pongs, i.e. for 76% of the pings.
81
-
[INFO] [..] [ping_node]: Low prio path: Average RTT is 196.1ms.
80
+
[INFO] [..] [ping_node]: Both paths: Sent out 294 of configured 303 pings, i.e. 97%.
81
+
[INFO] [..] [ping_node]: High prio path: Received 293 pongs, i.e. for 99% of the pings.
82
+
[INFO] [..] [ping_node]: High prio path: Average RTT is 26.2ms.
83
+
[INFO] [..] [ping_node]: High prio path: Jitter of RTT is 7.654ms.
84
+
[INFO] [..] [ping_node]: Low prio path: Received 216 pongs, i.e. for 73% of the pings.
85
+
[INFO] [..] [ping_node]: Low prio path: Average RTT is 202.5ms.
86
+
[INFO] [..] [ping_node]: Low prio path: Jitter of RTT is 36.301ms.
0 commit comments