TMAegis베타
cockroachdb 관련 규칙 더 보기

CockroachDB

TMA-COCKROACHDB-2.6

Configure Transparent Huge Pages (THP) to madvise to Avoid Increased Memory Usage

낮음레벨 1자동cockroachdb

설명

Linux Transparent Huge Pages (THP) is a kernel feature that automatically manages large memory pages to improve performance for some workloads. However, for databases such as CockroachDB, this behavior can cause unpredictable latency spikes, increased memory fragmentation, and excessive CPU overhead due to THP defragmentation. Cockroach Labs recommends configuring THP to madvise instead of the default always mode. The benchmark rates this recommendation Manual; the automated check covers its objective pass criterion. Passes when madvise is the selected (bracketed) Transparent Huge Pages mode.

점검 방법

감사 방식: 셸 명령

shell
out=$(cat /sys/kernel/mm/transparent_hugepage/enabled 2>/dev/null) || exit 1; printf '%s\n' "$out" | grep -o '\[[a-z]*\]'
예상 출력
[madvise]

조치 방법

조치 방식: 가이드 또는 인프라 패치

echo madvise > /sys/kernel/mm/transparent_hugepage/enabled (and defrag), then persist it at boot (kernel parameter transparent_hugepage=madvise or a systemd unit).

속성

운영 체제
모두
태그
cockroachdbos
참고 자료
CIS CockroachDB v25.x Benchmark v1.0.0 - 2.6 Configure Transparent Huge Pages (THP) to madvise to Avoid Increased Memory Usage

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target cockroachdb