This is a draft document that was built and uploaded automatically. It may document beta software and be incomplete or even incorrect. Use this document at your own risk.

Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
SUSE Linux Real Time Hardware Testing and Latency
SUSE Linux 16.1

SUSE Linux Real Time Hardware Testing and Latency

Publication Date: 16 Oct 2026

SUSE Linux 16.1 provides integrated real-time capabilities. To confirm that a server can meet real-time deadlines, measure its latency with the hardware latency detector and with cyclictest. The hardware latency detector exposes delays caused by firmware and hardware. The cyclictest tool adds the scheduling overhead of the operating system to the measurement. This article explains how to prepare the platform, run both tools on SUSE Linux 16.1 and interpret the results.

1 Understanding real-time hardware latency testing

Real-time hardware capabilities require predictable response times within a specified margin. This section explains fundamental real-time concepts and the sources of platform interference. It details how to distinguish hardware-induced delays from the scheduling overhead of the operating system using latency tools. Understanding these concepts helps you isolate low-level firmware bottlenecks before deploying production workloads.

You must distinguish between hardware-induced and operating-system-induced latencies. The hardware latency detector runs independently of the Linux kernel scheduler. It polls the CPU Time Stamp Counter (TSC) to find gaps. These gaps indicate when the hardware or firmware disturbed the CPU.

Conversely, cyclictest measures operating system latencies. It runs closer to a real computing situation by including operating system overhead in its results.

cyclictest measures a superset of what the hardware latency detector measures, plus the scheduling and interrupt handling overhead added by the operating system. On a correctly tuned system, expect cyclictest to report somewhat higher latencies than the hardware latency detector, because it includes this additional software overhead. If cyclictest reports latencies that are much higher, for example, hundreds of microseconds or more where the hardware latency detector reports only a few microseconds, this points to a source of latency in the operating system rather than in the hardware. In that case, contact SUSE for support.

2 Installing the real-time kernel

Before testing latencies, you must activate the real-time capabilities on your system. The kernel-rt package provides the preemption capabilities necessary for real-time operations.

Procedure 1: Installing and activating the kernel-rt package
  1. Install the real-time kernel package:

    > sudo zypper install kernel-rt
  2. Reboot your system.

  3. Select the kernel-rt kernel from the boot menu to activate the real-time capabilities.

3 Preparing the hardware platform

Real-time applications require a hardware foundation configured for minimal latency. This section describes how to configure server BIOS and firmware settings. These adjustments eliminate low-level platform interference before you begin latency testing.

Before you start measuring hardware or operating system latencies, you must optimize your machine settings:

Procedure 2: Optimizing server firmware settings
  1. Access your server BIOS or firmware settings.

  2. Disable power-management features that introduce variable latency, since these are common sources of SMIs and scheduling jitter. Menu labels vary by vendor, but look for and disable:

    • C-states (CPU idle power states)

    • P-states and frequency scaling (SpeedStep, Cool'n'Quiet or similar)

    • Turbo Boost or turbo core

    • Hyper-threading or SMT

    • Any other SMI-generating power management feature

  3. Reduce memory patrol scrubbing to its lowest available rate or disable it, since scrubbing cycles can introduce firmware-level latency spikes.

4 Evaluating hardware latencies with the hardware latency detector

The hardware latency detector (hwlatdetect) drives the built-in hwlat ftrace tracer of the kernel through tracefs, and identifies system delays introduced directly by platform firmware and hardware, independent of the operating system scheduler.

Before you run this test, make sure that the platform firmware is optimized as described in Section 3, “Preparing the hardware platform”, that the system is running the kernel-rt kernel installed in Section 2, “Installing the real-time kernel”, and that you are logged in as root or can run commands with sudo.

Procedure 3: Executing hwlatdetect
  1. Start the detector with a specified threshold:

    > sudo hwlatdetect --threshold=10

    This command monitors system management interrupts (SMIs) with a minimum latency threshold of 10 microseconds.

  2. Check the measured latencies.

    A run against a tuned, real-time-capable system produces output similar to the following:

    > sudo hwlatdetect --threshold=10 --duration=120
    hwlatdetect:  test duration 120 seconds
    detector: hwlat
    parameters:
    Latency threshold: 10us
    Sample window:     1000000us
    Sample width:      500000us
    Non-sampling period:  500000us
    Output File:       None
                    
    Starting test
    test finished
    Max Latency: 3us
    Samples recorded: 0
    Samples exceeding threshold: 0

    Max Latency reports the largest gap observed between the CPU Time Stamp Counter reads, in microseconds. Samples exceeding threshold counts how many of those gaps were larger than the value you passed with --threshold.

    A hardware platform suitable for real-time workloads should report Samples exceeding threshold: 0 over the full test duration, with Max Latency below the threshold you set. If Samples exceeding threshold is greater than zero, or Max Latency approaches or exceeds your threshold, the platform firmware or hardware is introducing delays your application deadline cannot tolerate. Treat this as a hardware or firmware-level failure regardless of what cyclictest reports later, and use a different hardware platform.

5 Measuring latencies with cyclictest

This section describes how to measure operating system latencies using the cyclictest tool. It guides you through installing the test suite on SUSE Linux 16.1. It also details running the benchmark to generate latency histogram files.

The cyclictest command is part of the real-time kernel test suite, contained in the rt-tests RPM package distributed as part of SUSE Linux 16.1.

Before you run this test, make sure your hardware is configured as described in Section 3, “Preparing the hardware platform”, and that you are logged in as root or can run commands with sudo.

Procedure 4: Running the cyclictest tool
  1. Install the rt-tests package if it is not already present:

    > sudo zypper install rt-tests
  2. Determine your test parameters from the cyclictest options listed in Section 6, “hwlatdetect and cyclictest command-line options”.

  3. Start cyclictest. For example, to run 1000 cycles with a latency histogram tracked up to 1000 microseconds, execute:

    > sudo cyclictest --loops=1000 --histogram=1000

    By default, cyclictest writes the histogram data to standard output after the run. To save it to a file for later analysis instead, redirect the output:

    > sudo cyclictest --loops=1000 --histogram=1000 > histogram
  4. Analyze the recorded minimal, actual, average and maximum latencies.

    A typical result on a multi-core system looks like:

    cyclictest --loops=1000 --histogram=1000
    policy: fifo: loadavg: 0.12 0.08 0.03 1/342 4821
                
    T: 0 ( 4822) P:99 I:1000 C:  1000 Min:      4 Act:    6 Avg:    7 Max:      31
    T: 1 ( 4823) P:99 I:1500 C:   667 Min:      3 Act:    5 Avg:    6 Max:      24

    Each line reports one measurement thread (T:), its process ID, scheduling priority (P:) and interval in microseconds (I:). Four values matter for evaluation: Min, Act (the latency of the most recent cycle), Avg and Max. All four are reported in microseconds by default. Use --nsec if you need nanosecond resolution.

    Max is the value to compare against the deadline of your application: it is the single worst-case scheduling latency observed during the run. As a rough order of magnitude, well-tuned real-time systems generally report Max values in the tens of microseconds. Results climbing into the hundreds of microseconds suggest an unresolved source of interference, and results in the thousands of microseconds indicate the system is not meeting real-time deadlines at all. These figures vary by hardware, workload and kernel configuration. Compare this Max value against the Max Latency reported by hwlatdetect in Section 4, “Evaluating hardware latencies with the hardware latency detector”. Per Section 1, “Understanding real-time hardware latency testing”, cyclictest is expected to report somewhat higher latencies, since it includes scheduling and interrupt handling overhead that hwlatdetect does not measure.

    The Max value from cyclictest includes hardware latency plus kernel scheduling overhead. The Max Latency value from hwlatdetect does not. So cyclictest is expected to report a higher number. The two tools are not measuring the same thing.

    What matters is the size of the gap. A small gap is normal software overhead. A gap of orders of magnitude points to a real problem in the operating system, not the hardware.

6 hwlatdetect and cyclictest command-line options

Real-time latency measurement tools support multiple runtime parameters. This section provides a structured reference table of the command-line options for hwlatdetect and cyclictest. These parameters help you customize sampling duration, sample windows and thread execution.

The hwlatdetect and cyclictest commands support several configuration options to modify their behavior.

Table 1: hwlatdetect options
OptionDescription
--duration Run the detector logic for the specified duration.
--threshold Specify the TSC gap used to detect an SMI.
--hardlimit Define the failure limit.
--window Specify the size of the sample window.
--width Specify the sampling duration within the window.
--report Specify the output file name of the detector report.
--debug Turn on debug output.
--quiet Turn off information output.
--watch Print sample data to standard output as it arrives.
Table 2: cyclictest options
OptionDescription
--nsec Use nanoseconds instead of microseconds for the displayed latency values.
--loops Limit the number of test cycles. By default, the tool runs forever.
--threads Specify the number of threads. Without a number, cyclictest runs on all available processors.
--affinity Pin test threads to the processors with the same thread number.
--histogram Create a histogram with the latency values up to the maximum tracking time.

7 Next steps

Completing latency benchmarks is only the first part of system preparation. This section details essential post-testing tasks to optimize your real-time server. It guides you to document your system configuration and perform regular regression testing.

Latency testing is only one step in preparing your system. After completing your measurements, analyze the results and tune your system.

Document your test environment thoroughly. Record the following:

  • server model

  • processor details

  • firmware versions

  • enabled features

  • operating system version

  • running kernel

  • tool options

  • workloads

Repeat your latency testing after making significant system changes. Regular retesting helps identify performance regressions before they affect production workloads.

8 For more information

This section lists external resources and technical documentation for real-time latency analysis. It guides you to relevant command man pages and kernel source documentation. These materials provide deeper insights into platform tuning.

To learn more about real-time latency testing and analysis, refer to the following resources: