Memory auto-tunning

Hello,

cockroach start --cache=.25 --max-sql-memory=.25

As of my understanding: this command told CockroachDB to use only 50% RAM most of the time.

Other 50% free memory is reserved for “unpredictable-memory-usage” things such as: RocksDB cache, internal SQL activity, the adminUI…

These things are not predictable, but most of time their memory footprint are negligibles. It means that most of time this 50% free RAM memory is idle wasted. And RAM is expensive nowadays…

Here is my proposition (maybe it is duplicated already):

CockroachDB can monitor the memory activity so why not learn from it and auto-tune the --cache and the --max-sql-memory slowly and surely to the sweet point?

it should tune it down to 50% only if it (somehow) know that the memory was blowing up or switched to the swap memory…

I hope it is a reasonable and a doable feature request.

Thanks for your reading.