cockroachdb / cockroachdb/cockroach
storage: reconsider default for `--cache`
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
[The default is currently 128 MiB](https://github.com/cockroachdb/cockroach/blob/2d3ad4047e3da39d8e04adf382899397ead1e0a1/pkg/server/config.go#L61-L67). As the flag is not required, users often omit it, which can result in unexpected performance due to the very small cache size.
Some alternatives:
- Switch the default to use a percentage of available system memory (e.g. 25%).
- Make the flag required, which forces users to set it to a sensible value. The advantage of this approach is that it would also allow us to remove a bunch of code that warns about the default value.
We should also update our public documentation to reflect this change.
Jira issue: CRDB-40856
Contributor guide
Assessment
This issue has not been assessed yet.