-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: default --cache and --max-sql-memory to 128MiB
Previously, these settings defaulted to 1/4 of physical memory. That is a reasonable default for production, but not for development or an environment where cockroach is sharing resources with other processes on the machine. For example, it was previously very easy to run a 5-node cluster locally on a single machine and have each cockroach node configured to use 1/4 of physical memory for cache. Leave it running too long and the cluster will crash. Using a relatively small cache size by default also avoids the perceived memory leak where cockroach will grow to fill the cache even when idle due to the writing of timeseries data. The downside to this change is that we need to educate users to increase --cache and --max-sql-memory when deploying to production. This change adds a warning to the logs when running with the default settings. Using the default setting for --cache (128 MiB). A significantly larger value is usually needed for good performance. If you have a dedicated server a reasonable setting is --cache=25% (4.0 GiB). A future enhancement can add a warning to the admin UI. Allow specifying a percentage of physical memory to --cache and --max-sql-memory. This allows an easy fallback to the previous behavior by specifying --cache=25% and --max-sql-memory=25%.
- Loading branch information
1 parent
6dedb02
commit e12ba3c
Showing
7 changed files
with
90 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters