mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 00:48:01 +01:00
61 lines
3.7 KiB
Plaintext
61 lines
3.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * scalability_and_performance/cnf-performing-platform-verification-latency-tests.adoc
|
|
|
|
:_mod-docs-content-type: CONCEPT
|
|
[id="cnf-measuring-latency_{context}"]
|
|
= Measuring latency
|
|
|
|
The `cnf-tests` image uses three tools to measure the latency of the system:
|
|
|
|
* `hwlatdetect`
|
|
* `cyclictest`
|
|
* `oslat`
|
|
|
|
Each tool has a specific use. Use the tools in sequence to achieve reliable test results.
|
|
|
|
hwlatdetect:: Measures the baseline that the bare-metal hardware can achieve. Before proceeding with the next latency test, ensure that the latency reported by `hwlatdetect` meets the required threshold because you cannot fix hardware latency spikes by operating system tuning.
|
|
|
|
cyclictest:: Verifies the real-time kernel scheduler latency after `hwlatdetect` passes validation. The `cyclictest` tool schedules a repeated timer and measures the difference between the desired and the actual trigger times. The difference can uncover basic issues with the tuning caused by interrupts or process priorities. The tool must run on a real-time kernel.
|
|
|
|
oslat:: Behaves similarly to a CPU-intensive DPDK application and measures all the interruptions and disruptions to the busy loop that simulates CPU heavy data processing.
|
|
|
|
The tests introduce the following environment variables:
|
|
|
|
.Latency test environment variables
|
|
[cols="1,3a", options="header"]
|
|
|====
|
|
|Environment variables
|
|
|Description
|
|
|
|
|`LATENCY_TEST_DELAY`
|
|
|Specifies the amount of time in seconds after which the test starts running. You can use the variable to allow the CPU manager reconcile loop to update the default CPU pool. The default value is 0.
|
|
|
|
|`LATENCY_TEST_CPUS`
|
|
|Specifies the number of CPUs that the pod running the latency tests uses. If you do not set the variable, the default configuration includes all isolated CPUs.
|
|
|
|
|`LATENCY_TEST_RUNTIME`
|
|
|Specifies the amount of time in seconds that the latency test must run. The default value is 300 seconds.
|
|
|
|
[NOTE]
|
|
====
|
|
To prevent the Ginkgo 2.0 test suite from timing out before the latency tests complete, set the `-ginkgo.timeout` flag to a value greater than `LATENCY_TEST_RUNTIME` + 2 minutes. If you also set a `LATENCY_TEST_DELAY` value then you must set `-ginkgo.timeout` to a value greater than `LATENCY_TEST_RUNTIME` + `LATENCY_TEST_DELAY` + 2 minutes. The default timeout value for the Ginkgo 2.0 test suite is 1 hour.
|
|
====
|
|
|
|
|`HWLATDETECT_MAXIMUM_LATENCY`
|
|
|Specifies the maximum acceptable hardware latency in microseconds for the workload and operating system. If you do not set the value of `HWLATDETECT_MAXIMUM_LATENCY` or `MAXIMUM_LATENCY`, the tool compares the default expected threshold (20μs) and the actual maximum latency in the tool itself. Then, the test fails or succeeds accordingly.
|
|
|
|
|`CYCLICTEST_MAXIMUM_LATENCY`
|
|
|Specifies the maximum latency in microseconds that all threads expect before waking up during the `cyclictest` run. If you do not set the value of `CYCLICTEST_MAXIMUM_LATENCY` or `MAXIMUM_LATENCY`, the tool skips the comparison of the expected and the actual maximum latency.
|
|
|
|
|`OSLAT_MAXIMUM_LATENCY`
|
|
|Specifies the maximum acceptable latency in microseconds for the `oslat` test results. If you do not set the value of `OSLAT_MAXIMUM_LATENCY` or `MAXIMUM_LATENCY`, the tool skips the comparison of the expected and the actual maximum latency.
|
|
|
|
|`MAXIMUM_LATENCY`
|
|
|Unified variable that specifies the maximum acceptable latency in microseconds. Applicable for all available latency tools.
|
|
|====
|
|
|
|
[NOTE]
|
|
====
|
|
Variables that are specific to a latency tool take precedence over unified variables. For example, if `OSLAT_MAXIMUM_LATENCY` is set to 30 microseconds and `MAXIMUM_LATENCY` is set to 10 microseconds, the `oslat` test will run with maximum acceptable latency of 30 microseconds.
|
|
==== |