Cyclictest

The Cyclictest starts several tasks, which are called periodically. The effective period duration is measured and the jitter is displayed.

A presentation from the „Embedded Linux Conference 2013“ offers a good introduction to the use of Cyclictest. The presentation can be watched on Youtube. The PPT slides can be downloaded here.

Installation

git clone git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
sudo apt-get install build-essential libnuma-dev
cd rt-tests
git checkout -b tmp tags/v1.0
make all

Cross compile

TODO

To install the Cyclictest on a MPC follow this guid.

Quickstart

sudo ./cyclictest -p 80 -t5

5 threads are created, which are called periodically. After a few minutes, the maximum latency can be roughly estimated.

Extensive Measurement

In order to benchmark the realtime performance of a system well appropriately, a measurement duration of at least 24h under real or artificial load is recommended. The frequency of different latencies can be counted and displayed in a histogram.

Start Benchmark

sudo ./cyclictest -Sp80 -l86400000 -i1000 -h1000 -q > histogramm.log
Histogramm of a x86 system with RT Kernel. Measurement time = 1h
-Sp80 S = alle cores; p = priority-80 (Realtime)
-l86400000 86'400'000 cycles
-i1000 1000us per cycle
-h1000 Latencies up to 1000us will be stored for the histogram
-q quiet
Measurement time: l86400000*i1000 = 86400e6us = 86400s = 24h

All measurements longer than -h1000 do not appear in the histogram. These measurements are counted and displayed at the end of the log file as Histogram Overflows:. The Maximum Latency is displayed as Max Latencies:.

To plot the histogram this Matlab script plotHistogramm.m can be used.

The homepage of OSADL explains well how such a histogram can be interpreted.