This shows you the differences between two versions of the page.
realtime:documentation:howto:tools:cyclictest:faq [2018/08/21 10:25] ebugden Move from temporary location to main tools page |
realtime:documentation:howto:tools:cyclictest:faq [2021/12/02 17:46] (current) bartwensley [How can the influence of Cyclictest be minimized when evaluating latencies on an isolated set of CPUs?] |
||
---|---|---|---|
Line 35: | Line 35: | ||
==== How can the influence of Cyclictest be minimized when evaluating latencies on an isolated set of CPUs? ==== | ==== How can the influence of Cyclictest be minimized when evaluating latencies on an isolated set of CPUs? ==== | ||
- | When measuring the latencies on a subset of the CPUs, make sure that the main Cyclictest thread is running on the CPUs that are not being evaluated. For example, if a system has two CPUs and the latencies on CPU 0 are being evaluated, then the main Cyclictest thread should be pinned to CPU 1. Cyclictest's main thread is not real-time, but it can potentially have an affect on the latencies if it executes on the evaluated CPU(s) because there will be additional context switches. After starting Cyclictest, the main thread can be restricted to execution on a certain subset of CPUs using the [[realtime:documentation:howto:tools:cpu-partitioning:taskset|taskset]] command. For example, if the main thread's PID is 4764, then it can be pinned to CPU 1 using the following command: | + | When measuring the latencies on a subset of the CPUs, make sure that the main Cyclictest thread is running on the CPUs that are not being evaluated. For example, if a system has two CPUs and the latencies on CPU 0 are being evaluated, then the main Cyclictest thread should be pinned to CPU 1. Cyclictest's main thread is not real-time, but it can potentially have an affect on the latencies if it executes on the evaluated CPU(s) because there will be additional context switches. The main thread can be restricted to execution on a certain subset of CPUs using the |
+ | ''<nowiki>--mainaffinity=CPUSET</nowiki>'' option. For example, the main thread can be pinned to CPU 1 using ''<nowiki>--mainaffinity=1</nowiki>''. | ||
- | <code bash> | + | The [[realtime:documentation:howto:tools:cpu-partitioning:taskset|taskset]] command can be used to make sure that other programs running on the system do not affect the latencies on the isolated CPU(s). For example, the program //top// can be started and pinned to CPU 1 using this command: |
- | # taskset -cp 1 4764 | + | |
- | </code> | + | |
- | + | ||
- | The //taskset// program can also be used to make sure that other programs running on the system do not affect the latencies on the isolated CPU(s). For example, the program //top// can be started and pinned to CPU 1 using this command: | + | |
<code bash> | <code bash> | ||
# taskset --cpu 1 top | # taskset --cpu 1 top | ||
</code> | </code> |