User Tools

Site Tools

한국어

comfilepi:improving_real-time_performance:index

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
comfilepi:improving_real-time_performance:index [2023/05/12 13:35]
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 36: Line 36:
 sudo taskset -cp 3 `pidof test` sudo taskset -cp 3 `pidof test`
 </​code>​ </​code>​
 +
 +Core isolation can also be achieved using //​cpusets//​. ​ See the following resources for more information:​
 +  * [[https://​docs.kernel.org/​admin-guide/​cgroup-v1/​cpusets.html|Linux kernel documentation on cpusets]]
 +  * [[https://​github.com/​lpechacek/​cpuset/​blob/​master/​doc/​tutorial.txt|cpuset utility package documentation]]
  
 ===== Schedule the Program as Real-Time with High Priority ===== ===== Schedule the Program as Real-Time with High Priority =====
Line 42: Line 46:
  
 <​code>​ <​code>​
-sudo chrt -f -p `pidof test`+sudo chrt -f -p 99 `pidof test`
 </​code>​ </​code>​
  
Line 51: 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 149: 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.
comfilepi/improving_real-time_performance/index.1683866111.txt.gz · Last modified: 2023/05/12 13:35 by COMFILE Technology