This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
comfilepi:improving_real-time_performance:index [2023/05/12 13:53] COMFILE Technology [Isolate a Program to One of the 4 CPU Cores] |
comfilepi:improving_real-time_performance:index [2024/03/13 15:42] (current) COMFILE Technology [Schedule the Program as Real-Time with High Priority] |
||
---|---|---|---|
Line 46: | Line 46: | ||
<code> | <code> | ||
- | sudo chrt -f -p `pidof test` | + | sudo chrt -f -p 99 `pidof test` |
</code> | </code> | ||
Line 55: | Line 55: | ||
===== Disable Realtime Throttling (Not Recommended) ===== | ===== Disable Realtime Throttling (Not Recommended) ===== | ||
- | When using FIFO scheduling, it may help be necessary to disable [[https://lwn.net/Articles/296419/|realtime throttling]]. | + | When using FIFO scheduling, it may be necessary to disable [[https://lwn.net/Articles/296419/|realtime throttling]]. |
<code> | <code> | ||
Line 153: | Line 153: | ||
{{ :comfilepi:improving_real-time_performance:jitter.png?900 }} | {{ :comfilepi:improving_real-time_performance:jitter.png?900 }} | ||
- | As can be seen in the chart above, the ordinary kernel, without any CPU isolation or real-time scheduling, operates with excessive jitter and would likely not be suitable for any real-time application. However, by taking a few measures to optimize a process for real-time performance, it is possible to reduce jitter potentially below 50µs which may be acceptable for some real-time use cases. | + | As can be seen in the chart above, the ordinary kernel, without any CPU isolation or real-time scheduling, operates with excessive jitter and would likely not be suitable for any real-time application. However, by taking a few measures to optimize a process for real-time performance, it is possible to reduce jitter potentially below 50µs which may be acceptable for some real-time use cases. Without the intentional disturbance introduced by running the web browser, the performance is better. |
Although the real-time kernel can reduce jitter, it trades off overall performance throughput. Using the real-time kernel may cause the system to boot slower and run some applications with a mild performance penalty, but it will provide more deterministic behavior. | Although the real-time kernel can reduce jitter, it trades off overall performance throughput. Using the real-time kernel may cause the system to boot slower and run some applications with a mild performance penalty, but it will provide more deterministic behavior. |