TMA-COCKROACHDB-2.5
Disable Linux Memory Swapping to Prevent Performance and Stability Issues
설명
For production CockroachDB deployments on Linux VMs or bare-metal, it is a critical requirement to disable Linux memory swapping or ensure the system has adequate RAM to prevent swap usage. Swapping database memory pages to slow disk I/O introduces severe and unpredictable latency, compromising the database's performance and stability. The benchmark rates this recommendation Manual; the automated check covers its objective pass criterion. Passes when /proc/swaps lists no active swap device. Also confirm at least 4 GiB RAM per vCPU and that --cache plus 2x --max-sql-memory stays below 80% of RAM.
점검 방법
감사 방식: 셸 명령
[ -r /proc/swaps ] || exit 1; awk 'NR > 1 {n++} END {print n+0}' /proc/swaps- 예상 출력
0
조치 방법
조치 방식: 가이드 또는 인프라 패치
swapoff -a, remove swap entries from /etc/fstab (and set vm.swappiness=0), and size RAM to at least 4 GiB per vCPU.
속성
- 운영 체제
- 모두
- 태그
- cockroachdbos
- 참고 자료
- CIS CockroachDB v25.x Benchmark v1.0.0 - 2.5 Disable Linux Memory Swapping to Prevent Performance and Stability Issues
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
tmaegis scan --target cockroachdb