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 个延迟。

    注意

    之前的版本使用内核模块而不是 ftrace tracer。

了解结果

有关测试方法、参数和结果的信息可帮助您了解延迟参数和 hwlatdetect 工具检测到的延迟值。

测试方法、参数和结果的表列出了 hwlatdetect 工具检测到的参数和延迟值。

Expand
表 7.1. 测试方法、参数和结果
参数value描述

测试持续时间

10 秒

测试的持续时间(以秒为单位)

Detector

tracer

运行 检测 器线程的实用程序

参数

  

延迟阈值

10us

允许的最大延迟

示例窗口

1000000us

1 秒

宽度示例

500000us

0.05 秒

非 Sampling 周期

500000us

0.05 秒

输出文件

None

保存输出的文件。

结果

  

最大延迟数

18us

测试期间超过 Latency 阈值的最大延迟。如果没有超过 Latency 阈值,则报告会显示 以下阈值

记录的示例

10

测试记录的样本数量。

示例超过阈值

10

由延迟超过 Latency 阈值 的测试记录的示例数量。

运行过程中的 SMI

0

测试运行期间发生的系统管理中断(SMI)的数量。

注意

hwlatdetect 工具为 inner 和 outer 输出的值是最大延迟值。它们是连续读取当前系统时钟源(通常为 TSC 或 TSC 寄存器,但可能是 HPET 或 ACPI 电源管理时钟)之间的增量,以及硬件固件组合引入连续读取之间的任何延迟。

找到合适的 hardware-firmware 组合后,下一步是在负载下测试系统的实时性能。

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部