RTLA-HWNOISE(1)
π RTLA-HWNOISE π
okay bestie, welcome to rtla-hwnoise from the General Commands Manual β this is the page for detecting and quantifying hardware-related noise, and we're gonna get into it. π¦
β¨ NAME β¨
rtla-hwnoise β Detect and quantify hardware-related noise
πΈ SYNOPSIS πΈ
rtla hwnoise [OPTIONS]
π DESCRIPTION π
So like, rtla hwnoise grabs the periodic summary from the osnoise tracer while it's running with interrupts disabled. And the way that works is: once interrupts are off, thread scheduling gets turned off too as a consequence, so literally the only things that can still interrupt you are non-maskable interrupts and hardware-related noise. That's it. That's the whole vibe. π
The tool also lets you configure the osnoise tracer, and it collects the tracer output for you. Two-for-one, no cap. β¨
π OPTIONS π
-a,--auto usβ turns on automatic trace mode. This mode just sets a bunch of commonly used options for you while you're debugging the system. It's equivalent to using-s us -T 1 -t. slay, less typing. π-p,--period usβ sets the osnoise tracer period, in microseconds.-r,--runtime usβ sets the osnoise tracer runtime, in microseconds.-s,--stop usβ stops the trace if a single sample goes higher than the argument (in microseconds). And if-Tis set, it'll also save the trace to the output. π«Ά-S,--stop-total usβ stops the trace if the total sample goes higher than the argument (in microseconds). If-Tis set, it also saves the trace to the output.-T,--threshold usβ the minimum delta between two time reads that counts as noise. Default threshold is5 us.-t,--trace [file]β saves the stopped trace to[file|osnoise_trace.txt].-q,--quietβ only prints a summary at the end of the session. minimal. iconic. π-c,--cpus cpu-listβ tells the osnoise tracer to run the sample threads on thecpu-list.-H,--house-keeping cpu-listβ runs rtla's control threads only on the givencpu-list.-d,--duration time[s|m|h|d]β sets how long the session runs for.-D,--debugβ prints debug info.-e,--event sys:eventβ enables an event in the trace (-t) session. The argument can be a specific event, e.g.-e sched:sched_switch, or all events of a system group, e.g.-e sched. Multiple-eare allowed. Heads up: it's only active when-tor-aare set. β--filter <filter>β filters the previous-e sys:eventevent with<filter>. For more info about event filtering, seehttps://www.kernel.org/doc/html/latest/trace/events.html#event-filtering.--trigger <trigger>β enables a trace event trigger to the previous-e sys:event. If thehist:trigger is activated, the output histogram gets automatically saved to a file namedsystem_event_hist.txt. For example, this command:
rtla <command> <mode> -t -e osnoise:irq_noise
--trigger="hist:key=desc,duration/1000:sort=desc,duration/1000:vals=hitcount"
will automatically save the content of the histogram associated to the osnoise:irq_noise event in osnoise_irq_noise_hist.txt.
For more info about event triggers, see https://www.kernel.org/doc/html/latest/trace/events.html#event-triggers.
-P,--priority o:prio|r:prio|f:prio|d:runtime:periodβ sets scheduling parameters for the osnoise tracer threads. The formats for setting the priority are:o:prioβ useSCHED_OTHERwithprio;r:prioβ useSCHED_RRwithprio;f:prioβ useSCHED_FIFOwithprio;d:runtime[us|ms|s]:period[us|ms|s]β useSCHED_DEADLINEwith runtime and period in nanoseconds.
-C,--cgroup[=cgroup]β sets a cgroup for the tracer's threads. If you pass-Cwith no arguments, the tracer's thread inherits rtla's cgroup. Otherwise, the threads get placed on the cgroup you passed to the option.--warm-up sβ after starting the workload, let it run forsseconds before you start collecting data, so the system can warm up. Any statistical data generated during warm-up is discarded. π§--trace-buffer-size kBβ sets the per-cpu trace buffer size, in kB, for the tracing output.-h,--helpβ prints the help menu. π«Ά
π₯ EXAMPLE π₯
In the example below, the rtla hwnoise tool is set to run on CPUs 1-7, on a system with 8 cores / 16 threads and hyper-threading enabled. π
The tool is set to detect any noise higher than one microsecond, run for ten minutes, and display a summary of the report at the end of the session:
# rtla hwnoise -c 1-7 -T 1 -d 10m -q
Hardware-related Noise
duration: 0 00:10:00 | time is in us
CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI
1 #599 599000000 138 99.99997 3 3 4 74
2 #599 599000000 85 99.99998 3 3 4 75
3 #599 599000000 86 99.99998 4 3 6 75
4 #599 599000000 81 99.99998 4 4 2 75
5 #599 599000000 85 99.99998 2 2 2 75
6 #599 599000000 76 99.99998 2 2 0 75
7 #599 599000000 77 99.99998 3 3 0 75
The first column shows the CPU, and the second column shows how many Periods the tool ran during the session. Runtime is the time the tool effectively runs on the CPU. The Noise column is the sum of all the noise the tool observed, and % CPU Aval is the relationship between the Runtime and the Noise. β¨
The Max Noise column is the maximum hardware noise the tool detected in a single period, and Max Single is the maximum single noise seen.
The HW and NMI columns show the total number of hardware and NMI noise occurrences observed by the tool. π
For example, CPU 3 ran 599 periods of 1 second Runtime. The CPU received 86 us of noise during the entire execution, leaving 99.99997 % of CPU time for the application. In the worst single period, the CPU caused 4 us of noise to the application, but it was certainly caused by more than one single noise, since the Max Single noise was 3 us. The CPU has HW noise, at a rate of six occurrences/ten minutes. The CPU also has NMIs, at a higher frequency: around seven per second.
The tool should report 0 hardware-related noise in the ideal situation. For example, by disabling hyper-threading to remove the hardware noise, and disabling the TSC watchdog to remove the NMI (you can identify this using the tracing options of rtla hwnoise), it was possible to reach the ideal situation on the same hardware:
# rtla hwnoise -c 1-7 -T 1 -d 10m -q
Hardware-related Noise
duration: 0 00:10:00 | time is in us
CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI
1 #599 599000000 0 100.00000 0 0 0 0
2 #599 599000000 0 100.00000 0 0 0 0
3 #599 599000000 0 100.00000 0 0 0 0
4 #599 599000000 0 100.00000 0 0 0 0
5 #599 599000000 0 100.00000 0 0 0 0
6 #599 599000000 0 100.00000 0 0 0 0
7 #599 599000000 0 100.00000 0 0 0 0
π SEE ALSO π
rtla-osnoise(1)- Osnoise tracer documentation:
https://www.kernel.org/doc/html/latest/trace/osnoise-tracer.html
π AUTHOR π
Written by Daniel Bristot de Oliveira <bristot@kernel.org>
π REPORTING BUGS π
Report bugs to <linux-kernel@vger.kernel.org> and <linux-trace-devel@vger.kernel.org>
π LICENSE π
rtla is Free Software licensed under the GNU GPLv2.
π COPYING π
Copyright (C) 2021 Red Hat, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL).
and that's a wrap bestie π this was RTLA-HWNOISE(1) from the General Commands Manual β go forth and find literally zero hardware noise, you absolute icon. πβ¨π¦
π¦ where this page comes from
- debian trixie: rtla 6.12.107-1 Β· GPL-2.0-only
- debian trixie: rtla 6.12.111-1
- debian trixie: rtla 6.12.113-1 Β· GPL-2.0-only
- debian trixie: rtla 6.12.115-2 Β· GPL-2.0-only
- π the page's license: GPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms