From ebb75471f2ad0775831f70e490656b927a88207e Mon Sep 17 00:00:00 2001 From: Matt Linville Date: Tue, 2 Apr 2024 15:42:25 -0700 Subject: [PATCH] Update system-wide section and Windows tab --- .../v23.1/recommended-production-settings.md | 32 +++++--- .../v23.2/recommended-production-settings.md | 37 +++++++-- .../v24.1/recommended-production-settings.md | 80 ++++++++++--------- 3 files changed, 95 insertions(+), 54 deletions(-) diff --git a/src/current/v23.1/recommended-production-settings.md b/src/current/v23.1/recommended-production-settings.md index 7673bce44b0..c9432c6b1c9 100644 --- a/src/current/v23.1/recommended-production-settings.md +++ b/src/current/v23.1/recommended-production-settings.md @@ -620,22 +620,36 @@ Alternately, if you're using [Systemd](https://wikipedia.org/wiki/Systemd): You should also confirm that the file descriptors limit for the entire Linux system is at least 10 times higher than the per-process limit documented above (e.g., at least 150000). -1. Check the system-wide limit: +1. **If you use `systemd`**, add a line like the following to the service definition for the `Manager` service. To allow an unlimited number of files, set `LimitNOFILE` to `INFINITY`. - ~~~ shell - $ cat /proc/sys/fs/file-max - ~~~ + {% include_cached copy-clipboard.html %} + ~~~ none + LimitNOFILE=35000 + ~~~ -1. If necessary, increase the system-wide limit in the `proc` file system: + Reload `systemd` for the new limit to take effect: - ~~~ shell - $ echo 150000 > /proc/sys/fs/file-max - ~~~ + ~~~ shell + systemctl daemon-reload + ~~~ + +1. **If you do not use `systemd`**: + 1. Check the system-wide limit: + + ~~~ shell + cat /proc/sys/fs/file-max + ~~~ + + 1. If necessary, increase the system-wide limit in the `proc` file system: + + ~~~ shell + echo 150000 > /proc/sys/fs/file-max + ~~~
-CockroachDB does not yet provide a Windows binary. Once that's available, we will also provide documentation on adjusting the file descriptors limit on Windows. +CockroachDB for Windows is experimental and not supported in production. To learn about configuring limits on Windows, refer to the Microsoft community blog post [Pushing the Limits of Windows: Handles](https://techcommunity.microsoft.com/t5/windows-blog-archive/pushing-the-limits-of-windows-handles/ba-p/723848).
diff --git a/src/current/v23.2/recommended-production-settings.md b/src/current/v23.2/recommended-production-settings.md index a69c2780f2b..643d0ccfb8e 100644 --- a/src/current/v23.2/recommended-production-settings.md +++ b/src/current/v23.2/recommended-production-settings.md @@ -620,17 +620,38 @@ Alternately, if you're using [Systemd](https://wikipedia.org/wiki/Systemd): You should also confirm that the file descriptors limit for the entire Linux system is at least 10 times higher than the per-process limit documented above (e.g., at least 150000). -1. Check the system-wide limit: +1. **If you use `systemd`**, add a line like the following to the service definition for the `Manager` service. To allow an unlimited number of files, set `LimitNOFILE` to `INFINITY`. - ~~~ shell - $ cat /proc/sys/fs/file-max - ~~~ + {% include_cached copy-clipboard.html %} + ~~~ none + LimitNOFILE=35000 + ~~~ -1. If necessary, increase the system-wide limit in the `proc` file system: + Reload `systemd` for the new limit to take effect: - ~~~ shell - $ echo 150000 > /proc/sys/fs/file-max - ~~~ + ~~~ shell + systemctl daemon-reload + ~~~ + +1. **If you do not use `systemd`**: + 1. Check the system-wide limit: + + ~~~ shell + cat /proc/sys/fs/file-max + ~~~ + + 1. If necessary, increase the system-wide limit in the `proc` file system: + + ~~~ shell + echo 150000 > /proc/sys/fs/file-max + ~~~ + + +
+ +CockroachDB for Windows is experimental and not supported in production. To learn about configuring limits on Windows, refer to the Microsoft community blog post [Pushing the Limits of Windows: Handles](https://techcommunity.microsoft.com/t5/windows-blog-archive/pushing-the-limits-of-windows-handles/ba-p/723848). + +
diff --git a/src/current/v24.1/recommended-production-settings.md b/src/current/v24.1/recommended-production-settings.md index a69c2780f2b..9d90c108106 100644 --- a/src/current/v24.1/recommended-production-settings.md +++ b/src/current/v24.1/recommended-production-settings.md @@ -577,65 +577,71 @@ For example, for a node with 3 stores, we would set the hard limit to at least 3 session required pam_limits.so ~~~ -1. Edit `/etc/security/limits.conf` and append the following lines to the file: +1. Set a limit for the number of open file descriptors. The specific limit you set depends on your workload and the hardware and configuration of your nodes. - ~~~ - * soft nofile 35000 - * hard nofile 35000 - ~~~ + - **If you use `systemd`**, add a line like the following to the service definition for the `cockroach` process. To allow an unlimited number of files, set `LimitNOFILE` to `INFINITY`. - Note that `*` can be replaced with the username that will be running the CockroachDB server. + {% include_cached copy-clipboard.html %} + ~~~ none + LimitNOFILE=35000 + ~~~ -1. Save and close the file. + Reload `systemd` for the new limit to take effect: -1. Restart the system for the new limits to take effect. + ~~~ shell + systemctl daemon-reload + ~~~ -1. Verify the new limits: + - **If you do not use `systemd`**: Edit `/etc/security/limits.conf` and append the following lines to the file: - ~~~ shell - $ ulimit -a - ~~~ + ~~~ + * soft nofile 35000 + * hard nofile 35000 + ~~~ -Alternately, if you're using [Systemd](https://wikipedia.org/wiki/Systemd): + The `*` can be replaced with the username that will start CockroachDB. -1. Edit the service definition to configure the maximum number of open files: + Save and close the file, then restart the system for the new limits to take effect. + After the system restarts, verify the new limits: - ~~~ ini - [Service] - ... - LimitNOFILE=35000 - ~~~ + ~~~ shell + ulimit -a + ~~~ - {{site.data.alerts.callout_success}} - To set the file descriptor limit to "unlimited" in the Systemd service definition file, use `LimitNOFILE=infinity`. - {{site.data.alerts.end}} +#### System-Wide Limit -1. Reload Systemd for the new limit to take effect: +You should also confirm that the file descriptors limit for the entire Linux system is at least 10 times higher than the per-process limit documented above (e.g., at least 150000). - ~~~ shell - $ systemctl daemon-reload - ~~~ +1. **If you use `systemd`**, add a line like the following to the service definition for the `Manager` service. To allow an unlimited number of files, set `LimitNOFILE` to `INFINITY`. -#### System-Wide Limit + {% include_cached copy-clipboard.html %} + ~~~ none + LimitNOFILE=35000 + ~~~ -You should also confirm that the file descriptors limit for the entire Linux system is at least 10 times higher than the per-process limit documented above (e.g., at least 150000). + Reload `systemd` for the new limit to take effect: -1. Check the system-wide limit: + ~~~ shell + systemctl daemon-reload + ~~~ - ~~~ shell - $ cat /proc/sys/fs/file-max - ~~~ +1. **If you do not use `systemd`**: + 1. Check the system-wide limit: -1. If necessary, increase the system-wide limit in the `proc` file system: + ~~~ shell + cat /proc/sys/fs/file-max + ~~~ - ~~~ shell - $ echo 150000 > /proc/sys/fs/file-max - ~~~ + 1. If necessary, increase the system-wide limit in the `proc` file system: + + ~~~ shell + echo 150000 > /proc/sys/fs/file-max + ~~~
-CockroachDB does not yet provide a Windows binary. Once that's available, we will also provide documentation on adjusting the file descriptors limit on Windows. +CockroachDB for Windows is experimental and not supported in production. To learn about configuring limits on Windows, refer to the Microsoft community blog post [Pushing the Limits of Windows: Handles](https://techcommunity.microsoft.com/t5/windows-blog-archive/pushing-the-limits-of-windows-handles/ba-p/723848).