요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
===================================
Data Access Monitoring Results Stat
===================================
Data Access Monitoring Results Stat (DAMON_STAT) is a static kernel module that
is aimed to be used for simple access pattern monitoring. It monitors accesses
on the system's entire physical memory using DAMON, and provides simplified
access monitoring results statistics, namely idle time percentiles and
estimated memory bandwidth.
Monitoring Accuracy and Overhead
================================
DAMON_STAT uses monitoring intervals :ref:`auto-tuning
<damon_design_monitoring_intervals_autotuning>` to make its accuracy high and
overhead minimum. It auto-tunes the intervals aiming 4 % of observable access
events to be captured in each snapshot, while limiting the resulting sampling
events to be 5 milliseconds in minimum and 10 seconds in maximum. On a few
production server systems, it resulted in consuming only 0.x % single CPU time,
while capturing reasonable quality of access patterns.
Interface: Module Parameters
============================
To use this feature, you should first ensure your system is running on a kernel
that is built with ``CONFIG_DAMON_STAT=y``. The feature can be enabled by
default at build time, by setting ``CONFIG_DAMON_STAT_ENABLED_DEFAULT`` true.
To let sysadmins enable or disable it at boot and/or runtime, and read the
monitoring results, DAMON_STAT provides module parameters. Following
sections are descriptions of the parameters.
enabled
-------
Enable or disable DAMON_STAT.
You can enable DAMON_STAT by setting the value of this parameter as ``Y``.
Setting it as ``N`` disables DAMON_STAT. The default value is set by
``CONFIG_DAMON_STAT_ENABLED_DEFAULT`` build config option.
estimated_memory_bandwidth
--------------------------
Estimated memory bandwidth consumption (bytes per second) of the system.
DAMON_STAT reads observed access events on the current DAMON results snapshot
and converts it to memory bandwidth consumption estimation in bytes per second.
The resulting metric is exposed to user via this read-only parameter. Because
DAMON uses sampling, this is only an estimation of the access intensity rather
than accurate memory bandwidth.
memory_idle_ms_percentiles
--------------------------
Per-byte idle time (milliseconds) percentiles of the system.
DAMON_STAT calculates how long each byte of the memory was not accessed until
now (idle time), based on the current DAMON results snapshot. If DAMON found a
region of access frequency (nr_accesses) larger than zero, every byte of the
region gets zero idle time. If a region has zero access frequency
(nr_accesses), how long the region was keeping the zero access frequency (age)
becomes the idle time of every byte of the region. Then, DAMON_STAT exposes
the percentiles of the idle time values via this read-only parameter. Reading
the parameter returns 101 idle time values in milliseconds, separated by comma.
Each value represents 0-th, 1st, 2nd, 3rd, ..., 99th and 100th percentile idle
times.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Data access monitoring 결과 통계
1-12이 문서는 GPL-2.0 라이선스를 따릅니다. Data Access Monitoring Results Stat(`DAMON_STAT`)는 간단한 접근 패턴 관측을 위한 정적 kernel module입니다. DAMON으로 시스템 전체 physical memory의 접근을 관측하고, idle time percentiles와 estimated memory bandwidth라는 단순화된 통계를 제공합니다.
관측 정확도와 오버헤드
13-23DAMON_STAT는 monitoring interval auto-tuning(`damon_design_monitoring_intervals_autotuning`)으로 정확도를 높이고 오버헤드를 줄입니다. snapshot마다 관측 가능한 access event의 4 %를 포착하는 것을 목표로 interval을 자동 조정하되, sampling event 간격은 최소 5 milliseconds(5 ms)와 최대 10 seconds(10 s) 사이로 제한합니다.
몇몇 production server 시스템에서는 합리적인 품질의 access pattern을 포착하면서 단일 CPU 시간의 0.x %만 소비했습니다.
Module parameter interface
24-34이 기능을 쓰려면 `CONFIG_DAMON_STAT=y`로 빌드한 kernel을 실행해야 합니다. `CONFIG_DAMON_STAT_ENABLED_DEFAULT`를 true로 설정하면 build 시점에 기본 활성화할 수 있습니다.
관리자가 boot 또는 runtime에 기능을 켜고 끄며 관측 결과를 읽을 수 있도록 DAMON_STAT는 module parameter를 제공합니다.
enabled
35-43`enabled=Y`는 DAMON_STAT를 활성화하고 `enabled=N`은 비활성화합니다. 기본값은 `CONFIG_DAMON_STAT_ENABLED_DEFAULT` build config option으로 정합니다.
estimated_memory_bandwidth
44-54`estimated_memory_bandwidth`는 시스템이 소비하는 memory bandwidth를 bytes per second 단위로 추정한 read-only parameter입니다. DAMON_STAT는 현재 DAMON 결과 snapshot에서 관측한 access event를 읽어 memory bandwidth 소비량으로 환산합니다.
DAMON은 sampling을 사용하므로 이 값은 정확한 memory bandwidth가 아니라 access intensity의 추정치입니다.
memory_idle_ms_percentiles
55-69`memory_idle_ms_percentiles`는 시스템 memory 각 byte의 idle time을 milliseconds 단위 percentile로 제공하는 read-only parameter입니다. DAMON_STAT는 현재 snapshot을 바탕으로 각 byte가 지금까지 얼마나 오래 접근되지 않았는지 계산합니다.
DAMON이 access frequency(`nr_accesses`)가 0보다 큰 region을 찾으면 그 region의 모든 byte에 idle time 0을 부여합니다. `nr_accesses`가 0인 region은 그 상태를 유지한 기간(`age`)을 모든 byte의 idle time으로 사용합니다.
parameter를 읽으면 comma로 구분된 101개의 idle-time 값이 반환됩니다. 각 값은 차례로 원문 표기의 0-th, 1st, 2nd, 3rd, ..., 99th, 100th percentile을 뜻합니다.
DAMON_STAT 운용 지도
stat.rst:1-69DAMON_STAT는 자동 조정된 monitoring interval로 전체 physical memory를 관측하고, 접근 강도 추정치와 idle-time 분포를 간단한 module parameter로 노출합니다.