← Documents Documentation/tools/rtla/rtla-timerlat-hist.rst GitHub 원문 ↗

Linux 6.18.37 · Kernel Tools

rtla-timerlat-hist: 운영체제 타이머 지연 히스토그램

timerlat IRQ와 스레드 지연을 CPU별 히스토그램으로 집계하고 SCHED_DEADLINE 예제의 버킷·요약 통계를 해석합니다.

Source pathDocumentation/tools/rtla/rtla-timerlat-hist.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

rtla-timerlat-hist.rst:1-113

timerlat IRQ와 스레드 지연을 CPU별 히스토그램으로 집계하고 SCHED_DEADLINE 예제의 버킷·요약 통계를 해석합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. |tool| replace:: timerlat hist
2
3 =====================
4 rtla-timerlat-hist
5 =====================
6 ------------------------------------------------
7 Histograms of the operating system timer latency
8 ------------------------------------------------
9
10 :Manual section: 1
11
12 SYNOPSIS
13 ========
14 **rtla timerlat hist** [*OPTIONS*] ...
15
16 DESCRIPTION
17 ===========
18
19 .. include:: common_timerlat_description.txt
20
21 The **rtla timerlat hist** displays a histogram of each tracer event
22 occurrence. This tool uses the periodic information, and the
23 **osnoise:** tracepoints are enabled when using the **-T** option.
24
25 OPTIONS
26 =======
27
28 .. include:: common_timerlat_options.txt
29
30 .. include:: common_hist_options.txt
31
32 .. include:: common_options.txt
33
34 .. include:: common_timerlat_aa.txt
35
36 EXAMPLE
37 =======
38 In the example below, **rtla timerlat hist** is set to run for *10* minutes,
39 in the cpus *0-4*, *skipping zero* only lines. Moreover, **rtla timerlat
40 hist** will change the priority of the *timerlat* threads to run under
41 *SCHED_DEADLINE* priority, with a *100us* runtime every *1ms* period. The
42 *1ms* period is also passed to the *timerlat* tracer. Auto-analysis is disabled
43 to reduce overhead ::
44
45 [root@alien ~]# timerlat hist -d 10m -c 0-4 -P d:100us:1ms -p 1000 --no-aa
46 # RTLA timerlat histogram
47 # Time unit is microseconds (us)
48 # Duration: 0 00:10:00
49 Index IRQ-000 Thr-000 IRQ-001 Thr-001 IRQ-002 Thr-002 IRQ-003 Thr-003 IRQ-004 Thr-004
50 0 276489 0 206089 0 466018 0 481102 0 205546 0
51 1 318327 35487 388149 30024 94531 48382 83082 71078 388026 55730
52 2 3282 122584 4019 126527 28231 109012 23311 89309 4568 98739
53 3 940 11815 837 9863 6209 16227 6895 17196 910 9780
54 4 444 17287 424 11574 2097 38443 2169 36736 462 13476
55 5 206 43291 255 25581 1223 101908 1304 101137 236 28913
56 6 132 101501 96 64584 635 213774 757 215471 99 73453
57 7 74 169347 65 124758 350 57466 441 53639 69 148573
58 8 53 85183 31 156751 229 9052 306 9026 39 139907
59 9 22 10387 12 42762 161 2554 225 2689 19 26192
60 10 13 1898 8 5770 114 1247 128 1405 13 3772
61 11 9 560 9 924 71 686 76 765 8 713
62 12 4 256 2 360 50 411 64 474 3 278
63 13 2 167 2 172 43 256 53 350 4 180
64 14 1 88 1 116 15 198 42 223 0 115
65 15 2 63 3 94 11 139 20 150 0 58
66 16 2 37 0 56 5 78 10 102 0 39
67 17 0 18 0 28 4 57 8 80 0 15
68 18 0 8 0 17 2 50 6 56 0 12
69 19 0 9 0 5 0 19 0 48 0 18
70 20 0 4 0 8 0 11 2 27 0 4
71 21 0 2 0 3 1 9 1 18 0 6
72 22 0 1 0 3 1 7 0 3 0 5
73 23 0 2 0 4 0 2 0 7 0 2
74 24 0 2 0 2 1 3 0 3 0 5
75 25 0 0 0 1 0 1 0 1 0 3
76 26 0 1 0 0 0 2 0 2 0 0
77 27 0 0 0 3 0 1 0 0 0 1
78 28 0 0 0 3 0 0 0 1 0 0
79 29 0 0 0 2 0 2 0 1 0 3
80 30 0 1 0 0 0 0 0 0 0 0
81 31 0 1 0 0 0 0 0 2 0 2
82 32 0 0 0 1 0 2 0 0 0 0
83 33 0 0 0 2 0 0 0 0 0 1
84 34 0 0 0 0 0 0 0 0 0 2
85 35 0 1 0 1 0 0 0 0 0 1
86 36 0 1 0 0 0 1 0 1 0 0
87 37 0 0 0 1 0 0 0 0 0 0
88 40 0 0 0 0 0 1 0 1 0 0
89 41 0 0 0 0 0 0 0 0 0 1
90 42 0 0 0 0 0 0 0 0 0 1
91 44 0 0 0 0 0 1 0 0 0 0
92 46 0 0 0 0 0 0 0 1 0 0
93 47 0 0 0 0 0 0 0 0 0 1
94 50 0 0 0 0 0 0 0 0 0 1
95 54 0 0 0 1 0 0 0 0 0 0
96 58 0 0 0 1 0 0 0 0 0 0
97 over: 0 0 0 0 0 0 0 0 0 0
98 count: 600002 600002 600002 600002 600002 600002 600002 600002 600002 600002
99 min: 0 1 0 1 0 1 0 1 0 1
100 avg: 0 5 0 5 0 4 0 4 0 5
101 max: 16 36 15 58 24 44 21 46 13 50
102
103 SEE ALSO
104 ========
105 **rtla-timerlat**\(1), **rtla-timerlat-top**\(1)
106
107 *timerlat* tracer documentation: <https://www.kernel.org/doc/html/latest/trace/timerlat-tracer.html>
108
109 AUTHOR
110 ======
111 Written by Daniel Bristot de Oliveira <[email protected]>
112
113 .. include:: common_appendix.txt
114

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

개요와 공통 옵션

1-35

`rtla timerlat hist [OPTIONS]`는 운영체제의 타이머 지연을 히스토그램으로 표시하는 매뉴얼 섹션 1 명령이다. `timerlat` 추적기에서 각 이벤트가 발생한 횟수를 지연 구간별로 집계하며, 주기 정보도 함께 사용한다.

`-T` 옵션을 사용하면 `osnoise:` tracepoint도 활성화되어 타이머 지연과 운영체제 간섭 정보를 함께 관찰할 수 있다. 상세 동작은 `common_timerlat_description.txt`, timerlat 공통 옵션은 `common_timerlat_options.txt`, 히스토그램 형식은 `common_hist_options.txt`, RTLA 공통 동작은 `common_options.txt`, 자동 분석은 `common_timerlat_aa.txt`에 정의되어 있다.

timerlat hist 구성
Include역할
common_timerlat_description.txttimerlat 추적기의 IRQ·스레드 지연 측정 원리
common_timerlat_options.txt주기, 중지 조건, 추적 저장 등 timerlat 옵션
common_hist_options.txt버킷 크기, 항목 수, 0 생략 등 히스토그램 옵션
common_options.txtCPU, 실행 시간, 우선순위, 이벤트와 동작
common_timerlat_aa.txt임계값 초과 시 자동 원인 분석

본문이 포함하는 공통 설명과 옵션 묶음이다.

히스토그램 데이터 경로
Periodic timertimerlat IRQ sampleIRQ-CPU bucket
IRQ wakeuptimerlat thread sampleThr-CPU bucket
Optional -Tosnoise: tracepointsinterference context

IRQ와 timerlat 스레드의 주기 지연을 CPU별 버킷으로 분리한다.

.. |tool| replace:: timerlat hist

=====================
rtla-timerlat-hist
=====================
------------------------------------------------
Histograms of the operating system timer latency
------------------------------------------------

:Manual section: 1

SYNOPSIS
========
**rtla timerlat hist** [*OPTIONS*] ...

DESCRIPTION
===========

.. include:: common_timerlat_description.txt

The **rtla timerlat hist** displays a histogram of each tracer event
occurrence. This tool uses the periodic information, and the
**osnoise:** tracepoints are enabled when using the **-T** option.

OPTIONS
=======

.. include:: common_timerlat_options.txt

.. include:: common_hist_options.txt

.. include:: common_options.txt

.. include:: common_timerlat_aa.txt

10분 SCHED_DEADLINE 측정과 출력 해석

36-102

예제는 CPU 0-4에서 10분 동안 실행하고 값이 0인 행을 생략한다. `timerlat` 스레드는 1ms 주기마다 100us 실행 시간을 받는 `SCHED_DEADLINE` 정책으로 변경되며, 같은 1ms 주기가 timerlat 추적기에도 전달된다. 자동 분석은 측정 오버헤드를 줄이기 위해 `--no-aa`로 끈다.

명령은 `timerlat hist -d 10m -c 0-4 -P d:100us:1ms -p 1000 --no-aa`이다. 시간 단위는 microsecond이고, `Index`는 지연 버킷 값이다. `IRQ-000`은 CPU 0의 IRQ 타이머 지연, `Thr-000`은 같은 CPU에서 깨어난 timerlat 스레드 지연의 발생 횟수이며 다른 CPU 열도 같은 구조를 따른다.

각 CPU는 IRQ와 스레드 표본을 각각 600,002개 기록한다. IRQ 지연은 대체로 0-1us에 몰리지만 스레드 지연은 주로 수 us 구간에 분포하고 긴 꼬리를 보인다. `min`, `avg`, `max` 행은 열별 최소·평균·최대 지연이며, 예제의 IRQ 최대는 CPU별 13-24us, 스레드 최대는 36-58us이다. `over`가 모두 0이므로 설정한 마지막 버킷을 넘은 표본은 없다.

예제 실행 조건
Option설정
-d 10m10분 동안 측정
-c 0-4CPU 0부터 4까지 관찰
-P d:100us:1msSCHED_DEADLINE, 실행 시간 100us, 주기 1ms
-p 1000timerlat 주기 1,000us
--no-aa자동 분석을 끄고 통계 오버헤드 절감

명령줄의 각 값이 측정에 주는 의미다.

히스토그램 열과 요약 행
표시의미
Indexmicrosecond 단위 지연 버킷
IRQ-NNNCPU NNN의 timerlat IRQ 지연 발생 횟수
Thr-NNNCPU NNN의 timerlat 스레드 지연 발생 횟수
over / count마지막 버킷 초과 표본 / 전체 표본
min / avg / max열별 최소·평균·최대 지연

숫자 출력의 좌표와 통계 의미를 분리해 읽는다.

표본 해석 순서
Compare IRQ vs ThrLocate dominant buckets
Check overConfirm histogram coverage
Read maxIdentify worst CPU and latency path

빈도 분포와 꼬리 지연을 함께 확인한다.

EXAMPLE
=======
In the example below, **rtla timerlat hist** is set to run for *10* minutes,
in the cpus *0-4*, *skipping zero* only lines. Moreover, **rtla timerlat
hist** will change the priority of the *timerlat* threads to run under
*SCHED_DEADLINE* priority, with a *100us* runtime every *1ms* period. The
*1ms* period is also passed to the *timerlat* tracer. Auto-analysis is disabled
to reduce overhead ::

  [root@alien ~]# timerlat hist -d 10m -c 0-4 -P d:100us:1ms -p 1000 --no-aa
  # RTLA timerlat histogram
  # Time unit is microseconds (us)
  # Duration:   0 00:10:00
  Index   IRQ-000   Thr-000   IRQ-001   Thr-001   IRQ-002   Thr-002   IRQ-003   Thr-003   IRQ-004   Thr-004
  0        276489         0    206089         0    466018         0    481102         0    205546         0
  1        318327     35487    388149     30024     94531     48382     83082     71078    388026     55730
  2          3282    122584      4019    126527     28231    109012     23311     89309      4568     98739
  3           940     11815       837      9863      6209     16227      6895     17196       910      9780
  4           444     17287       424     11574      2097     38443      2169     36736       462     13476
  5           206     43291       255     25581      1223    101908      1304    101137       236     28913
  6           132    101501        96     64584       635    213774       757    215471        99     73453
  7            74    169347        65    124758       350     57466       441     53639        69    148573
  8            53     85183        31    156751       229      9052       306      9026        39    139907
  9            22     10387        12     42762       161      2554       225      2689        19     26192
  10           13      1898         8      5770       114      1247       128      1405        13      3772
  11            9       560         9       924        71       686        76       765         8       713
  12            4       256         2       360        50       411        64       474         3       278
  13            2       167         2       172        43       256        53       350         4       180
  14            1        88         1       116        15       198        42       223         0       115
  15            2        63         3        94        11       139        20       150         0        58
  16            2        37         0        56         5        78        10       102         0        39
  17            0        18         0        28         4        57         8        80         0        15
  18            0         8         0        17         2        50         6        56         0        12
  19            0         9         0         5         0        19         0        48         0        18
  20            0         4         0         8         0        11         2        27         0         4
  21            0         2         0         3         1         9         1        18         0         6
  22            0         1         0         3         1         7         0         3         0         5
  23            0         2         0         4         0         2         0         7         0         2
  24            0         2         0         2         1         3         0         3         0         5
  25            0         0         0         1         0         1         0         1         0         3
  26            0         1         0         0         0         2         0         2         0         0
  27            0         0         0         3         0         1         0         0         0         1
  28            0         0         0         3         0         0         0         1         0         0
  29            0         0         0         2         0         2         0         1         0         3
  30            0         1         0         0         0         0         0         0         0         0
  31            0         1         0         0         0         0         0         2         0         2
  32            0         0         0         1         0         2         0         0         0         0
  33            0         0         0         2         0         0         0         0         0         1
  34            0         0         0         0         0         0         0         0         0         2
  35            0         1         0         1         0         0         0         0         0         1
  36            0         1         0         0         0         1         0         1         0         0
  37            0         0         0         1         0         0         0         0         0         0
  40            0         0         0         0         0         1         0         1         0         0
  41            0         0         0         0         0         0         0         0         0         1
  42            0         0         0         0         0         0         0         0         0         1
  44            0         0         0         0         0         1         0         0         0         0
  46            0         0         0         0         0         0         0         1         0         0
  47            0         0         0         0         0         0         0         0         0         1
  50            0         0         0         0         0         0         0         0         0         1
  54            0         0         0         1         0         0         0         0         0         0
  58            0         0         0         1         0         0         0         0         0         0
  over:         0         0         0         0         0         0         0         0         0         0
  count:   600002    600002    600002    600002    600002    600002    600002    600002    600002    600002
  min:          0         1         0         1         0         1         0         1         0         1
  avg:          0         5         0         5         0         4         0         4         0         5
  max:         16        36        15        58        24        44        21        46        13        50

관련 문서와 작성 정보

103-113

관련 매뉴얼은 timerlat 명령 진입점인 `rtla-timerlat(1)`과 요약 화면인 `rtla-timerlat-top(1)`이다. 추적기 자체의 세부 동작은 kernel.org의 timerlat tracer 문서를 참조한다.

이 문서는 Daniel Bristot de Oliveira가 작성했으며, 마지막 `common_appendix.txt` 포함문은 RTLA 공통 종료 상태, 오류 보고, 라이선스와 저작권 정보를 제공한다.

관련 자료
문서용도
rtla-timerlat(1)timerlat 모드 선택과 공통 진입점
rtla-timerlat-top(1)CPU별 현재·최소·평균·최대 요약과 자동 분석
timerlat tracer documentation커널 추적기의 동작과 이벤트 정의

히스토그램 결과에서 다음 분석 단계로 이동할 때 사용한다.

SEE ALSO
========
**rtla-timerlat**\(1), **rtla-timerlat-top**\(1)

*timerlat* tracer documentation: <https://www.kernel.org/doc/html/latest/trace/timerlat-tracer.html>

AUTHOR
======
Written by Daniel Bristot de Oliveira <[email protected]>

.. include:: common_appendix.txt