With PR #18040 the default cache size will change from 25% of physical memory to 128MiB. If you’re running CockroachDB in a production environment you’ll likely want to explicitly specify
--cache=25% (or a larger value) for improved read performance. Note that this applies to the 1.1 release of Cockroach (which hasn’t been released yet), not 1.0.
From the PR:
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.
#18040 includes a warning printed at startup to indicate that the default cache size is being used. We’ll likely a warning to the admin UI in a follow-on PR.
The value of 128MiB is somewhat arbitrary, but in line with the defaults used by PostgreSQL (128MiB) and MySQL (128MiB).