CyclicTest

CyclicTest

The very first decision on an embedded application development is the answer to "which OS should I use" question. If you are stuck on the OS performance on your specific hardware, you can make cyclic test or you can ask for cyclic test results from your hardware vendor/provider.

CyclicTest is as the name implies repeatedly, but accurately, measuring the difference between a thread's scheduler switch time and the time at which it actually switches. This measure provides statistics about the OS and hardware latencies. It can measure latencies in real-time systems caused by the hardware, the firmware, and the operating system.

The table below contains a description of the abbreviated labels in the results:

No alt text provided for this image

Below you can find an example output of Cyclictest results:

T: 0 (821)?P: 80?I: 200?C: 518063?Min: 1?Act: 1?Avg: 1?Max: 15

T: 1 (822)?P: 80?I: 200?C: 518050?Min: 1?Act: 2?Avg: 1?Max: 23

The results taken from a 2 CPU machine running an RT patched version of the 4.9 Linux kernel.

This test does exist in commonly used Linux, VxWorks, GreenHills, Yocto, etc. operating systems. One can also download Linux source code and build it for its OS.

Histograms

Many OS also provides a histogram option on the test results to see more detailed results. Some OS also provides a plot option to visualize the results.

?Analysis

The most important value in the results is the maximum detected latency. The value gives an idea of the worst case latency length in the hardware + operating system environment. These results should always be evaluated carefully and it should be run several times. The results with other hardware or operating system can be compared.

?Test results can also be used not only for situation comparison but also for future application performance. In this case, you should be careful. This might mislead your analysis, if you don't check the test sources. Because, for example, a hardware wakeup routine is being used in Linux CyclicTest and if you use nanosleep for task switch your application would have worse results than CyclicTest results.

Some links may help you for Linux;

https://wiki.linuxfoundation.org/realtime/documentation/howto/tools/cyclictest/limitations

https://www.osadl.org/Create-a-latency-plot-from-cyclictest-hi.bash-script-for-latency-plot.0.html?&no_cache=1&sword_list[0]=script

要查看或添加评论,请登录

Levent Karakaya的更多文章

  • C++ evolving to more scripting language with C++23 version

    C++ evolving to more scripting language with C++23 version

    Even the Python is getting more and more popular in our life, still it can’t be used for real-time applications. It is…

    1 条评论
  • Nesnelerin ?nterneti Sekt?r Analizi

    Nesnelerin ?nterneti Sekt?r Analizi

    ?nternet ge?ti?imiz 20 senede hayat?m?z? derinden etkiledi. Art?k internette yeni bir d?nem olan “Nesnelerin ?nterneti”…

  • Analysis of Internet of Things Industry

    Analysis of Internet of Things Industry

    Internet has dramatically changed our life in last twenty years. Now, the new age of Internet, “Internet of Things”…

社区洞察

其他会员也浏览了