7.2. 解释硬件和固件延迟测试结果
硬件延迟检测器(hwlatdetect)使用 tracer 机制来检测硬件架构或 BIOS/EFI 固件带来的延迟。通过检查 hwlatdetect 测量的延迟,您可以确定潜在的硬件是否适合支持 RHEL for Real Time 内核。
例子
示例结果表示系统经过调优,以最大程度降低固件系统中断。在这种情况下,
hwlatdetect的输出类似如下:# hwlatdetect --duration=60s hwlatdetect: test duration 60 seconds detector: tracer parameters: Latency threshold: 10us Sample window: 1000000us Sample width: 500000us Non-sampling period: 500000us Output File: None Starting test test finished Max Latency: Below threshold Samples recorded: 0 Samples exceeding threshold: 0示例结果代表了一个无法调优的系统,以便最大程度降低固件的系统中断。在这种情况下,
hwlatdetect的输出类似如下:# hwlatdetect --duration=10s hwlatdetect: test duration 10 seconds detector: tracer parameters: Latency threshold: 10us Sample window: 1000000us Sample width: 500000us Non-sampling period: 500000us Output File: None Starting test test finished Max Latency: 18us Samples recorded: 10 Samples exceeding threshold: 10 SMIs during run: 0 ts: 1519674281.220664736, inner:17, outer:15 ts: 1519674282.721666674, inner:18, outer:17 ts: 1519674283.722667966, inner:16, outer:17 ts: 1519674284.723669259, inner:17, outer:18 ts: 1519674285.724670551, inner:16, outer:17 ts: 1519674286.725671843, inner:17, outer:17 ts: 1519674287.726673136, inner:17, outer:16 ts: 1519674288.727674428, inner:16, outer:18 ts: 1519674289.728675721, inner:17, outer:17 ts: 1519674290.729677013, inner:18, outer:17----输出显示,在连续读取
系统时钟源的过程中有 10 个延迟,在 15-18 us 范围内显示有 10 个延迟。注意之前的版本使用内核模块而不是
ftracetracer。
了解结果
有关测试方法、参数和结果的信息可帮助您了解延迟参数和 hwlatdetect 工具检测到的延迟值。
测试方法、参数和结果的表列出了 hwlatdetect 工具检测到的参数和延迟值。
| 参数 | value | 描述 |
|---|---|---|
|
|
| 测试的持续时间(以秒为单位) |
|
|
|
运行 |
|
| ||
|
|
| 允许的最大延迟 |
|
|
| 1 秒 |
|
|
| 0.05 秒 |
|
|
| 0.05 秒 |
|
|
| 保存输出的文件。 |
|
| ||
|
|
|
测试期间超过 |
|
|
| 测试记录的样本数量。 |
|
|
|
由延迟超过 |
|
|
| 测试运行期间发生的系统管理中断(SMI)的数量。 |
hwlatdetect 工具为 inner 和 outer 输出的值是最大延迟值。它们是连续读取当前系统时钟源(通常为 TSC 或 TSC 寄存器,但可能是 HPET 或 ACPI 电源管理时钟)之间的增量,以及硬件固件组合引入连续读取之间的任何延迟。
找到合适的 hardware-firmware 组合后,下一步是在负载下测试系统的实时性能。