Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs on transparent huge pages (THP) setting #19343

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rmloveland
Copy link
Contributor

Fixes DOC-12097

Copy link

github-actions bot commented Feb 4, 2025

@rmloveland
Copy link
Contributor Author

@RaduBerinde i added this to v25.1 docs so we can verify language

what previous versions should also have this guidance?

Copy link

netlify bot commented Feb 4, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit e1d7693
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/67a4d973db13e900072d6c13

Copy link

netlify bot commented Feb 4, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit e1d7693
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/67a4d974c3da8d0008a05ac2

Copy link

netlify bot commented Feb 4, 2025

Netlify Preview

Name Link
🔨 Latest commit e1d7693
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/67a4d9730277f70008d6870f
😎 Deploy Preview https://deploy-preview-19343--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe give a bit of the reasoning: "We have observed (in rare cases) increased memory usage due to transparent huge pages (THP) being enabled (set to always). New deployments should ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added, PTAL!

@rmloveland
Copy link
Contributor Author

rmloveland commented Feb 6, 2025

@RaduBerinde this may go without saying but I guess since this docs change is about the OS config it can be backported to v23.1+ docs? (once we're happy with it)

or are there CRDB-version-related considerations?

please advise, thanks!

@RaduBerinde
Copy link
Member

Looks great! Yes, we should backport.

@rmloveland rmloveland requested a review from taroface February 11, 2025 17:23
Copy link
Contributor

@taroface taroface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but couple suggestions


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.

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
The method for permanently changing the THP setting across reboots depends on the operating system. For Red Hat Enterprise Linux, refer to the [Red Hat documentation](https://access.redhat.com/solutions/46111).

@@ -22,6 +22,12 @@ 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).

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
We have observed increased memory usage in rare cases due to [transparent huge pages (THP)](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html) being enabled (i.e., set to `always`). New deployments should configure THP with the `madvise` option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants