Skip to content

Commit cb314d1

Browse files
committed
docs: Updated all graphs adding RT-label and added cyclictests for non-RT kernels
1 parent e32f67b commit cb314d1

23 files changed

+16
-6
lines changed

ReadMe.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ Then **any process from inside the Docker can set real-time priorities `rtprio`*
9999

100100
This Github repository comes with a simple example that can be used to try it out. Inside the Docker container a [`cyclictest`](https://wiki.linuxfoundation.org/realtime/documentation/howto/tools/cyclictest/start) is run to assess the real-time performance of the system. You can compare the outcome to running it on your local system. There should be virtually no difference between the two, as can be seen from the graphs below:
101101

102-
| ![On host operating system](media/p500_cstates_off.png) | ![Inside Docker](media/p500_docker_cstates_off.png) |
103-
| ------------------------------------------------------- | --------------------------------------------------- |
102+
| ![On host operating system](media/p500_rt_cstates_off.png) | ![Inside Docker](media/p500_rt_docker_cstates_off.png) |
103+
| ---------------------------------------------------------- | ------------------------------------------------------ |
104104

105105
For launching the `cyclictest` open the Docker by typing
106106

doc/realtime_basics/PreemptRt.md

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ Author: [Tobit Flatscher](https://github.com/2b-t) (August 2021 - February 2023)
66

77
The set-up of `PREEMPT_RT` basically consists in **installing a new kernel** either from an existing **Debian package** that was compiled by somebody else for you, by creating a Debian package yourself by recompiling the kernel or installing it directly. After that you will have to perform a restart and booting into that freshly installed kernel as well as potentially changing the boot order in order to not having to boot into it manually at start-up.
88

9+
The huge difference a `PREEMPT_RT`-patched kernel has on the **latency** of a system can be seen in the graphs below (refer to the real-time optimizations for a more precise explanation of how these graphs can be obtained). Note that both graphs are double-logarithmical plots and as such the difference at a first glance might not seem as big. But as can be seen from the maximum latencies the latency of a `PREEMPT_RT`-patched system is roughly **two orders of magnitude lower**. For any real-time determinism this maximum latency is much more important than the average latency.
10+
11+
| ![P500 with C-states enabled](../../media/p500_cstates_on_log.png) | ![P500 with C-states disabled](../../media/p500_cstates_off_log.png) |
12+
| :----------------------------------------------------------- | ------------------------------------------------------------ |
13+
| Lenovo ThinkStation P500 running an unpatched `5.15.0-58-generic` kernel with **C-states enabled** | Lenovo ThinkStation P500 running an unpatched `5.15.0-58-generic` kernel with **C-states disabled** |
14+
15+
| ![P500 with C-states enabled](../../media/p500_rt_cstates_on_log.png) | ![P500 with C-states disabled](../../media/p500_rt_cstates_off_log.png) |
16+
| :----------------------------------------------------------- | ------------------------------------------------------------ |
17+
| Lenovo ThinkStation P500 running a `PREEMPT_RT`-patched `5.15.86-rt56` kernel with **C-states enabled** | Lenovo ThinkStation P500 running `PREEMPT_RT`-patched `5.15.86-rt56` kernel with **C-states disabled** |
18+
919
### 1.1 Known issues
1020

1121
The `PREEMPT_RT` kernels are known for causing a headache with the **official Nvidia graphics driver**, at least the binary versions of it. Please have a look yourself before deciding to continue if you have an Nvidia GPU. Potentially you might end up with the Nouveau Linux graphics driver potentially with a lower refresh rate or lower resolution and for laptops you might lose access to your external display depending on the precise computer architecture and graphics card.

doc/realtime_basics/RealTimeOptimizations.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ The test duration with five minutes is quite short. For true real-time systems t
107107

108108
Both systems use the same self-compiled version of an **Ubuntu 22.04 5.15.86-rt56 kernel**. **Intel Turbo-boost** is **disabled** in the BIOS. Furthermore all tests for Docker are ran with Docker-Compose directly (without Visual Studio Code in between). Finally for best performance the T14 notebook was plugged in during the entire test.
109109

110-
| ![P500 with C-states enabled](../../media/p500_cstates_on.png) | ![P500 with C-states disabled](../../media/p500_cstates_off.png) |
110+
| ![P500 with C-states enabled](../../media/p500_rt_cstates_on.png) | ![P500 with C-states disabled](../../media/p500_rt_cstates_off.png) |
111111
| :----------------------------------------------------------- | ------------------------------------------------------------ |
112-
| Lenovo ThinkStation P500 running PREEMPT_RT with **C-states enabled** | Lenovo ThinkStation P500 running PREEMPT_RT with **C-states disabled** |
112+
| Lenovo ThinkStation P500 running `PREEMPT_RT` with **C-states enabled** | Lenovo ThinkStation P500 running `PREEMPT_RT` with **C-states disabled** |
113113

114-
| ![T14 with C-states enabled](../../media/t14_cstates_on.png) | ![T14 with C-states disabled](../../media/t14_cstates_off.png) |
114+
| ![T14 with C-states enabled](../../media/t14_rt_cstates_on.png) | ![T14 with C-states disabled](../../media/t14_rt_cstates_off.png) |
115115
| :----------------------------------------------------------- | ------------------------------------------------------------ |
116-
| Lenovo ThinkPad T14 Gen1 running PREEMPT_RT with **C-states enabled** | Lenovo ThinkPad T14 Gen1 running PREEMPT_RT with **C-states disabled** |
116+
| Lenovo ThinkPad T14 Gen1 running `PREEMPT_RT` with **C-states enabled** | Lenovo ThinkPad T14 Gen1 running `PREEMPT_RT` with **C-states disabled** |
117117

118118
While latencies in the sub 100us region are generally far than enough for robotics, we can see that the **latency is greatly reduced for both systems when de-activating the C-states**, even halfed in the case of the Lenovo ThinkStation P500. These differences are also visible when using a Docker, as the latencies from real-time capable code ran inside a Docker are virtually indistinguishable from processes ran on the host system. It should be mentioned that the T14 has a remarkable performance for a notebook (several notebooks I used suffered from severe and regular latency spikes in the 500us region) but when running the test for extended periods rare latency spikes of up to two milliseconds were observed.
119119

media/p500_cstates_off.png

-8.56 KB
Binary file not shown.

media/p500_cstates_off_log.png

8.75 KB
Loading

media/p500_cstates_on.png

-10.6 KB
Binary file not shown.

media/p500_cstates_on_log.png

10.6 KB
Loading

media/p500_docker_cstates_off.png

-8.75 KB
Binary file not shown.

media/p500_docker_cstates_on.png

-10.7 KB
Binary file not shown.

media/p500_rt_cstates_off.png

8.62 KB
Loading

media/p500_rt_cstates_off_log.png

8.61 KB
Loading

media/p500_rt_cstates_on.png

10.7 KB
Loading

media/p500_rt_cstates_on_log.png

10.4 KB
Loading

media/p500_rt_docker_cstates_off.png

8.81 KB
Loading

media/p500_rt_docker_cstates_on.png

10.8 KB
Loading

media/t14_cstates_off.png

-7.16 KB
Binary file not shown.

media/t14_cstates_on.png

-7.2 KB
Binary file not shown.

media/t14_docker_cstates_off.png

-7.47 KB
Binary file not shown.

media/t14_docker_cstates_on.png

-7.62 KB
Binary file not shown.

media/t14_rt_cstates_off.png

7.22 KB
Loading

media/t14_rt_cstates_on.png

7.27 KB
Loading

media/t14_rt_docker_cstates_off.png

7.53 KB
Loading

media/t14_rt_docker_cstates_on.png

7.69 KB
Loading

0 commit comments

Comments
 (0)