From f1df35820a09993fe1a30f30acf195b6a25dc279 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 4 Feb 2025 15:27:35 -0500 Subject: [PATCH 1/2] Add docs on transparent huge pages (THP) setting Fixes DOC-12097 --- src/current/v25.1/recommended-production-settings.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/current/v25.1/recommended-production-settings.md b/src/current/v25.1/recommended-production-settings.md index 990a5c94086..adbde4046cb 100644 --- a/src/current/v25.1/recommended-production-settings.md +++ b/src/current/v25.1/recommended-production-settings.md @@ -22,6 +22,15 @@ For optimal cluster performance, Cockroach Labs recommends that all nodes use th We recommend running a [glibc](https://www.gnu.org/software/libc/)-based Linux distribution and Linux kernel version from the last 5 years, such as [Ubuntu](https://ubuntu.com/), [Red Hat Enterprise Linux (RHEL)](https://www.redhat.com/technologies/linux-platforms/enterprise-linux), [CentOS](https://www.centos.org/), or [Container-Optimized OS](https://cloud.google.com/container-optimized-os/docs). +New deployments should configure [transparent huge pages (THP)](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html) with the `madvise` option: + +{% include_cached copy-clipboard.html %} +~~~ shell +echo madvise > /sys/kernel/mm/transparent_hugepage/enabled +~~~ + +Existing deployments that have THP enabled using the `always` option don't need to be changed; the differences between the settings are minor. + ## Hardware {% include {{ page.version.version }}/prod-deployment/terminology-vcpu.md %} From e1d7693d387fdc9568c5a697a62c5c48919497cd Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Thu, 6 Feb 2025 10:46:37 -0500 Subject: [PATCH 2/2] Update with RaduBerinde feedback (1) --- src/current/v25.1/recommended-production-settings.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/current/v25.1/recommended-production-settings.md b/src/current/v25.1/recommended-production-settings.md index adbde4046cb..b7b47a017fb 100644 --- a/src/current/v25.1/recommended-production-settings.md +++ b/src/current/v25.1/recommended-production-settings.md @@ -22,14 +22,11 @@ For optimal cluster performance, Cockroach Labs recommends that all nodes use th We recommend running a [glibc](https://www.gnu.org/software/libc/)-based Linux distribution and Linux kernel version from the last 5 years, such as [Ubuntu](https://ubuntu.com/), [Red Hat Enterprise Linux (RHEL)](https://www.redhat.com/technologies/linux-platforms/enterprise-linux), [CentOS](https://www.centos.org/), or [Container-Optimized OS](https://cloud.google.com/container-optimized-os/docs). -New deployments should configure [transparent huge pages (THP)](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html) with the `madvise` option: +We have observed increased memory usage in rare cases due to transparent huge pages (THP) being enabled (i.e., set to `always`). New deployments should configure [transparent huge pages (THP)](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html) with the `madvise` option. -{% include_cached copy-clipboard.html %} -~~~ shell -echo madvise > /sys/kernel/mm/transparent_hugepage/enabled -~~~ +Existing deployments that have THP enabled using the `always` option should change it to `madvise` unless they are currently running with a comfortable memory usage margin. -Existing deployments that have THP enabled using the `always` option don't need to be changed; the differences between the settings are minor. +The method for permanently changing the THP setting across reboots depends on the operating system. For Red Hat Enterprise Linux, see https://access.redhat.com/solutions/46111. ## Hardware